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

what do you mean by SESSION/DEVOCE ERROR?

1 Answers   IBM,


what are the array operations?

1 Answers   IBM,


How can we receive values from a called procedure in RPG?

1 Answers  


Im traying to get out put of this below mention simple logic code.But im geting out of different.(im trying with my laptop trhough my company server. DCL &FIELD1 *CHAR 10 VALUE('TCS AS/400') DCL &FIELD2 *CHAR 10 CHGVAR(%SST(&FIELD2 1 10))(%SST(&FIELD1 10 1) Can you tell me the value of field2 after excuted of CHGVAR command.

2 Answers  


How to read alternative records in a pf by using rpg?

8 Answers   IBM,






how do I play {insert rpg system here}?

0 Answers   IBM,


Assume 2 users are using the same file and first user updates some record in the file. Will the 2nd user will be able to see the updated record or not?

0 Answers  


Can someone tell me tell me what is meant by message wait...?

1 Answers  


Q:Hi all,i want accurate answer with code using in built functions.please sent me code as soon as posible. I have program nmed PGM1 which '' RETRIEVE Current production date''should correctly default the production date for the user who is issuing raw materials to the manufacturing.The production date can be different from the celendra date. However, the program does not make the correct adjustment for all manufacturing plants. there is a parameter which determines the production start time e.g. 07:00 if the system time precedes this,the program subtracts one from the celendra day.This work fine when the celendar day starts after production day as it does in England,the system should be adding one to the celendar day during the overlap. unfortunately the program was desined to assumed the celendar day always starts before the production day. Change required in the program: Change the PROGRAM PGM1 to use the new parrameter to decide whether to add or subtract 1 from the celendar day when determining the production date.

0 Answers   TCS,


2. Which of the following statement(s) explains the difference(s) between the /INCLUDE and ICOPY directives? a.) No difference, they function the same b.) ACOPY cannot be used as a conditional directive c.) IINCLUDE files cannot contain embedded SQL d.) Nesting /TNCLUDE directives is not allowed

2 Answers   IBM,


1. Which Built-In-Function will you use to achieve the following functionality? CLONO1NO2NO3 Factorl÷÷+OpcdeFactor2++÷ResultLenDHHiLoEq C QTY IFLT *ZERO C QTY MULT -1 QTY C ENDIF a) %ABS b) %TRIM c) %TRIMS d) %UNS

3 Answers   IBM,


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

1 Answers   CSC,


Categories