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.
Answer Posted / 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 |
Post New Answer View All Answers
what is the difference between do while and do until?
If my rpg program has a date field, what extra care I have to take while compiling that rpg program? If the file is keyed and I have declared the file as well as key list properly in my program. Still am getting an error message like "chain/reade operation is not allowed" what may be the case?
what was the robotech rpg?
how can I tell when to replace the array?
1. What is bound-by-call and bound-by-reference? 2. Where and why is *Nomain used? 3. What are the difficulties faced by programmers when using service programs? 4. Explain the different ways of parsing and compiling XML in iSeries.
what do you mean by an input subfile, what are the keywords required?
how does the rpg element work?
Assume 2 users are using the same file and first user updates some record in the file. Will the 2nd user will be able to see the updated record or not?
what is *place and *auto keyword in prtf ?plz explain
are there any useful c runtime apis that I can call from rpg iv?
When it is desirable to describe files Internally?
how do I preserve and clean the array?
Set on command is used for closed all opened files , initialize var and release resource , return cmd is used for return to calling program but my req. Is dnt close opened files and resource must released while doing transactions , how can i do this...?
what is an online rpg?
do you use message subfiles? What are the necessary keywords required coding a message subfile?