I want to add 10 days in current date. how it is possible in
CL program...?
Answer Posted / pushyami tulluri
PGM
DCL VAR(&DATE) TYPE(*CHAR) LEN(6)
DCL VAR(&NUMVAR) TYPE(*CHAR) LEN(8)
DCL VAR(&NUMVAR1) TYPE(*CHAR) LEN(5)
DCL VAR(&NUMVAR2) TYPE(*DEC) LEN(5)
RTVSYSVAL SYSVAL(QDATE) RTNVAR
(&DATE)
CVTDAT DATE(&DATE) TOVAR(&NUMVAR) FROMFMT
(*MDY) +
TOFMT(*YMD) TOSEP(*none)
CHGVAR &NUMVAR1 %SST(&NUMVAR 5 2)
SNDUSRMSG MSG('NUMVARIBLE' ||
&NUMVAR1)
CHGVAR &NUMVAR2
&NUMVAR1
CHGVAR &NUMVAR2 (&NUMVAR2 +
10)
/* CHGVAR &NUMVAR1 &NUMVAR2
*/
CHGVAR %SST(&NUMVAR 5 2)
&NUMVAR2
SNDUSRMSG MSG('CURRENT DATE:' ||
&NUMVAR)
ENDPGM
| Is This Answer Correct ? | 2 Yes | 5 No |
Post New Answer View All Answers
can any one help in hawkeye and turnover or any change management system plzzzzz or send the documents to my mail id :gvsp.as4@gmail.com
1. If there are two programs using same file and 2 users are using the file at the same time and what can be done to allow them both to access? 2. How can remove lock from the file for accessing it by both users?
How to declare the pull button in AS/400..
What is the difference between copybooks and subprocedures in as400?
Set on command is used for closed all opened files , initialize var and release resource , return cmd is used for return to calling program but my req. Is dnt close opened files and resource must released while doing transactions , how can i do this...?
what is the necessary keyword needed to scroll subfile records?
How to write record if no field or the field are different in physical file in rpgle ?
What is the difference between iter and do?
what are the key words you must use when using a subfile?
can you debug ile rpg program using isdb?
How to select highest score of each subject or how to select highest income of every month?
How to create a login screen using a command instead of display file.... intention is to get a password field on a command..... how do you achieve this...
How can we override a file during runtime in rpg?
Please tell me how to read the records from a file with load an array of size with error conditions(The logic answer for this question is ARR is array of 99 elements Z-ADD 0 IDX *LOVAL SETLL FILE READ FILE 99 *IN99 DOWEQ *OFF IDX ANDLT 99 ADD 1 IDX MOVE FIELD ARR,IDX READ FILE 99 ENDDO).So,Please give me the complete of this code.
What is ment by record level identifier?