Wednesday, April 19, 2017

AS/400 Interview Questions Answers-section 6

AS/400 Interview Questions Answers-section 6



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.



When will you use OPEN and CLOSE opcodes in RPG program?
Ans: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.

What is difference between fully procedural file and primary file?
Ans:In primary file the records will be read and processed from begining 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.

What is the difference between externally described file and program described file?
Ans: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.

How many primary files allowed in a program?
Ans:Only one primary file is allowed in program.

How many secondary files allowed in a program?
Ans:More than one secondary files are allowed in a program.

What is the purpose of RTVMBRD command?
Ans:In order to access the information related to member, we can RTVMBRD command.

Define an Interactive Job?
Ans:* 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.

How can you check the existence of object in a system?
Ans:
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.

What is the purpose of FRCDTA (Force Data) keyword?
Ans:Use this record-level keyword to immediately display a record format, without waiting for the next input or output/input operation.

What is the purpose of SFLFOLD and SFLDROP keywords?
Ans:
SFLFOLD: To fold the second line of multiple line subfile.
SFLDROP: To drop the second line of multiple line subfile.

What is the function of DSPATR (display attributes) keyword?
Ans: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

Jobs in india

IT / Software Jobs,Core Technical Jobs, Government Jobs,Defence Jobs,Research Jobs,BPO Jobs,Bank Jobs, Tech Support Jobs,Health Care Job...