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

Assume my file has 100 records and I want to see only first 10 records. Is this possible through lf?

1 Answers  


why subproc not run in dftactgrp?????/plz explain

2 Answers   CSC,


How can i keyed a flat file in RPGLE

5 Answers   IBM, Wipro,


In ProgramB there is a SBMJOB, which is a call to program C .There is also a CALL to program D from B. How would you check the program C has been executed in D?

4 Answers  


1.I have a Batch job, Running for 4 hours, i want to reduce the executing time to 2 hours what should you do?

5 Answers   Cap Gemini,


suppose a job is running for 15 minutes after that it goes to message wait? what are the impact analysis

1 Answers  


A particular job executing on the iS is not behaving as expected and is operating in an environment in which it can be debugged. What commands would you use to debug and observe the program?

2 Answers   IBM,


Suppose I have 3 jobs a b and c. I want to submit b after successful completion of a and want to submit c after successful completion of b. Without using job scheduler or job queue, how can I do that through cl program?

1 Answers  


difference between 1:%found and %equal built function in detail with example .

6 Answers   Polaris,


where we give the MSGSFL in rpg400?

4 Answers  


how can you display specific subfile page on the screen in unequal subfile?

0 Answers   IBM,


How can we call CL program to RPG? How many number of parameter we can pass

2 Answers   TCS,


Categories