How can read PF in reverse order (end to start) in CL pgm..
Answer Posted / sumit gupta
We can not read a pf in reverse order in CL/CLLE. As POSDBF
only set the pointer to *START or *END and once you set it
to *END and then do the read operation, end of file will
reach and there is not such condition(MONMSG) through which
you can read the pf in reverse order.
you can read a physical file in DESENDING ORDER. You can
first sort the physical file in decending order through
OPNQRYF using KEYFLD. This will sort your PF in decending
order based on your key field and then do the RCVF on this
file.
But for this you first need to do OVRDBF on the file.
| Is This Answer Correct ? | 9 Yes | 7 No |
Post New Answer View All Answers
Suppose we have one database file and it is used by 5 programs and in 3 program we have to add some records in datbase file s what is the impact on other program?
how do you use commitment control in rpg?
what is kids-rpg?
What is a record lock error?
How to write record if no field or the field are different in physical file in rpgle ?
do you use message subfiles? What are the necessary keywords required coding a message subfile?
How Chain operation copies the record's data to the input buffer for the program?
How to handle duplicate error handling in RPG?
How to create a login screen using a command instead of display file.... intention is to get a password field on a command..... how do you achieve this...
what is the difference between do while and do until?
How to select highest score of each subject or how to select highest income of every month?
can anybody help me to solve this problem. the program that i m checking display error message saying "Record format for file AJDSPFFD does not match model file and decimal error. how to solve this problem. The AJDSPFFD is snapshot the AJTLOG that is the audit trail list.
are there any useful c runtime apis that I can call from rpg iv?
Please tell me how to read the records from a file with load an array of size with error conditions(The logic answer for this question is ARR is array of 99 elements Z-ADD 0 IDX *LOVAL SETLL FILE READ FILE 99 *IN99 DOWEQ *OFF IDX ANDLT 99 ADD 1 IDX MOVE FIELD ARR,IDX READ FILE 99 ENDDO).So,Please give me the complete of this code.
what is a rpg?