suppose we have 10 members in physical file and i have to use 4 out of 10 so how can we read this in RPG
Answers were Sorted based on User's Feedback
Answer / surya siram
Hi,
It is better to use "EXTMBR" with *all (EXTMBR(*all)) and then use file information data structure. EXTMBR(*ALL) is used to read the all the members of the file and file information data structure is used to know which member of the file is reading. Then by using this you should to skip the first 4 members and then read the remaining 6 members.
| Is This Answer Correct ? | 1 Yes | 0 No |
Answer / ravi kumar
hi,
You can use
FFILE1 IF E K DISK IGNORE(RECFMT9:RECFMT10)
here if file1 contains 10 members. I want use first 8 members then use ignore keyword as it is above.
FFILE1 IF E K DISK INCLUDE(RECFMT1:RECFMT2)
here if file1 contains 10 members. I want use first 2 members then use include keyword as it is above.
| Is This Answer Correct ? | 0 Yes | 2 No |
Can anybody tell me in which scenario we have to use SQLRPG .(Embeded SQL)....?
write an RPG program to calculate the marks of 5 students (A,B, C, D, E)in 3 different subjects (eng, math, sci) an display on the screen
Difference between RESET and CLEAR
How can i check the object existance in RPG program without using QCMDEXC command.
What is significance of a file designated as a Primary file in Rpg400 program....also what's use of secoundry file
Setps to create .csv file on IFS folder in AS/400( V4R3)....?
How to define data area in RPG program? In which scenario multi occurrence DS is use in AS400?
what is a rpg?
Thanks gagan for your answer,i'm new to as400,i don't know embedded sql in rpg.can you send me the coding for the below mentioned question in embedded sql rpg. how to retrieve particular field records from a physical file,say i have a physical file called 'employee' in it i have to retrieve the records of a field 'admin' present in pf 'employee' using rpg,but i should not use logical file or openquery file.
what is meant by record lock.how records are locked.what is the purpose of record lock.if records are locked what happens.how to find out which record is locked.
I know chain keyword retreive records randomly but how chain keyword exactly works internally????
what is overlay? how can we pass parameters in cl or rpg programing? how can we get data area value in cl or rpg programming?