⟩ How to read a PF in reverse(from last rec to first) using CL?
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