AS-400 Interview Questions and Answers: Part V

Aired Consulting 11/12/2009 No Comment

IBM AS400 RPG Interview Questions Answers and Explanations.

When will you use OPEN and CLOSE opcodes in RPG program?
Answer :
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?
Answer :
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?
Answer :
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?
Answer :
Only one primary file is allowed in program.

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

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

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

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?
Answer :
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?
Answer :

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?
Answer :
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 FieldsDisplay ,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
Related Posts

No comments:

 

Aired | Copyright © 2009-2014| All Rights Reserved 2014 | Privacy Policy and Disclaimer

Contact Us | About Us