AS400 Interview Questions and Answers

Define library?

A Library is a collection of objects.
Type *LIB that is used to group related object and to find objects by name.
A library is a directory to a group of objects.
The number of objects contained in a library and the number of libraries on the system are limited only by the amount of storage available.
All libraries are placed in the system library QSYS.
Libraries provide a method for organizing objects.
A library is an open-ended directory.
A library can never become ‘FULL’ as it has no finite size.
Libraries themselves are objects.
A library contain the object name, type, and the address..

Define source physical file?

Source physical file is a file which contains the sources of different types of objects. There can be up to 32767 members. Source physical file is an object. But the source member is not an object. When we compile the member, the object is created for that source. Command used to create source physical file is CRTSRCPF.

Define physical file?

It is a file, which physically occupies the portion of memory. A physical file contains one record format and one or more members. CRTPF command is used to create PF. Maximum number of fields included in a PF is 8000. Maximum no of key fields included is 120.

Define logical file?

Logical file does not occupies any memory space and logical file be derived from physical file. One or more logical file can be derived from a single physical file. A logical file can contain up to 32 record formats. It selects records dynamically. It cannot exist with out a physical file. We can filter the data with criteria by using select and omit command. CRTLF command is used to create a LF. It accesses the data by creating access path.
A logical file does not contain any data but provides the ‘VIEWS’ of the data to satisfy end-user’s needs.
There are two types:
1. Non join logical file
2. Join logical file

Difference between physical file and logical file?

Physical fileLogical file
Occupies the portion of memory. It’s containing data.Does not occupy any memory
space. Does not contain any data.
A physical file contains one
record format
A logical file can contain up to
32 record formats.
Can be exist even with out
LF
Can not exist with out PF
CRTPF command is used
to create such object
CRTLF command is used to
create such type object
If you delete a LF, the PF
can not be deleted
If you delete a LF, the PF can
not be deleted
The object type is PFThe object type is LF