AS-400,AS/400 Technical Interview Questions Answers: Part I

12/24/2009 No Comment

AS-400 Interview Questions Answers.

AS/400 Interview Questions, Mainframe AS400 Interview.

What are the three types of keywords associated with printer file ?
Answer : 
File level, Record level & Field level.

Difference between SFLRCDNBR and SFLNXTCHG
Answer : 
SFLRCDNBR will give the RRN of the First record displayed on the screen at a given time.
Whenever a record is changed on display file. An MDT is set ON. If an indicator is associated with SLFNXTCHG and it is SETON then READC will read only the changed record. And if the indicator is not associated and it is seton it READC reads all the records from sub-file

How can see logical file based on which physical file and vice versa
Answer : DSPDBR

How can u check no of records in a file
Answer : 
DSPFD

How do you compile RPGLE program
Answer : 
Either thrrough 15 or crtrpgmod

Is module executable
Answer : 
No You need to create an RPG prog to run the module.

How do you combine two record formats in RLU ?
Answer : 
Using CLC.

What are the different commands used in RLU ?
Answer : 
DR - Define Record, CLC - Change Line for Continuation, CLR - Change Line for Record, SD - Create Sample Data, VF - View Fields, NP - New Page, DC - Define Constants, DF - Define Fields, CF - Centre Fields & SP - Space Fields evenly.

What is the command used to invoke RLU ?
Answer : 
STRRLU.

What are different record spacing keywords in RLU ?
Answer : 
SKIPA, SKIPB, SPACEA & SPACEB.

Mandatory keywords of sub file
Answer : 
SFL, SFLCTL, SFLDSP, SFLSIZ, SFLPAG are the mandatory key words

What is procedure?
Answer : 
A procedure is the set of self-contained high level language statements that can perform a particular task and then returns to a caller

What is service program?
Answer : 
A Service Program is a collection of runnable procedures and available data items easily accessible by other ILE programs. In many respects it is similar to a subroutine library and procedure library.
A service program differs from a program in two ways:
It does not contain a program entry procedure. This means that you cannot call a service program using the CALL operation.
A service program is bound into a program or other service programs using binding by reference


What is LOKUP opcode?
Answer : 
Look’s for a particular element of an array

How many files, printer files you can describe in a RPG
Answer : 
50 files and 8 printers

How do handle file exception/error
Answer
: *INFDS ,*PSSR defining it in F spec

Distinguish between terminating a program through SETON LR and RETURN?
Answer : 
LR closes all the files used in the program and RETURN is used to return the control to the parent program.

How will you add a field to physical file already containing data?
Answer : 
With CPYF command and *NOCHK & *DROP

What are the uses of FACTOR1, FACTOR2 and RESULT field for the RPG operation code PARM?
Answer : 
It is add value of FACTOR1 to FACTOR2 or compare the value of FACTOR 2 with FACTOR1.

How will you find a string using PDM?
Answer :
By using FNDSTRPDM.

How will you search an array?
Answer 
: LOKUP

What are the different types of arrays?
Answer : 
Preruntime gets populated at the time input. Runtime gets populated at the time execution.Compile time gets populated at the time of compilation.

What is message file?
Answer : 
It is file which contain messages created by the user through which a user can display own message while validating.

What does DEFN do?
Answer : 
It is used to define a field based on the value specified in FACTOR 1.

What are two types of record are used in subfile?
Answer : 
SUBFILE RECORD FORMAT and SUBFILE CONTROL RECORD FORMAT.

What are DDS required for SUBFILE?
Answer : 
SUBFILE DISPLAY (SFLDSP) SUBFILE DISPLAY CONTROL (SFLDSPCTL) SUBFILE CLEAR (SFLCLR) SUBFILE SIZE (SFLSIZE) SUBFILE PAGE (SFLPAGE).

What is ELASTIC and NON ELASTIC SUBRILE?
Answer : 
When subfile size is greater then subfile page size it is called elastic subfile and when subfile size is equal to subfile page size it is called non-elastic subfile.

What is SFLINZ and SFLRNA?
Answer : 
SFLINZ stands for subfile initialize. It initialized all the character field as blanks and numeric fields as zeros. SFLRNA stands for subfile record not active (It means records are there in the subfile but active).

Can you display a empty subfile?
Answer : 
Yes by using the keyword SFLINZ and SFLRNA.

Why do we use READC? What is SFLNXTCHG?
Answer 
: READC is to read those records which have changed in the subfile. If you validate a record in subfile on some condition all the invalid records can display in reverse image. The first which have changed and made valid and released still displaying in reverse image. The records have read even it has not been changed due to SFLNXTCHG.

How do you read changed records backward in subfile?
Answer : 
NOT POSSIBLE.

How you will find an error which is not in the first page of the subfile without using ROLLDOWN key?
Answer : By using keyword SFLRCDNBR.

What is SFLROLVAL?
Answer : 
By using this keyword you can tell system to roll on of records when the user presses ROLLDOWN key (For this you define a hidden of 4 byte).

How you will know whether you are in SFLDROP or SFLFOLD mode?
Answer : 
By using the keyword SFLMODE.

How you get the relative record in a subfile in which cursor is located?
Answer : 
By using the keyword SFLCUSRRN (Subfile cursor relative record number).

What is QCMDEXC?
Answer : 
It is used to execute a single CL command within the RPG program.

What is OPNQRYF, MONMSG commands
Answer 
: It is Dynamically creation of access path, and it can have resultant fields i.e. if the expression is A = B + C then B and C are from the file while A is defined in OPNQRYF. We can divert the output of command to an OUTFILE. Command associated with OPNQRYF is CPYFRMQRYF to save the output permanently

It is a CL command to monitor and error/exception message so that in case of an error a dump is avoided and the control is in program. It is also used to monitor user message.
Related Posts


No comments :

 

Aired | The content is copyrighted and may not be reproduced on other websites. | Copyright © 2009-2016 | All Rights Reserved 2016

Contact Us | About Us | Privacy Policy and Disclaimer