1.How to load Records of a Physical file(PF) in the reverse
order, in CL program?

Answers were Sorted based on User's Feedback



1.How to load Records of a Physical file(PF) in the reverse order, in CL program?..

Answer / anil kumar.anumulasetty

I THIS EXAMPLE I M USING EMPFILE READING IN REVERS ORDER

PGM
DCLF FILE(EMPFILE)
OVRDBF FILE(EMPFILE) SHARE(*YES)
OPNQRYF FILE(EMPFILE) KEYFLD(EMPNO *DESCEND)

READF: RCVF RCDFMT(MPILR)
MONMSG MSGID(CPF0864) EXEC(GOTO CMDLBL(END))
GOTO READF


END:
ENDPGM

Is This Answer Correct ?    19 Yes 0 No

1.How to load Records of a Physical file(PF) in the reverse order, in CL program?..

Answer / ravi kumar

POSDBF command can useful

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More RPG400 Interview Questions

HOW TO DELETE THE RECORD FROM MASTER FILE WHICH IS LINK BY ANOTHER TRASATION FILE WITH REFERTIAL INTYGRITY?

1 Answers   TCS,


i 'm new to as/400.in an interview i was asked this question.give a practical example for passing information or data through local data area. I know only that data area is an object used to store tiny bits of data or it can store one value at a time and it is used to store frequently changing values or datas.thats all i know about data area can any one tell me how local data area and user defined data area are used to pass data between jobs with a example or coding.thanks in advance.

2 Answers   CTS,


Suppose you have 3 members in a database file. How to read records from all the members without using CL (OVRDBF) i.e. Entire process should be handled exclusively in a RPG program?

7 Answers  


How do I link an existing logical file to it's Physical File without recompiling?

2 Answers  


what are the types of identifers

2 Answers   IBM,


What does Implicit Open means with respect to a file ? What about the Explicit Open?..what are the major differences between these two?

1 Answers   IBM,


How do you proceed in case your active AS400 session has got disconnected suddenly, how can you get back to your session ? Is it possible??

1 Answers  


what is the equivalent keyword for CHAIN opcode ??

7 Answers   TCS,


wat is meant by hidden field , why it is used?

4 Answers   Four soft,


1.Where we declare Variables in RPG/400,RPGIV,RPGILE.? 2.When do we use D-spec and I-spec in real time ?.what is difference between them?

1 Answers   HP,


where we give the MSGSFL in rpg400?

4 Answers  


1) How to define keyed file in CL pgm. 2) How can i read particular records in CL pgm from database file.

2 Answers  


Categories