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 know the particular record in pf with out reading?
There are six records in a file and we are going to update that records and used commit operation when it complete the update but suppose when it updating the third record,a error occured and operation failed.Is previously two records will be update or whole operation will be rollback? Please confirm it.
A pf containing 100 records... my query is how to display from 11th record in the pf?
Is it possible to create a logical file whose Physical file is not in same library?
hi iam very new to as400. i had created one physical file can any one tell command to enter data in to that
Define interactive jobs and batch jobs
how to eliminate the level check error
WHAT IS THE DIFFERENCE BETWEEN 'COLHDG' AND 'ALIAS'?
What is the purpose of the chain and setll and setgt?
how to add a new field to a file without compiling it?
can any one tell me what is meant by PSSR? Kindly elaborate it...
How to read a pf in reverse(from last record to first) using cl?