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 do you find whether a job is a batch job or interactive?

4 Answers  


can anyone explain aboutovrOVRDBF,OPNQRYF, OVRSCOPE and OPNSCOPE?

2 Answers   TCS,


can anybody help me to solve this problem. the program that i m checking display error message saying "Record format for file AJDSPFFD does not match model file and decimal error. how to solve this problem. The AJDSPFFD is snapshot the AJTLOG that is the audit trail list.

0 Answers  


Q1.How we can copy the data of file one session to another session? Q2.how we can execute a loop infinitely in AS/400 coding? Q3.In ALDON tool,multitask is posible on a perticular object by the user?

6 Answers   CSC,


In RPG program one file using as a PRIMARY file while running program some of the records reading twice any body know why its happening

2 Answers  






How can we override a file during runtime in rpg?

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 the difference Return and InLr?

3 Answers  


How to change the name of physical members Dynamically?

1 Answers  


If record-format name in an externally-described file has already been defined as a file-name.how to solve this?

2 Answers   CTS,


wat is scan and check ? give me real time scenarios where we used these keywords in ur projects?

2 Answers   Four soft,


Maximum how many files declare in rpgle

3 Answers   TCS,


Categories