Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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

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

1 Answers   CSC,


WHAT IS MEANT BY SIGNATURE VAILOTION ERROR

1 Answers   IBM,


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,


use of PUTOVR,OVRDTA,KEEP keywords?

2 Answers   HCL,


1.Suppose my file has 10 fields and I want to make the 2nd field Zeros in all records. And assume I have millions of records and I dont want to read each record and update the desired field with 0. Any other way to do this in one step operation? 2. Assume my file has 100 records and I want to see only first 10 records. Is this possible through LF? 3.I have 3 jobs A B and C. I want to submit B after successful completion of A and want to submit C after successful completion of B. Without using job scheduler or job queue, how can i do that through CL program? 4.What is difference between Bind by copy and bind by reference?

4 Answers   Virtusa,


check existence of one record without using chain or read?

1 Answers   IBM,


what is the difference between SETON RT & RETURN?

5 Answers  


I am Submitting one job in batch that job calls three progams(PGMA, PGMB, PGMC). PGMB should be called after sucessfully completion of PGMA as like for PGMC also. So Can you please tell me how can we do that (without using data area)

2 Answers   CTS,


How to find d key field of a pf that doesn’t have source physical file?

2 Answers  


i)What is the command to lock a file in a program ii)2. Can you get a level check error in a CL program

6 Answers  


how we retrieve records without using key field (ex:name) from Physical File through RPG in as/400?

8 Answers  


A particular job executing on the iS is not behaving as expected and is operating in an environment in which it can be debugged. What commands would you use to debug and observe the program?

2 Answers   IBM,


Categories