I want to add 10 days in current date. how it is possible in
CL program...?

Answers were Sorted based on User's Feedback



I want to add 10 days in current date. how it is possible in CL program...?..

Answer / 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

More RPG400 Interview Questions

Please help me, I have created window subfile,I have created Footer with same lengh and postion of window SFL. When I call the pgm, first is shows only Footer and then it shows subfile records.This time Footer is not showsing ..plz hel me how can i do it...? Sameple DDS and RPG: A R WIN1 SFL A*%%TS SD 20090130 165346 MUNSHIJ REL-V4R2M0 5769- PW1 A FLD001 1Y 0B 4 3EDTCDE (Z) A ATFILE R O 4 7REFFLD (QWHFDBAS/ATFILE LIB/LIBF- A ILE) A R WINCTL SFLCTL (WIN1) A*%%TS SD 20090202 123459 MUNSHIJ REL-V4R2M0 5769- PW1 A ALTNAME ('y') A SFLSIZ (0004) A SFLPAG (0004) A WINDOW (FOOTER) A ROLLUP (27) A ROLLDOWN (28) A CF12 (12 'Cancel') A 50 SFLDSP A N51 SFLDSPCTL A 51 SFLCLR A 1 2'Select Option,Press enter' A 2 3'1= Select' A R FOOTER A* A WINDOW(8 31 9 43) A 8 4'F12 = Cancel' A R DUMMY ASSUME A 24 10' ' in RPG: Dow *IN12 = *Off Write Footer Fxfmt WInCTL

2 Answers  


what is the difference between SETON RT & RETURN?

5 Answers  


I have some doubts on subfile----------- -----I wrote a prog on subfile to display the records. Every thing is clear but i defined a field called "opt" as input field in subfile record format from that input field i wish to enter into new screen called "EDIT" which i created it as a separate RCD in display file. i gave opt as 2 for edit just like in WRKMBRPDM screen please telll me the code and how can i code for it in RPG.

3 Answers  


Why there is invention of RPG if we can do insert update delete in CL through SQL.Why the rise of RPG?

1 Answers   Infogain,


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

0 Answers  


The PGMA calls PGMB.PGMB generates a report.The report should contain the called program name(PGMA).How do i get the called program name in PGMB to print it on the spool file?(calling program name should NOT be hard coded or passed as parameter to called program?

6 Answers  


what is commitment control?explain about it?

1 Answers   HSBC,


How to change the name of physical members Dynamically?

1 Answers  


I know chain keyword retreive records randomly but how chain keyword exactly works internally????

4 Answers  


purpose of pannel group??/

2 Answers   CTS,


Interviewer asked me write down DDS for load all subfile .can anybody write dds

0 Answers  


how to retrieve RRN value in RPGLE program

3 Answers  


Categories