AS-400 Interview Questions and Answers: Part IV

11/09/2009 No Comment

AS-400, AS400 iSeries Interview Questions and Answers.

Mainframe AS-400 Interview Questions and Answers.

What the purpose of the keywords FIFO, LIFO, FCFO?
Answer :
These keywords are used at file level. The purpose of each one is described below:
FIFO: The duplicate key records will retrieved in first in first out order.
LIFO: The duplicate key records will retrieved in last in first out order.
FCFO: The duplicate key records will retrieved in first changed first out order.

What is the difference between regular logical file and join logical file?
Answer :
Regular logical file contains more than one record format.
Record format name in regular logical file should be same based on the physical file.
Join logical file contains only one record format.
Record format name in join logical file should be different.
Through logical file we can made changes in physical file.
Through join logical file we can't made changes in physical file.

Distinguish between logical file and physical file?
Answer :
Physical file contains only one record format.
Logical file contains more than one record format.
Physical file contains actual data.
Logical file doesn't contains data but it provides view from the physical file.

What is field reference file?
Answer :
Field reference file is a file, which contains field definitions and descriptions, and it doesn't have member. Physical contains data derived by the field reference file.

What is the difference between access path and Dynamic select?
Answer :
Dynamic select occurs whenever the program reads file. But access path occurs before the file is read (but not necessarily). Because access path maintenance performed on the file.

Why would you prefer OPNQRYF than logical file?
Answer :
The main difference is : Logical file creates permanent object on the system. OPNQRYF creates temporary access path.

What is the necessary keyword used in a physical file to refer field definitions from the field reference file?
Answer :
REF which is a file level keyword is necessary to define at file level in a physical file. The syntax is as follows: REF(library name/name of the field reference file)

What is purpose of declarative statement DEFN?
Answer :
Depends on the factor 1 value it will do two things:
* If the factor1is *LIKE then DEFN opcode defines the new field based on the attributes old field. * If the factor 1 is *NAMVAR then DEFN opcodes defines the field as a data area.

What is the purpose of SFLNXTCHG keyword in a subfile?
Answer :
Which is a subfile record format keyword. If you perform read on the subfile, the
internal indicator MDT (modified data tag) is automatically set off by the system. If you again perform read on the
same records, records won't be read. Because internal indicator MDT would be off. Hence you should be explicitly set
on the MDT by SFLNXTCHG keyword.

What is the difference between Array and Table?
Answer :

Array: Array is stored any where in the body of the input records.
Table: Table is stored at the begining of the input records.
Array: We can access all the elements in array by specifying the array name.
Table: Only one table element can be accessed at a time.
Array: Array can be searched randomly.
Table: Table can be searched consecutively.

What are the different types of access paths maintained on the file?
Answer :

Immediate: All the access paths (open and close) associated with a file will be updated whenever changes made to a file.
Rebuild- only open access paths will update whenever changes made to the file. Rebuild takes place whenever remaining access paths will be open.
Delay : Rebuild will not takes place.

What is the purpose of reorganizing the physical file i. e. , RGZPFM?
Answer :
Even if you delete the records in a physical file through the program, still the space used by the deleted records not used by the other purpose. Hence using RGZPFM command we can compress the deleted records space.

What is the purpose of CHGPF (Change physical file) command?
Answer :
CHGPF command is used to change the attributes of a physical file. Attributes like
* Maximum number of members
* Member size
* Level check enforced
* Open data path is shared

How can you identify End of file in CLP program?
Answer :
With the help of MONMSG MSGID(CPF0864) we can identify end of file in clp program.

What is the difference between production library and test library ?
Answer :
In debug mode, the files exists in production library not allowed to update.
In the other hand, the files exists in test library allowed to update.
Related Posts

No comments :


Aired | The content is copyrighted and may not be reproduced on other websites. | Copyright © 2009-2016 | All Rights Reserved 2016

Contact Us | About Us | Privacy Policy and Disclaimer