How to read a PF in reverse(from last rec to first) using CL?
Answers were Sorted based on User's Feedback
Answer / harkesh
IN THIS EXAMPLE I M USING EMPFILE FOR READING IN REVERSE
ORDER.
PGM
DCLF FILE(EMPFILE)
OVRDBF FILE(EMPFILE) SHARE(*YES)
OPNQRYF FILE((EMPFILE)) KEYFLD((EMPNO *DESCEND))
READF: RCVF RCDFMT(MPFILR)
MONMSG MSGID(CPF0864) EXEC(GOTO CMDLBL(END))
GOTO READF
END:
ENDPGM
| Is This Answer Correct ? | 27 Yes | 5 No |
Answer / ankur
using opnqryf command we can read file in reverse order in CL.
| Is This Answer Correct ? | 5 Yes | 0 No |
Answer / abhijeet m
OVRDBF FILE(ABC)
MBR(ABC)
POSITION(*END)
RCVF ABC
| Is This Answer Correct ? | 1 Yes | 10 No |
How to read a PF in reverse(from last rec to first) using CL?
hi iam very new to as400. i had created one physical file can any one tell command to enter data in to that
I have a PF with out any data but the dependent LF is having data?
what is the difference between adding keys & constraints into a phisical file
How to update physical file using logical file with example?
what is error handling concepts in cl
How many libraries can be there in a library list?
how to update physical files using normal logical file
what is the purpus of the chain and setll and setgt ?
How to insert more than one record to a pf at a time?(Bulk insert to a pf)
what is open data path? and what is the diff b/w access path and open data path?
Last statement of any rpg program is lr?