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
Assume 2 users are using the same file and first user updates some record in the file. Will the 2nd user will be able to see the updated record or not?
What is the difference between copybooks and subprocedures in as400?
which program rpg or cl is efficent to update a transaction onto a database file and why ?
are there any useful c runtime apis that I can call from rpg iv?
What is the diff bw PF/LF Name and their Record format name? what is restriction in record format then file name?
what is an online rpg?
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...?
When it is desirable to describe files Internally?
what is the difference between do while and do until?
What is ment by record level identifier?
what was the robotech rpg?
what do you mean by an input subfile, what are the keywords required?
Program to read marks of 10 students for 4 subjects and compute and display total marks and status of each student in rpg
How to define data area in RPG program? In which scenario multi occurrence DS is use in AS400?
during execution, an rpg/400 program automatically follows a sequence of operations for each record that is processed. The built-in program cycle includes the following logical steps.