Mr.Yallamanda Reddy P thanks for your answer sir,can we use
test(D) opcode in RPG/400,if yes please help me by eloborating
on that answer by writing a sample code for that sir

Answers were Sorted based on User's Feedback



Mr.Yallamanda Reddy P thanks for your answer sir,can we use test(D) opcode in RPG/400,if yes pleas..

Answer / gagan

test(D) opcode is used to check for the validity of a date/time/timestamp.
If the date is valid then error code returned is o else error code is 1

Is This Answer Correct ?    0 Yes 0 No

Mr.Yallamanda Reddy P thanks for your answer sir,can we use test(D) opcode in RPG/400,if yes pleas..

Answer / uday bagdi

Testdate field has date data type and 20 is LO level indicator we check this filed is *YMD format or not.Below is the code.

*ymd test (D) Testdate 20

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More RPG400 Interview Questions

How can we know running job is batch or interactive?

0 Answers  


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

1 Answers   IBM,


how do you use commitment control in rpg?

0 Answers   IBM,


How can we read a particular record from the database file which is not having DDS (Flat File). For example, there are 100 records in the flat file. How can we retrive 15th record in RPG/400 program (Without using CL)

6 Answers   CTS, IBM,


what is use of sflnxtchg and use of MDT(modify data tag).both r same r not and can we use these on dspf and subfile.

2 Answers  






What is significance of a file designated as a Primary file in Rpg400 program....also what's use of secoundry file

1 Answers  


what is the equivalent keyword for CHAIN opcode ??

7 Answers   TCS,


To check the locks , we use cmd WRKOBJLCK , but how we confirm whether it's objeck lock / member lock. I confused with the Lock type and Status values...Can any body please tell me ...

5 Answers  


How to read alternative records in a pf by using rpg?

8 Answers   IBM,


What will be your approach in going either for OPNQRYF or Logical files. Which one to go for?

2 Answers  


1.Are there any errors in the following statement?If so then list them.DTAARA is a data area having a field EMP # and EMPNO is a field in the file EMPPF.Which has one record. READ EMPPF IF %FOUND(EMPPF) IN DTAARA EVAL EMP#=EMPNO OUT DTAARA ENDIF

5 Answers  


if there is a module object , how to find the program object for this module object.Assume the module object name and program object name is not same.

0 Answers  


Categories