I want to add 10 days in current date. how it is possible in
CL program...?
Answer Posted / s kumar
Hi,
Try this one
PGM
DCL VAR(&DATE) TYPE(*Char) Len(6)
ADDDATE DAYS(10) TOVAR(&DATE) TOVARFMT(*SYSVAL) +
DATEFMT(*SYSVAL)
ENDPGM
you will get the flexibility by ADDDATE Command to change
the date format into desired format.
| Is This Answer Correct ? | 2 Yes | 16 No |
Post New Answer View All Answers
which program rpg or cl is efficent to update a transaction onto a database file and why ?
how do I preserve and clean the array?
What is file identifier where we can use?
Suppose we have one database file and it is used by 5 programs and in 3 program we have to add some records in datbase file s what is the impact on other program?
Hi Viewers can any body explain me how to update and ahange the already existed data in physical file using subfile ? please explain me with the code if possible?
Program to read marks of 10 students for 4 subjects and compute and display total marks and status of each student in rpg
what is the procedure and explain about real time scenario.
how do I declare a table or array in rpg iv?
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...
what is the use of sflnxtchg?
If my rpg program has a date field, what extra care I have to take while compiling that rpg program? If the file is keyed and I have declared the file as well as key list properly in my program. Still am getting an error message like "chain/reade operation is not allowed" what may be the case?
What is the purpose of record level identifier?
What are the types of identifiers?
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?