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
how can you display specific subfile page on the screen in unequal subfile?
How can we know running job is batch or interactive?
How to call one program from another program in RPG? please help me with the code
How to write record if no field or the field are different in physical file in rpgle ?
We have job which is running as batch. It takes atleast 06 hours to complete tht job. But I wanna do tht job with in 3 hours?
what is the procedure and explain about real time scenario.
When we have a file with Duplicate records and I want to read the unique record from the file. For example a file containing Emp Name as 'Ram' and there are 3 entries of it. So how to read a unique record from File?
How Chain operation copies the record's data to the input buffer for the program?
how do I play {insert rpg system here}?
What are the types of identifiers?
what is a rpg?
What is file identifier where we can use?
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...
are there any useful c runtime apis that I can call from rpg iv?
Explain mdt?