What is significance of a file designated as a Primary file
in Rpg400 program....also what's use of secoundry file

Answer Posted / abhishek bajpai

Primary File is the one which uses the RPG logic cycle. It
is defined in the F spec as:
FABPF1 IP E Disk
Here, ABPF1 is primary file.
For a primary file we cannot use any operations like Read,
Reade, Chain etc. It automatically reads from the 1st to
the last record and executes the program from the 1st to
the last line. A program can have only 1 primary file
defined.
Secondary file is exactly like the primary file in
functioning except that the program starts processing the
secondary file only when the EOF is found for primary file.
A program can have multiple secondary files defined in it.

Is This Answer Correct ?    4 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is *place and *auto keyword in prtf ?plz explain

2731


what is the use of sflnxtchg?

807


what is a rpg?

705


do you use message subfiles? What are the necessary keywords required coding a message subfile?

694


What is the difference between copybooks and subprocedures in as400?

814






what is data area and how it is used in rpg program ?

758


what is the difference between do while and do until?

714


how do I declare a minor?

718


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

1318


Explain mdt?

667


can you debug ile rpg program using isdb?

741


How Chain operation copies the record's data to the input buffer for the program?

1084


What is the diff bw PF/LF Name and their Record format name? what is restriction in record format then file name?

2521


can I touch the array during treatments?

762


What is file identifier where we can use?

652