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

can you debug ile rpg program using isdb?

722


write an RPG program to calculate the marks of 5 students (A,B, C, D, E)in 3 different subjects (eng, math, sci) an display on the screen

814


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?

495


What is difference between bind by copy and bind by reference?

1710


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

673






can I touch the array during treatments?

733


how do I play {insert rpg system here}?

572


can any one help in hawkeye and turnover or any change management system plzzzzz or send the documents to my mail id :gvsp.as4@gmail.com

1948


thanks mr.Harshad R Suryawaunshi,i'm new to as400 i think you are telling in rpgile i know only rpg400 if possible can you tell in rpg400

1877


Program to read marks of 10 students for 4 subjects and compute and display total marks and status of each student in rpg

707


how do you use commitment control in rpg?

734


what is the use of sflnxtchg?

789


what is the procedure and explain about real time scenario.

1461


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?

600


How to write record if no field or the field are different in physical file in rpgle ?

467