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


Please Help Members By Posting Answers For Below Questions

how can you display specific subfile page on the screen in unequal subfile?

671


How can we know running job is batch or interactive?

647


How to call one program from another program in RPG? please help me with the code

1252


How to write record if no field or the field are different in physical file in rpgle ?

483


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?

761






what is the procedure and explain about real time scenario.

1473


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?

496


How Chain operation copies the record's data to the input buffer for the program?

1076


how do I play {insert rpg system here}?

579


What are the types of identifiers?

566


what is a rpg?

696


What is file identifier where we can use?

639


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...

1304


are there any useful c runtime apis that I can call from rpg iv?

696


Explain mdt?

661