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

Can a run time array be declare like below with no specified number of elements ? Is it possible ? DFLD_ARRAY 7 DIM() INZ(*blanks) What does this mean ? Does this mean that the number of array elements will be dynamically declared during run time ?

1 Answers   TCS,


how can you display specific subfile page on the screen in unequal subfile?

0 Answers   IBM,


suppose if we want to update the data in cl what we will do?

9 Answers  


what happens when sflsiz = sflpag? What are the advantages and disadvantages?

0 Answers   IBM,


what is flat file?

1 Answers   IBM,






Set on command is used for closed all opened files , initialize var and release resource , return cmd is used for return to calling program but my req. Is dnt close opened files and resource must released while doing transactions , how can i do this...?

0 Answers  


how to convert date format from one format to another i think in CL/400 its CVTDAT,Please tell in RPG/400 sir not in RPGILE

3 Answers   iGate,


There is a excel sheet having details of Old account number and new account number. I need to update these details in my AS400 files. i.e. all the records having old account number should be replaced with new account number. There can be 100 or 200 or 300 PFs...no fix files known. how can we do this?Solution should be performance oriented

3 Answers   Cap Gemini, IBM,


What will be your approach in going either for OPNQRYF or Logical files. Which one to go for?

2 Answers  


What is use of IMPORT and EXPORT in RPGLE ? What is activation Group ? What is Service Program ???? How to call another program in RPGLE ?

1 Answers  


How do you code file / field renames in ILE RPG?

4 Answers   Accenture, IBM,


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

4 Answers   Four soft,


Categories