How to read a PF in reverse(from last rec to first) using CL?
Answer Posted / 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 |
Post New Answer View All Answers
How to know the particular record in pf with out reading?
How to index LF by relative record no (RRN)
When we create a pf and did not fill up maint parameter, then by default which access path will the system take & why?
How to update physical file using logical file with example?
What is FORMAT keyword and its use?
I have a pf, it contains 5 members, how to access particular member data from logical file?
How to read a pf in reverse(from last record to first) using cl?
How to find the list of source physical files in a library?
What is the interactive job? What is the batch job? How to change the batch job to interactive job?
Last statement of any rpg program is lr?
Suppose I have a pf, it contains 5 members, how to access particular member data from logical file? What is the use of member in pf?
Suppose I have a pf,it contains 5 members,how to access particular member data from logical file ?and what is the use of member in pf?
What is the interactive job? What is the batch job?
How to change the batch job to interactive job?
Can we concatenate fields in physical file? If yes how can we do?