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 is the necessary keyword needed to scroll subfile records?

0 Answers   IBM,


What is SFLNXTCHG keyword why it has used and where? Briefly explain with Example.

2 Answers   IBM,


Delete FileName at first statement in RPG.

1 Answers  


wat is the difference between dataarea and data queue?

5 Answers   Airtel, Four soft, Shahi Exports,


How can we override a file during runtime in RPG? Without using OVRDBF or calling a CL program

1 Answers   UST,


How to search particular records from the database file in rpg?

2 Answers  


How to declare the pull button in AS/400..

0 Answers  


How to change the name of physical members Dynamically?

1 Answers  


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  


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  


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

0 Answers   IBM,


As Packed veriable store 2 digits in 1 byte and ZONE variable store 1 digit in 1 byte... Please tell me when we have to use Packed and Zone variable...?

1 Answers  


Categories