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

explain sflclr, sflend, sfldlt, and sflcsrrrn?

891


How can we override a file during runtime in rpg?

690


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

548


during execution, an rpg/400 program automatically follows a sequence of operations for each record that is processed. The built-in program cycle includes the following logical steps.

755


is this a rpg channel?

681






how does the rpg element work?

718


can you debug ile rpg program using isdb?

739


How to call one program from another program in RPG? please help me with the code

1260


how do I declare a minor?

718


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

831


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.

5420


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

775


what is a rpg?

703


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

1464


What is file identifier where we can use?

652