IBM AS-400 Interview Questions-->3
61. When would you prefer logical file than
OPNQRYF?
The physical file you are working with very
large, creating and using a logical file will allow an application to perform
faster than using an open query file.
Since access paths created by open query files are temporary,
applications that use an access path frequently will be more efficient using a
logical file, since the access path will not have to be rebuilt every time the
file is open.
62. What the purpose of the keywords FIFO,
LIFO, FCFO?
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.
63. What is the difference between regular
logical file and join logical file?
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.
64. Distinguish between logical file and
physical file?
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.
65. What is field reference file?
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.
66. What is the necessary keyword used in a
physical file to refer field definitions from the field reference file?
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)
67. What is the purpose of reorganizing the
physical file i. e. , RGZPFM?
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.
68. What is the purpose of CHGPF (Change
physical file) command?
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
69. What is purpose of declarative
statement DEFN?
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.
70. What is the purpose of SFLNXTCHG keyword in a subfile?
This 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.
71. What is the difference between Array
and Table?
Array: Array is stored any where in the
body of the input records.
Table: Table is stored at the beginning 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.
72. What are the different types of access
paths maintained on the file?
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 take place.
73. How can you identify End of file in CLP
program?
With the help of MONMSG MSGID (CPF0864) we
can identify end of file in clp program.
74. What is the difference between
production library and test library?
In debug mode, the file exists in
production library not allowed to update.
In the other hand, the file exists in test
library allowed to update.
75.
What is message subfile?
Message subfile is special file contains
multiple messages taken from program message queue and placed in message sub
file for display on the screen.
76. What are necessary keywords to code
message subfile?
SFLMSGRCD,
SFLMSGKEY, SFLPGMQ
77. What is the difference between SETON LR
and RETRN?
If you specify SETON LR, all the files used
in program will be closed.
If you specify RETRN, all the files used in
program will remain open.
78. When will you use OPEN and CLOSE
opcodes in RPG program?
If you specify the letter "U" at
columns 73 - 74 in a file description specification indicating that user
control on a file. Hence we have to explicitly
open and close the file in a program.
79. What is difference between fully
procedural file and primary file?
In primary file the records will be read
and processed from beginning to end.
This order is not changed.
In fully procedural file the records will
be read and processed in any order. The
logic flow is controlled by the opcodes
in RPG program.
80.What is the difference between
externally described file and program described file?
The field definitions and descriptions are
defined out side of the program in a externally described file.
The field definitions and descriptions are defined in side the program
in a program described file.
81. How many primary files allowed in a
program?
Only one primary file is allowed in
program.
82. How many secondary files allowed in a
program?
More than one secondary files are allowed
in a program.
83. What is the purpose of RTVMBRD command?
In order to access the information related
to member, we can RTVMBRD command.
84. Define an Interactive Job?
* A user requests a job.
* Job is created and job name, job attributes are assigned.
* Job is placed on a job queue.
* The sub system QINTER takes the job from the job queue and starts processing.
* The output generated by the interactive job is placed on the output
queue
* The spool sub system QSPL prints the output.
85.
How can you check the existence of object in a system?
With the help of CHKOBJ clp command, we can
find existence of object on the system.
The usage of command in clp is as follows:
CHKOBJ OBJ
(JBA001DT) OBJTYPE (*DTAARA)
MONMSG MSGID
(CPF9801) EXEC (DO)
CRTDTAARA DTAARA (QGPL/JBA001DT) TYPE (*CHAR) LEN (6) +
VALUE ('010196') TEXT ('The
last day that had job acct.+
data
extracted')
ENDDO
RTVDTAARA DTAARA (JBA001DT *ALL) RTNVAR (&FROMDATE)
The execution of above steps is listed below:
Steps
1: First it checks the data
area object on the system.
2: If the data area object not
found, the MONMSG command executes with the help of message identifier, next we can dynamically create the data
area.
3. If the data area object
found, control transfers to statement below ENDDO.It is always good CLP programming approach to check the object before
you rename, delete the objects on the system.
86. What is the purpose of FRCDTA (Force
Data) keyword?
Use this record-level keyword to
immediately display a record format, without waiting for the next input or
output/input operation.
87.What is the purpose of SFLFOLD and
SFLDROP keywords?
SFLFOLD:
To fold the second line of multiple line subfile.
SFLDROP:
To drop the second line of multiple line subfile.
88. What is the function of DSPATR (display
attributes) keyword?
Use this field level keyword in display
file to specify one or more display attributes for the field you are
defining. You can specify the DSPATR
keyword more than once for the same field, and you can specify more than one
attribute for the same keyword. The
following are valid attributes:
For
All Fields
Display
Attribute Meaning
BL Blinking field
HI High Intensity
RI Reverse Image
CS Column separator
ND Non Display
PC Position cursor
UL Underline
For
Input-Capable Fields Only
PR Protect contents
of field from input keying
MDT Set modified data tag when displayed
OID Operator
identification
SP Select by light
pen
89. What is the purpose of PUTOVR (Put with
explicit override) keyword?
Use this record-level keyword to permit the
override of either display file attributes or data contents of specific fields
within a record displayed on the work station device.
90. What is the purpose of OVRDTA (Override
Data) keyword?
Use this field level keyword with PUTOVR
keyword to override the existing the data contents of a field already on the
display.
91. What is the maximum number of record
formats in DSPF?
1024 (One thousand and twenty four)
92. What is the maximum number of fields
under a record format of physical file?
8000 (eight thousand)
93. What is the maximum number of
parameters allowed in RPG?
255 (Two hundred and fifty five)
94. What is the maximum number of
parameters allowed in CLP?
43 (Forty three)
95. What is the maximum number of
subroutines allowed in RPG?
254 (Two hundred and fifty four)
96. What is the maximum number of files
allowed in RPG?
50 (Fifty including eight printer file)
97. What is maximum number of Arrays
allowed in RPG?
250 (Two hundred and Fifty )
98. Where can you specify an indicator in
LOKUP operation?
In
‘EQ’ position.
99. What is a Member?
It is a subset of data records of a
physical file.
100. What is a Physical file?
Physical file nothing but a table contains
a only one record format in which we can describe the field definitions and
descriptions.
0 comments:
Post a Comment