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

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

1 Answers   IBM,


what built in function can be used with SETLL.If you want to check whether the search argument is successful or not? Please give me answer with example?

3 Answers  


can anyone explain aboutovrOVRDBF,OPNQRYF, OVRSCOPE and OPNSCOPE?

2 Answers   TCS,


i hav 2 logical files(L1,L2) both r derived from one physical file(P1). how can i use both the logical files in one RPG program? if yes what i have to d.

5 Answers   TCS,


HI, 1: WHAT IS THE FUNCTION OF %KDS?WITH PROGRAMMING CODES EXAMPLE 2: WHAT IS THE FUNCTION OF Z-ADD AND Z-SUB ? WITH PROGRAMMING CODES EXAMPLE

1 Answers   IBM,






1.String operatio such as moving the characters to the variables? 2.what are the building functions for check file longs? 3.which of the following methods will make externally describe file fields available to a program? A: A/copy statement that specifies the library file and member of the field reference file source code B: A data structure definition specification that names the file on the EXTNAME keyword C: A data structure definition specification that names the file on the IMPORT keyword? D: A Definition specification for each desired field with the REFFLD keyword

1 Answers   CSC, CTS,


what is ment by "MDT"

2 Answers   TCS,


How to select highest score of each subject or how to select highest income of every month?

0 Answers  


I am Submitting one job in batch that job calls three progams(PGMA, PGMB, PGMC). PGMB should be called after sucessfully completion of PGMA as like for PGMC also. So Can you please tell me how can we do that (without using data area)

2 Answers   CTS,


Can we trigger an rpg program which has user interaction with display file when updating a file using the command ADDPFTRG?

2 Answers  


What is the difference between ITER and DO ? I know both are used to execute set of statements repeatedly, but what is the main difference?

2 Answers   CGI, Wipro,


program to find the number of objects used in a given program through a display.

2 Answers   IBM,


Categories