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

how can we know running job is batch or intractive ? i need all the possibilites.........plz help me

3 Answers   HSBC, IBM,


How can we receive values from a called procedure in CL?

1 Answers   IBM, NTT Data,


Mr.Sidc sirfor my question{how to convert date format from one format to another i think in CL/400 its CVTDAT,Please tell in RPG/400 sir not in RPGILE} you have answered using MOVE opcode,can you illustrate me with a small example sir very kind of you.

1 Answers   CTS, IBM, iGate,


Maximum how many files declare in rpgle

3 Answers   TCS,


How to find d key field of a pf that doesn’t have source physical file?

2 Answers  






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

0 Answers  


Let?s consider a variable X of length 20. Move value ?ABC? to it.How to determine how many characters does X have?

1 Answers  


can i use UPDDTA command in rpg program in which contains a file

1 Answers   TCS,


Need a sql query: retrieve all duplicate records in table?

1 Answers  


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  


What are the necessary keywords required to code a message subfile?

3 Answers  


How do you find out whether a record is present in the physical file without reading the file? for Example Employee No: 100 in an Employee master.How do we find out whther 100 is present in Employee master without reading the file?

11 Answers   Bank Of America, CSC, IBM,


Categories