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 |
what is open data path? and what is the diff b/w access path and open data path?
Define interactive jobs and batch jobs
how to restrict upon adding the data for field reference file in DB400
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 the difference between adding keys & constraints into a phisical file
what is use of self join and which cases you will use this join
What is the difference between access path and open data path?
How to retrieve a physical file after deleting that ? what is keyword used for that....??
Hi, Please give the answer to this question? I have Phisical file with 100 records,there is no any duplicate records in this pf.Based on this pf one Logical file i have used.But this lf is viewing only 80 records only of that pf?What is the reason for this?Please give me answer?
A pf containing 100 records... my query is how to display from 11th record in the pf?
CRTDTA AND CRTARA should be used along with?