how to find whether a date format is valid or not in RPG400
not in RPGILE.Can you please write the coding for this sir,i'm
new to AS400.Please help.



how to find whether a date format is valid or not in RPG400 not in RPGILE.Can you please write the..

Answer / jai shri ram

> D DateIn S 8 0 INZ(*Zeros)
> D DateMDY S D DATFMT(*USA)
> D DateYMD S D DATFMT(*ISO)
> D Days S 5 0 INZ(*Zeros)
> D DateAlpha S 8
> ...
> C Move DateIn DateAlpha
> C *MDY0 Test (D) DateAlpha
99
> C If *In99
> C Except ErrorDtl
> C Iter
> C EndIf
> C Move DateIn DateMDY
> C AddDur Days:*Days DateMDY
> C Move DateMDY DateIn

Is This Answer Correct ?    2 Yes 0 No

Post New Answer

More RPG400 Interview Questions

How to read alternative records in a pf by using rpg?

8 Answers   IBM,


1.If *HIVAL SETGT is used what opcode is used to read a record? A:READ B:READPE C:CHAIN D:READP 2.How to pass numeric parameter to the rpg pgm from the command line? 3.What keyword is used on the rpg 4 definition specification to rename a subfile in an externally definition data structure? A:RENAME B;LIKE C:EXTNAME D:EXTFLD

4 Answers   Manhattan,


how do I play {insert rpg system here}?

0 Answers   IBM,


what is data area and how it is used in rpg program ?

0 Answers   IBM,


What is ment by record level identifier?

0 Answers  






can you debug ile rpg program using isdb?

0 Answers   IBM,


Hi, can any one tell me :IN CASE OF SINGLE PAGE FILE HOW WILL I LOAD THE PREVIOUS PAGE WITHOUT THE USE OF SFLCLR INDICATOR ?

3 Answers   IBM,


i have 1000 records in pf.what are all the ways to read a particular name records in rpg?? ie.. in pf i have a name called demo appeared around 52 times hw will we read this particular records in rpg/400?.

11 Answers   IBM,


How can we read a particular record from the database file which is not having DDS (Flat File). For example, there are 100 records in the flat file. How can we retrive 15th record in RPG/400 program (Without using CL)

6 Answers   CTS, IBM,


how do u find whether a record is locked or not??

4 Answers   CTS,


Can we trigger an rpg program which has user interaction with display file when updating a file using the command ADDPFTRG?

2 Answers  


i want to perform uniqness on db file bt my db file nt hving key by useing rpgle.

3 Answers   HSBC,


Categories