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.

Answers were Sorted based on User's Feedback



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

Answer / katiyar

Select the format of Date (For E.g. *MDY(MMDDYY),
*DMY(DDMMYY) or *USA(MMDDYYYY).....etc and have value in
your variable "YourDate". Verify the date format by coding
as mentioned below.

--------------------RPG---------------------------------
*MDY Test (D) YourDate 99
If *In99 = *On
'Invalid' Dsply
Else
'Valid' Dsply
EndIf

**99 is indicator.
----------------------RPGLE-----------------------------
*MDY Test(DE) YourDate
If %Error
'Invalid' Dsply
Else
'Valid' Dsply
EndIf
---------------------------------------------------------

Is This Answer Correct ?    6 Yes 0 No

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

Answer / yallamanda reddy p

TEST(D)

Is This Answer Correct ?    5 Yes 0 No

Post New Answer

More RPG400 Interview Questions

What does Implicit Open means with respect to a file ? What about the Explicit Open?..what are the major differences between these two?

1 Answers   IBM,


I have some doubts on subfile----------- -----I wrote a prog on subfile to display the records. Every thing is clear but i defined a field called "opt" as input field in subfile record format from that input field i wish to enter into new screen called "EDIT" which i created it as a separate RCD in display file. i gave opt as 2 for edit just like in WRKMBRPDM screen please telll me the code and how can i code for it in RPG.

3 Answers  


In single page subfile,if I select the mutiple options in 1 page and without pressing enter,I press rollup key (pagedown).In such case how I can handle it in rpg becasue in single page we have to handle it in pgm. It would be helpful if any one answer with coding

4 Answers   Infinite Computer Solutions,


I have a RPG program of 100 Lines and first line is to SETON indicator LR. Will the program execute rest of the 99 Lines?

6 Answers  


check existence of one record without using chain or read?

1 Answers   IBM,


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,


purpose of pannel group??/

2 Answers   CTS,


what was the robotech rpg?

0 Answers   IBM,


what is the difference between the procedure and module in ILERPG?

4 Answers  


what is plat file?

6 Answers   Indian Infotech,


In case if I want to know whether a record exists in a file, which one do you prefer CHAIN or a SETLL and why ?

1 Answers  


A rpg or clp command to find if the file field is defined as a character or numeric field.

1 Answers   IBM,


Categories