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
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...?
what is the rpg system?
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
can you debug ile rpg program using isdb?
What is the difference between iter and do?
How Chain operation copies the record's data to the input buffer for the program?
Interviewer asked me write down DDS for load all subfile .can anybody write dds
How to create a login screen using a command instead of display file.... intention is to get a password field on a command..... how do you achieve this...
What is a record lock error?
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...........
what was the robotech rpg?
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.
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
what is file information data structure?
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