1)how to do date validation in rpg?
2)how to delete dUPLICATE RECORDS?

Answer Posted / sekhar

1: FOR DATE VALIDATION

/FREE
TESTD(E) *ISO(WHAT EVER) DATE VARIABLE ;
IF %ERROR ;
DO SOME THING ;
ENDIF ;
/END-FREE
2: CREATE A LOGICAL ON THAT FILE WITH KEY SAY FILE1
IN RPG

FFILE1 IP E K DISK
D X S 9S 0
D
I RECORDFORMAT-FILE1
I KEYFIELD L1 (CONTROL INDICATOR)

/FREE
X += 1 ;
IF X <> 1 ;
DELETE RECORDFORMAT ;
ENDIF ;

/END-FREE
CL1 RESET X

Is This Answer Correct ?    0 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what was the robotech rpg?

909


give an eg of ACQ-(ACQUIRE),BIT OFF,BIT ON,DEALLOC,DUMP,FEOD,FORCE,MHHZO,MHLZO,MHLLZO,MLHZO,REL,RESET,TESTZ,TESTB,TESTN----GIVE SMALL EXAMPLE TO THE OPCODES...TO UNDERSTAND FUNCTIONING...........

3588


How can we know running job is batch or interactive?

902


Suppose we have one database file and it is used by 5 programs and in 3 program we have to add some records in datbase file s what is the impact on other program?

1706


How can we override a file during runtime in rpg?

962


what is kids-rpg?

919


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

934


When we have a file with Duplicate records and I want to read the unique record from the file. For example a file containing Emp Name as 'Ram' and there are 3 entries of it. So how to read a unique record from File?

763


Interviewer asked me write down DDS for load all subfile .can anybody write dds

1420


what is data area and how it is used in rpg program ?

1061


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

1750


how do I declare a table or array in rpg iv?

970


what is a rpg?

956


How do u design a physical file, when you have 2 Unique fields like for eg in A student file student ID and student examination no both are unique

813


what is program status data structure?

1884