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

What is journalling and commitment control?

3 Answers   IBM,


Why we need to give File and To file Names While we are using OVRDBF. What is your understanding related to this?

2 Answers   Cap Gemini,


How do you proceed in case your active AS400 session has got disconnected suddenly, how can you get back to your session ? Is it possible??

1 Answers  


1. Which Built-In-Function will you use to achieve the following functionality? CLONO1NO2NO3 Factorl÷÷+OpcdeFactor2++÷ResultLenDHHiLoEq C QTY IFLT *ZERO C QTY MULT -1 QTY C ENDIF a) %ABS b) %TRIM c) %TRIMS d) %UNS

3 Answers   IBM,


How to declare the more than one file in cl/400.

13 Answers   IBM,






Can we create 300 logical files based on a single physical file using the CRTLF command only once?.

8 Answers  


what are the key words you must use when using a subfile?

0 Answers   IBM,


please guys help me,I need to write a program that shows more than one way to display a subfile. Both views are of the same file but sorted differently and show different fields of the same file when the user presses a function key. send me code

4 Answers   Virtusa,


What is the name of default out queue when user logs inn to syatem with valid profile?

3 Answers   IBM,


There is a excel sheet having details of Old account number and new account number. I need to update these details in my AS400 files. i.e. all the records having old account number should be replaced with new account number. There can be 100 or 200 or 300 PFs...no fix files known. how can we do this?Solution should be performance oriented

3 Answers   Cap Gemini, IBM,


there is any limit to display the members in rpg400?

3 Answers  


What is the compilation option that has to he specified while compiling an RPC program which uses a file having date data type field?

3 Answers   HSBC, IBM,


Categories