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 change the name of physical members Dynamically?

1 Answers  


Anyone help me for the below question:- If problem/error occur in *PSSR subroutine,how should I handel it in RPG program.

1 Answers  


what is the equivalent keyword for CHAIN opcode ??

7 Answers   TCS,


What are the commands that can be executed in CLP but not in RPG? Why?

1 Answers   CSC,


i have 1000 records in pf.what are all the ways to read a particular name records in rpg?? ie.. in pf i have a name called demo appeared around 52 times hw will we read this particular records in rpg/400?.

11 Answers   IBM,


1.Can any body share me about thease opcodes with example please.Im new for AS/400.Could u please tell me in real senario? 1.TESTN, 2.EVAL 3.EVALR, TIME, 4.MONITOR 5. ENDMON 6.ON-ERROR 7.COMMIT ROLLBACK?

1 Answers   CSC,


1.What is the Maximum field length we can declare in RLU?? 2. What is the difference if your designing RLU using DDS and using the option 19 for the RLU??

2 Answers  


Some times While checking MSGW for object / member / record locks ,I have seen it's locked by itself ...? How it happen and what action we need to perform if job is updating / writing a record....?

6 Answers   HSBC,


We have job which is running as batch. It takes atleast 06 hours to complete tht job. But I wanna do tht job with in 3 hours?

0 Answers  


what is importance of 'MAPFLD' IN OPNQRYF FILE ?

2 Answers  


Can anybody tell me that why we use option(*nodebugio)in H- Spec?

3 Answers  


Hi,Please give me complete code with this logic. The question is how to read the records from a file with load an array of size with error condition? (The logic is Z-Add 0 IDX *LOVAL SETLL FILE READ FILE 99 *IN9 DOWEQ *OFF IDX ANDLT 99 ADD 1 IDX MOVE FIELD ARR,IDX READ FILE 99 ENDDO)please give me complete code with explanation?

1 Answers  


Categories