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...


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

Answers were Sorted based on User's Feedback



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

Answer / uday bagdi

we can create the pre-run time array so that data-base file come in our rpg program then we read that pre-run time array with loop and increment the array indexing by 2

Is This Answer Correct ?    7 Yes 0 No

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

Answer / uday bagdai

1st set the pointer on the record(depend on rrn).after increase the rrn value by 2 (rrn=rrn+2).trape their on doweq loop so you can read alternative records.because (your pointer set on alternative records)

Is This Answer Correct ?    6 Yes 2 No

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

Answer / abhishek

The first method is not very full proof. Actually it is not
necessary that RRN is always sequential.

Suppose initally there are 100 records in a file and so
does the RRN starts from 1 for first record and 100 for
last record.

If 1 record is deleted from the file RRN remains unchaned
and in that case adding 2 may cause a problem if system
does not get Record at that RRN it will read the next
sequential.

Is This Answer Correct ?    4 Yes 0 No

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

Answer / ramrdy

hi uday,

can you write code for that program

Is This Answer Correct ?    1 Yes 0 No

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

Answer / sreedhar reddy

Simple way is just read a PF process 1st record, then for second read ignore it. It is simple like having two read operations, first is at start of the loop and second is at just before end of the loop.

Is This Answer Correct ?    1 Yes 1 No

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

Answer / mahalakshmi

All the records in a file is first loaded in to an datastructure and then incrementing the value of datastructure +2 then read the values in the datastructure.

Is This Answer Correct ?    0 Yes 0 No

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

Answer / ramu

how to fetch alternate records from data base(pf) using RPG? (ex. 1st and 3rd and 5th .......etc)
I need Rpg code not theory?

Is This Answer Correct ?    0 Yes 0 No

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

Answer / krishna

sample code for alternative record in a pf
fsamplepfif e disk
/free
dow not %eof(samplepf);
read samplepf;
If %eof(samplepf);
Leave;
endif;
---------;(doing some actions based on the conditions)
read samplepf;
enddo;
*inlr = *on;
/end-free

Is This Answer Correct ?    1 Yes 6 No

Post New Answer

More RPG400 Interview Questions

1.How you will find the program is batch or online in cl pgm? 2.How you will end the batch pgm when the job runs? write an logic? 3.In wich command the option *drop is used?

2 Answers   TCS,


use of PUTOVR,OVRDTA,KEEP keywords?

2 Answers   HCL,


while i am using the dspmsg command on comman line in Mocha am getting error like Not authorized to message queue message my messagequeue Name? can anybody help me how to change my message queue Am anable to see my messages in message queue

1 Answers  


What is the difference between copybooks and subprocedures in as400?

0 Answers  


If record-format name in an externally-described file has already been defined as a file-name.how to solve this?

2 Answers   CTS,


i want to perform uniqness on db file bt my db file nt hving key by useing rpgle.

3 Answers   HSBC,


suppose if we want to update the data in cl what we will do?

9 Answers  


What are different ways to pass data between programs and which one is the efficient way?

5 Answers  


How to update selected fields from pf without using update opcode. How to read all member in Rpg-3,without using any cl command?

8 Answers  


1.What is the Maximum field length we can declare in RLU?? 2. What is the difference if your designing RLU using DDS and using the option 19 for the RLU??

2 Answers  


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.

0 Answers  


Can we have a Physical file without any member ? Please let me know

12 Answers  


Categories