I want to add 10 days in current date. how it is possible in
CL program...?
Answer Posted / john bulloch
DCL VAR(&JOBDATE) TYPE(*CHAR) LEN(6)
DCL VAR(&JULCHAR) TYPE(*CHAR) LEN(5)
DCL VAR(&JULNUM) TYPE(*DEC) LEN(5 0)
DCL VAR(&ISODATE) TYPE(*CHAR) LEN(10)
RTVJOBA DATE(&JOBDATE)
CVTDAT DATE(&JOBDATE) TOVAR(&JULCHAR) FROMFMT(*DMY) +
TOFMT(*JUL) TOSEP(*NONE)
CHGVAR VAR(&JULNUM) VALUE(&JULCHAR)
CHGVAR VAR(&JULNUM) VALUE(&JULNUM -10)
CHGVAR VAR(&JULCHAR) VALUE(&JULNUM)
CVTDAT DATE(&JULCHAR) TOVAR(&ISODATE) FROMFMT(*JUL) +
TOFMT(*ISO)
Is This Answer Correct ? | 0 Yes | 2 No |
Post New Answer View All Answers
how do I preserve and clean the array?
How to call one program from another program in RPG? please help me with the code
How Chain operation copies the record's data to the input buffer for the program?
do you use message subfiles? What are the necessary keywords required coding a message subfile?
how do I declare a table or array in rpg iv?
What is a record lock error?
What is difference between bind by copy and bind by reference?
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 do I declare a minor?
What is the difference between iter and do?
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.
How can we override a file during runtime in rpg?
give an eg of ACQ-(ACQUIRE),BIT OFF,BIT ON,DEALLOC,DUMP,FEOD,FORCE,MHHZO,MHLZO,MHLLZO,MLHZO,REL,RESET,TESTZ,TESTB,TESTN----GIVE SMALL EXAMPLE TO THE OPCODES...TO UNDERSTAND FUNCTIONING...........
what is the necessary keyword needed to scroll subfile records?
how do you use commitment control in rpg?