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
Where the QTEMP library will get created? if the the answer is QSYS, then howcome more than one job can create same library name(QTEMP) in QSYS? what is the uniqueness of QTEMP? For example, run the below command in different workstation WRKOBJ QSYS/QTEMP And take 8 in the option to check the description. both will have different info. so where(which LIB) exactly the QTEMP is stored?
When we create a pf and did not fill up maint parameter, then by default which access path will the system take & why?
What is FORMAT keyword and its use?
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?
What is the interactive job? What is the batch job? How to change the batch job to interactive job?
How to change the batch job to interactive job?
Can we concatenate fields in physical file? If yes how can we do?
How to read a pf in reverse(from last record to first) using cl?
What is the primary file?
What is the interactive job?
I have a pf, it contains 5 members, how to access particular member data from logical file?
What is open data path?
What is the batch job?
How to update physical file using logical file with example?
How to retrieve a physical file after deleting that?