How to read a PF in reverse(from last rec to first) using CL?

Answers were Sorted based on User's Feedback



How to read a PF in reverse(from last rec to first) using CL?..

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

How to read a PF in reverse(from last rec to first) using CL?..

Answer / ankur

using opnqryf command we can read file in reverse order in CL.

Is This Answer Correct ?    5 Yes 0 No

How to read a PF in reverse(from last rec to first) using CL?..

Answer / abhijeet m

OVRDBF FILE(ABC)
MBR(ABC)
POSITION(*END)

RCVF ABC

Is This Answer Correct ?    1 Yes 10 No

Post New Answer

More DB400 Interview Questions

I had created one physical file tell me command to enter data in to?

1 Answers  


What is the interactive job? What is the batch job?

0 Answers  


When we create a pf and did not fill up maint parameter, then by default which access path will the system take & why?

0 Answers  


can we concate fileds in physical file? If yes how can we do?

5 Answers   Patni,


How to change the batch job to interactive job?

0 Answers  


how to see number of logical files depending on a pf?...can we declare more than 20 logical files from a single pf? is it possible

4 Answers   ocbc,


What is the interactive job? What is the batch job? How to change the batch job to interactive job?

0 Answers  


In how many ways we can create a logical file?`

5 Answers  


Q.1 how to implement the commitment control. 2.how to control commitment control from external program.

7 Answers   IBM,


CRTDTA AND CRTARA should be used along with?

2 Answers  


How to insert more than one record to a pf at a time?(Bulk insert to a pf)

9 Answers  


Suppose if a physical file is having 1000 records, but i deleted 500 records from it. Here the concern is can the size of the file changes or it remains the same... kindly help me out with thorough xplanation.... Thanks in-advance...

6 Answers   ABC, TCS,


Categories