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

what do you mean by SESSION/DEVOCE ERROR?

1 Answers   IBM,


How can we receive values from a called procedure in RPG?

1 Answers  


How Commitment and Roll back control is used in as400, explain with real time senario ???

2 Answers   Acolite, HSBC,


i want code and what are used key words are ...like wrkmbrpdm screen (q) i have a file with 3 fields empno,empname,empaddr... here you give the empno it displays from that number to remaining empno's how? sub file screen: employee details pos to:empno then enter empno empname empaddr so file have 100 records from 1 to 100 so the above pos you give the 55 empno...it displays the from 55 to remaining... ...... please share this answel

2 Answers   IBM,


Mr.Yallamanda Reddy P thanks for your answer sir,can we use test(D) opcode in RPG/400,if yes please help me by eloborating on that answer by writing a sample code for that sir

2 Answers   iGate,






can we use cl programming to update or delete physical files

12 Answers  


What will be the value of STRING after line 0106 is executed in the code below? 0101 E* Fromfiletofile..tabnameprnentlenpdatabnamlenpda 0102 E ARR 8 1 0103 ISTRING DS 0104 I 1 8 ARR 0105 C MOVE *BLANK STRING 0106 C MOVEA'ABC' ARR A) 'AAAAAAAA' B) 'BBBBBBBB' C) 'CCCCCCCC' D) 'ABC ' E) ' ABC'

2 Answers  


which MONMSG will give higher priority in CL program? I know MONMSG are of two types. Program Level Monmsg and Command Monmsg?

1 Answers  


what happens when sflsiz = sflpag? What are the advantages and disadvantages?

0 Answers   IBM,


How to check which are the pgms using 1 perticulate file.? I know there is many tool available for X-reference...but need to know is there any command available in the system...?

4 Answers   IBM,


If the last record of a file has been read, and the next operation on that file is a READ operation, what will be the values of the input fields for that file? A. They will be blank and/or zero. B. They will be null. C. They will equal the values of the first record in the file. D. They will equal the values of the last record read.

3 Answers  


How to find d key field of a pf that doesn’t have source physical file?

2 Answers  


Categories