Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

what is the difference between do while and do until?

1213


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?

1071


what was the robotech rpg?

1157


how can I tell when to replace the array?

1172


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.

6429


what do you mean by an input subfile, what are the keywords required?

1218


how does the rpg element work?

1171


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?

911


what is *place and *auto keyword in prtf ?plz explain

3118


are there any useful c runtime apis that I can call from rpg iv?

1131


When it is desirable to describe files Internally?

1674


how do I preserve and clean the array?

1104


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...?

2020


what is an online rpg?

1215


do you use message subfiles? What are the necessary keywords required coding a message subfile?

1099