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



suppose we have 10 members in physical file and i have to use 4 out of 10 so how can we read this in..

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

suppose we have 10 members in physical file and i have to use 4 out of 10 so how can we read this in..

Answer / vaibhav bhardwaj

Use MBRLIST at 'F' spec.

Is This Answer Correct ?    1 Yes 1 No

suppose we have 10 members in physical file and i have to use 4 out of 10 so how can we read this in..

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

Post New Answer

More RPG400 Interview Questions

parameters cannot be passed in which one???

4 Answers   CTS,


1. If my rpg program has a date field, What extra care I have to take while compiling that RPG program? 2. If the file is keyed and I have declared the file as well as Key list properly in my program. Still am getting an error message like "Chain/reade operation is not allowed" What may be the case?

6 Answers   Virtusa,


1.How to load Records of a Physical file(PF) in the reverse order, in CL program?

2 Answers   Cap Gemini,


I want to add 10 days in current date. how it is possible in CL program...?

11 Answers   CSC,


What are the values of NUM1 and NUM2 after executing the following code? CLONO1NO2NO3 Factorl÷÷+OpcdeFactor2+÷+ResultLenDHHiLoEq C MOVE *LOVAL NUM1 50 C MOVE *J-fIVAL NtJM2 52

2 Answers   Fiserv, IBM,






please help me answer to this question what is the difference between the binding and srvpgm in ilerpg?

4 Answers   HCL,


can i use unique key in LF

3 Answers   TCS,


what is the difference between the procedure and module in ILERPG?

4 Answers  


I have a Physical File name 'File1', which is present in two libraries named 'LIB1' & 'LIB2'. These 2 libraries are listed in the library list. Would like to access data from this file from these two libraries using RPG program. How to do this, any idea?

4 Answers  


I have some doubts on subfile----------- -----I wrote a prog on subfile to display the records. Every thing is clear but i defined a field called "opt" as input field in subfile record format from that input field i wish to enter into new screen called "EDIT" which i created it as a separate RCD in display file. i gave opt as 2 for edit just like in WRKMBRPDM screen please telll me the code and how can i code for it in RPG.

3 Answers  


In a particular program one file is used where override command is applied to a file, now this program calls another program where we want to use the same file but without override.How it can be done?

6 Answers   Hexaware,


two attributes which govern the excecution of a job>>>>??

2 Answers   CTS,


Categories