Saturday 27 August 2011

AS-400 Interview Questions and Answers: Part VI

What is message subfile?
Ans:
Message subfile is special file contains multiple messages taken from program message queue and placed in message sub file for display on the screen.

What is the purpose of PUTOVR (Put with explicit override) keyword?
Ans:
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.

What are necessary keywords to code message subfile?
Ans:
SFLMSGRCD, SFLMSGKEY, SFLPGMQ

What is the difference between SETON LR and RETRN?
Ans:
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.

What is the purpose of OVRDTA (Override Data) keyword?
Ans:
Use this field level keyword with PUTOVR keyword to override the existing the data contents of a field already on the display.

What is the maximum number of record formats in DSPF?
Ans:
1024 (One thousand and twenty four)



What is the maximum number of fields under a record format of physical file?
Ans:
8000 (eight thousand)

What is the maximum number of parameters allowed in RPG?
Ans:
255 (Two hundred and fifty five)

What is the maximum number of parameters allowed in CLP?
Ans:
43 (Forty three)

What is the maximum number of subroutines allowed in RPG?
Ans:
254 (Two hundred and fifty four)

What is the maximum number of files allowed in RPG?
Ans:
50 (Fifty including eight printer file)

What is maximum number of Arrays allowed in RPG?
Ans:
250 (Two hundred and Fifty )

Where can you specify an indicator in LOKUP operation?
Ans
:In 'EQ' position.

What is a Member?
Ans:
It is a subset of data records of a physical file.

What is a Physical file?
Ans:
Physical file nothing but a table contains a only one record format in which we can describe the field definitions and descriptions.

What is a Logical file?
Ans:
It is nothing but a logical view provided by the physical file.

What is Join Logical file?
Ans:
Join logical file joins more than one file. The maximum of number of files allowed to join is 32 (thirty two).

What are the necessary keywords for the Join Logical file?
Ans
:JDFTVAL, JFILE, JOIN, JFLD, JREF.

What is a Non-join logical file?
Ans:
It only provides logical view based on the physical file. This is also called as regular logical file.

What is the necessary keyword for Non-join logical file?
Ans:
PFILE (which is record level keyword)

How many levels are there in a Physical file?
Ans:
Four levels. They are File level, Record level, Field level, Key field level.

What is the use of UNIQUE keyword and what level it is defined?
Ans
:It will avoid to enter duplicate key values. We have to define it in a file level.

At what level S,O are defined and what they will do?
Ans:
S, O are to defined at key field level. The purpose Select/Omit logic is depends on the criteria (condition) given at the key field level (At function entry) it selects and omits the records. The S/O is allowed in Logical file only.

What is the difference between Packed decimal and Zoned decimal?
Ans:
Packed decimal : One digit occupies 1 byte.
Zoned decimal : One digit occupies 2 bytes.

What is default data type (if you define decimals '0') in Physical file?
Ans:
Packed decimal

What is default data type for the fields(sub fields) defined in data structures in RPG?
Ans:
Zoned decimal

What is the use of JDFTVAL in join logical file?
Ans:
If you specify JDFTVAL at file level, even the primary file record does not match with secondary file record, the join takes place.

Is it possible to create a physical file without DDS?
Ans:
Yes. With the help of CRTPF we can achieve this. But we have to give record length.

What is a Keyed physical file?
Ans:
Defining a field as a key in physical file. Hence we can access records through the key field.

What is a composite key?
Ans:
Defining more than one key as a key field in physical file.

Source: aired.in

No comments:

Post a Comment