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



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

Answer / 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

More RPG400 Interview Questions

I know whole thing ab't Arrays related to declaration..can anyone tell me what exactly use of array or anyone faced a situation where he found use of array must....

1 Answers  


during execution, an rpg/400 program automatically follows a sequence of operations for each record that is processed. The built-in program cycle includes the following logical steps.

0 Answers   IBM,


if there is a module object , how to find the program object for this module object.Assume the module object name and program object name is not same.

0 Answers  


what is the difference between the cpyf command crtdupobj command?

9 Answers   IBM,


Suppose we have one database file and it is used by 5 programs and in 3 program we have to add some records in datbase file s what is the impact on other program?

0 Answers  






1.Write code to read the records from a file and load an array of size 99? Make sure that you take care of all the error conditions?

2 Answers   HSBC,


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  


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  


What is the difference Return and InLr?

3 Answers  


Errors in Sql query will be in which state?

1 Answers  


What are the types of identifiers?

0 Answers  


how do you use commitment control in rpg?

0 Answers   IBM,


Categories