Mainframe AS-400 Interview Questions Part 1
[Link] is the maximum number of records you can specify in a display file?
A.1024
[Link] can a screen field that has changed since the last output operation be detected ?
[Link] the MDT (modified data tag) attribute to the field, to detect whether field has been changed as a result of
user input.
[Link] would be the effect on the field where reverse image, underline and highlight display attributes were active?
[Link] result is same as if you had specified ND.
[Link] is the use of DSPATR(MDT) keyword?
[Link] on the modified Data Tag of the field. The Data Tag detect whether the field has been changed as a result of
user input.
[Link] DSPATR(PC) and CSRLOC were specified for a format, which keyword would have priority?
[Link] gains priority.
[Link] error messages as a result of a COMP, RANGE or VALUES keyword be overridden?
[Link], through CHKMSGID keyword.
[Link] the purpose of OVRDTA, OVRATA keywords?
A.
[Link] keyword (field or record level) can be used to override the existing data contents of a field or record
already on the display.
[Link] keyword (field or record level) can be used to override the existing display attributes of a field or record
already on the display.
[Link] can a message from a message file appear as a constant on the screen?
[Link] using MSGCON (message constant) keyword.
[Link] conjunction with what other keyword must OVRDTA and OVRATA be used?
[Link] keyword must used.
[Link] is the purpose of the INDARA keyword?
[Link] File-level keyword is used to remove option and response indicators from the buffer and places them in 99-
byte separate indicator area.
[Link] the purpose of KEEP and ASSUME keywords?
[Link]: Keep the display from being deleted when the display file is [Link]: It is used to specify that the
OS/400 program is to assume that this record is already shown on the display when this file is opened.
[Link] the use of DFTWRT display keyword?
[Link] records will be displayed until there is any I/O operation.
[Link] is the purpose of FRCDTA keyword ?
[Link] display a record format without waiting for the next I/O operation.
[Link] keyword must be used with PROTECT keyword?
[Link]
[Link] is Subfile?
[Link] is group of records of same record format and can be read from or write to the display in a single
operation.
[Link] are all the contents of subfile?
[Link] Record Format, Subfile Control Record Format, Relative Record Number, Subfile Record Number, Associated
Subfile Keywords.
[Link] are the two record formats a subfile contain ?
[Link] record forma (SFL), and subfile control record forma (SFLCTL).
[Link] is SFLPAG and SFLSIZ ?
A.
[Link] : it is an attribute which specifies the number of records that can be displayed in a screen.
[Link] : it is an attribute which specifies the number of records can be stored in subfile.
[Link] is the maximum number of subfiles that can be specified in a display file,
A.512
[Link] number of subfiles that can Defined in a RPG program for one display file is
A.24
[Link] number of subfiles that can be active for a single file is?
A.12
[Link] more than one subfile record be displayed on one line?
[Link], by using SFLLIN keyword.
[Link] do you specify the number of records to roll in a subfile?
[Link] SFLROLVAL keyword in DDS along with number, which specifies the number of records to scroll at a time.
[Link] will you display a particular page in subfile?
[Link] a valid relative record number (RRN) in the field specified using SFLRCDNBR keyword in DDS.
[Link] to pick up the changed records every time in a subfile after the first change made?
[Link] SFLNXTCHG keyword indicator and update the subfile record.
[Link] is the use of SFLEND keyword?
[Link] specifying this keyword, the Bottom/More message could be displayed at end of screen.
[Link] to toggle between single line and Multi - line display of a particular record in a subfile?
[Link] SFLDROP keyword.
[Link] the difference between defining Subfile and Message-subfile?
[Link] record is defined by SFL keyword, where as Message subfile is defined by SFLMSG keyword.
[Link] are the different types of variables available in CL?
[Link], CHAR, LGL
[Link] do you pass parameters in CL?
[Link] PARM keyword.
[Link] are the valid user defined data area types?
[Link], NUMERIC and LOGICAL
[Link] is Multi-format logical file?
[Link] which uses fields from two or more physical files.
[Link] is the Select and Omit criteria in logical file?
[Link] is used to specify rules for the Selection/Omission of records from a Physical File.
[Link] fields be concatenated INa logical file level?
[Link]. by using CONCAT keyword
[Link] would the ALL keyword be used?
[Link] with Select or Omit, to select/omit records.
What are the different types of keywords in display files?
[Link] level, Record format level, Field level
[Link] is difference between CAT, TCAT, BCAT?
A.
[Link] - Concatenate two variables or constants into one continuous string.
[Link] - Truncates all trailing blanks in the first character string, one blank is inserted, then the two character
strings are concatenated.
[Link] - Truncates all trailing blanks in the first character string, the two character strings are concatenated.
[Link] are the different types of messages in CL?
[Link] message, Break message, Program message, User message
[Link] to trap errors in CL?
[Link] using Monitor Message Command (MONMSG)
[Link] is the maximum length of a variable name in CL?
[Link] 11 characters (including '&')
[Link] are the limitations of CL (compare to RPG) ?
A.
[Link] can not use CL program to ADD or UPDATE records in database files.
[Link] Printer or ICF files.
[Link] Program described files.
[Link] the concept of subfile (to display more than one record), but a single output message subfile is a special type
of subfile that is supported well in CL.
[Link] subroutines.
[Link] cannot declare more than one object (file) in a CL programme
Mainframe AS-400 Interview Questions Part 2
What is the difference between SFLCLR and SFLINZ?
Ans:SFLCLR : It clears the subfile. SFLINZ : First it clears the subfile and initiliazing the numeric
variables with zeros and alphanumeric variables with characters.
Define the purpose/use for SFLRNA?
Ans:Using this,
we can make specified subfile record format inactive.
What is the purpose of the following
I UDS
I 1 60ORDER#
I 7 90LINE#
Ans:The purpose is to define the variables in I-Spec and these are further used in C-spec. Where as ‘U’
indicates data area data structure? The above code is used to update the data area value through the
program. The letter "U" indicates that the defined data structure is a data area data structure.
What is the purpose of the following?
A CSRLOC (F1ROW F1COL)
Ans:Using this record level keyword, you can specify cursor location on an output operation to the record
format you are defining. The program sends output after setting the cursor location.
Define what the operation will do, the purpose of the result field and the purpose of *IN66?
HI LO EQ
C CALL 'CVTDAT' DTPRM 66
Ans:The above statement causes, call the program and pass the parameter.
Define each of the following operation codes
a. READ To read the records sequentially.
b. READE To read the equal key records
c. READP To read the previous records
d. READC To read the records from the workstation file (Subfile).
e. REDEP To read the equal key previous records.
Define the purpose of the following code (If you know, how would this be written in RPG ILE)
HI LO EQ
C *IN66 DOUEQ *OFF
C KEY1 CHAIN FILEA 90 66
C 66 CALL PGM1 PRM
C ENDDO
Ans:Whenever the indicator *IN66 becomes *OFF, the control transfers after ENDDO statement.
Otherwise, it reads the records from the data base file based on indicator specified on HI position. If the
specified indicator on LO position becomes *OFF, then only CALL statement will execute.
How do you set the keywords SFLSIZ and SFLPAG if you want the subfile to dynamically expand?
Ans:SFLSIZ > SFLPAG.
When would you use or not use this approach?
Ans:It is the most desirable method in building a real time applications. We can use at all the times.
How can you detect and handle a record lock situation?
Ans:If you try to read the locked record, we can get system defined message i. e. , the program will
ended abnormally. With the help of File Information Data Structure we can handle record lock situation.
Generally it will happen, when the same file of type " U" used in different programs.
How can you detect overflow for a print program that prints multiple lines per cycle?
Ans:You specify the indicators OA through OG and OV in 33 - 34 columns in a printer file. This indicator
automatically set on whenever overflow occurs on a type of page.
Define a shared access path?
Ans:To share the open data path by various programs in a same job.
What is the difference between array and a multiple occurrence data structure?
Ans:The values stored in array don’t vary. In the other hand, we can store the
Different values in same variables at various stages.
What is *INZSR used for?
Ans:It is special type of RPG/400 subroutine, which is executed automatically
at beginning of the program. It is a good place to code initializes the variables.
How can you execute a command from within an RPG program without calling a CLP program?
Ans:By calling QCMDEXC application program interface we can execute a CL command with in an RPG
program.
What is the purpose of the "N" in the following calculation specification?
Ans:C KEY CHAIN FILE N [Link] you specify 'N' in 53rd position, the record will not be locked if you try to
read the locked record. It is a way of avoiding the record lock.
How do you pass parameters in CL?
Ans:Using PARM keyword.
What are the valid user defined data area types?
Ans:CHAR, NUMERIC and LOGICAL
What is Multi-format logical file?
Ans:Logical which uses fields from two or more physical files.
What is the Select and Omit criteria in logical file?
Ans:This is used to specify rules for the Selection/Omission of records from a Physical File.
Can fields be concatenated INa logical file level?
Ans:Yes. by using CONCAT keyword
When would the ALL keyword be used?
Ans:Use with Select or Omit, to select/omit records.
What are the different types of keywords in display files?
Ans:File level, Record format level, Field level
What is difference between CAT, TCAT, BCAT?
Ans:
CAT - Concatenate two variables or constants into one continuous string.
BCAT - Truncates all trailing blanks in the first character string, one blank is inserted, then the two
character strings
are concatenated.
TCAT - Truncates all trailing blanks in the first character string, the two character strings
are concatenated.
What are the different types of messages in CL?
Ans:Immediate message, Break message, Program message, User message
How to trap errors in CL?
Ans:By using Monitor Message Command (MONMSG)
What is the maximum length of a variable name in CL?
Ans:Maximum 11 characters (including '&')
What are the limitations of CL (compare to RPG) ?
Ans:You can not use CL program to ADD or UPDATE records in database files.
Use Printer or ICF files.
Use Program described files.
Use the concept of subfile (to display more than one record), but a single output message subfile is a
special type of
subfile that is supported well in CL.
Use subroutines.
You cannot declare more than one object (file) in a CL programme.
What is the use of Header Specification in RPG/400?
Ans:It identifies by H in column 6, provides informaion about generating and running programs.
When will DUMP and DEBUG opcodes be ignored?
Ans:If blank is specified in position 15 of H specs.
Specify different indicators used in RPG?
Ans:Overflow indicators
Record Identifying Indicators
Field Indicators
Resulting Indicators
Control Level Indicators
What are Control level indicators?
Ans:L1 to L9 used to identify certain fields on control fields and then used to condition which operations
are to be processed at detail or total calculation or output time.
What is the use of E specification in RPG?
Ans:Extension Specs describes all record address files, arrays and tables.
What is the use of L specs in RPG?
Ans:Line counter specification can be used to describe printer file to indicate the length of the form and
number of lines per page.
In which specification the report layout can be defined?
Ans:O Specification.
How many files can be defined in F specs?
Ans:50
How many printer files can be defined in F specs ?
Ans:8
Which are the four keywords supported by Program Status Data Structure?
Ans:*STATUS, *PARM, *ROUTINE & *PROGRAM
Which are the String Manipulation Opcodes?
Ans:TESTN, SCAN, CHECK, CHECKR, SUBST & CAT
DB2 is a type of Database?
Ans:It is an Integrated RDBMS.
An access path may be in which sequence?
Ans:It can be in Arrival & Keyed sequence
To change constant field defined on RLU screen which field level keyword should be used?
Ans:DFT (Default)
Space & Skip are which level keywords?
Ans:Field & Record
A Join Logical File has how many Record formats?
Ans:1
A Multiple format Logical File is also known as?
Ans:Union File
How does Union file maintains Record formats?
Ans:1 Record format for each PF
Records can be Read/Update/Deleted with which file?
Ans:Simple Logical File & Physical File.
Which type of object is used in DB2/400?
Ans:*FILE
What is SQL?
Ans:SQL is an interface for programming language.
File level entry for a PF can be?
Ans:UNIQUE & FIFO
What is the command to create FRF?
Ans:CRTPF
Join Logical File displays data from how many files?
2 or more PF’s
A Query can be displayed without saving it?
Ans:True
Which are the Query selection criteria, which can be given in a Query?
Ans:LIST
To add a file to the ‘File Selection’ option of a Query, the function key to be pressed is?
Ans:F9
A query can be run in which mode?
Ans:Batch & Interactive
What is the values SQLCOD when there is an error in fetching the records specified in the select
statement?
Ans:-ve value
A file cannot have more than 1 unique key?
Ans:False
DLCOBJ command is mandatory for removing lock on any object?
Ans:False
What is a Journal?
Ans:A Journal is an object used primarily to record changes to data in a PF.
Which are the DB2 tools to protect Integrity of the database?
Ans:Journaling & Commitment Control, Referential Integrity Embedded SQL & Object/Record Locks.
Mainframe AS-400 Interview Questions Part 3
[Link] is the Function of PDM?
[Link] tool for copying, deleting, scanning, changing & creating source files.
[Link] is the function of SEU ?
A.A utility for editing programming language source code.
[Link] can the user implicitly open and close the files in RPG program ?
[Link] UC in position 71-72 of F specs.
Use OPEN and CLOSE opcodes in RPG program to open and close files.
[Link] many parameters can be defined in a RPG program. ?
A.255
[Link] is File Information Data Structure?
[Link] Information Data structure (INFDS) can be defined for each file to make file exception/error
information available to the program. A file information data structure contains predefined subfields
that identify: the name of the file for which the exception/error occurred. the record being processed
when the exception/error occurred or the record that caused the exception/error. The last operation
being processed when the exception/error
[Link] status code. The RPG routine in which the exception/error occurred.
[Link] is the use of SDA ?
[Link] Design Aid is used to create display files interactively.
[Link] will you use OPEN and CLOSE opcodes in RPG program?
[Link] 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.
[Link] is difference between fully procedural file and primary file?
[Link] 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.
[Link] is the difference between externally described file and program described file?
[Link] 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.
[Link] many primary files allowed in a program?
[Link] one primary file is allowed in program.
[Link] many secondary files allowed in a program?
[Link] than one secondary files are allowed in a program.
[Link] is the purpose of RTVMBRD command?
[Link] order to access the information related to member, we can RTVMBRD command.
[Link] an Interactive Job?
A.
1.A user requests a job.
[Link] is created and job name, job attributes are assigned.
[Link] is placed on a job queue.
[Link] sub system QINTER takes the job from the job queue and starts processing.
[Link] output generated by the interactive job is placed on the output queue
[Link] spool sub system QSPL prints the output.
[Link] can you check the existence of object in a system?
A.
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.
[Link] is the purpose of FRCDTA (Force Data) keyword?
[Link] this record-level keyword to immediately display a record format, without waiting for the next
input or output/input operation.
[Link] is the purpose of SFLFOLD and SFLDROP keywords?
A.
[Link]: To fold the second line of multiple line subfile.
[Link]: To drop the second line of multiple line subfile.
[Link] is the function of DSPATR (display attributes) keyword?
[Link] 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.
[Link] a shared access path?
[Link] share the open data path by various programs in a same job.
[Link] is the difference between array and a multiple occurrence data structure?
[Link] values stored in array don’t vary. In the other hand, we can store the different values in same
variables at various stages.
[Link] is *INZSR used for?
[Link] is special type of RPG/400 subroutine, which is executed automatically at beginning of the
[Link] is a good place to code initializes the variables.
[Link] can you execute a command from within an RPG program without calling a CLP program?
[Link] calling QCMDEXC application program interface we can execute a CL command with in an RPG
program.
[Link] is the purpose of the "N" in the following calculation specification?
A.C KEY CHAIN FILE N [Link] you specify 'N' in 53rd position, the record will not be locked if you try to read
the locked record. It is a way of avoiding the record lock.
[Link] of the following operations does NOT zero the field FLDA defined as 4,0?
A.
C MOVE *ZEROS FLDA
C Z-ADD *ZEROS FLDA
C Z-ADD 0 FLDA
C MOVE *ALL'0' FLDA
C SUB FLDA FLDA
C MOVE '0000' FLDA
C CLEAR FLDA
C MOVE *BLANKS FLDA
The last instruction does NOT zero the field FLDA.
[Link] can you check for a records existence without causing and I/O (CHAIN/READ)?
[Link] the help of File Information Data Structure, we can check existence of records in a physical file.
The code is described below:
In File description continuation line (IPFK),
KINFDS RCDS
IRCDS DS
I *RECORD #RCDS
with the above code we can check the existence of records in a file without causing I/O operation.
Mainframe AS-400 Interview Questions Part 4
What the purpose of the keywords FIFO, LIFO, FCFO?
Ans: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.
What is the difference between regular logical file and join logical file?
Ans: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.
Distinguish between logical file and physical file?
Ans: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.
What is field reference file?
Ans: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.
What is the difference between access path and Dynamic select?
Ans:Dynamic select occurs whenever the program reads file. But access path occurs before the file is
read (but not necessarily). Because access path maintenance performed on the file.
Why would you prefer OPNQRYF than logical file?
Ans:The main difference is : Logical file creates permanent object on the system. OPNQRYF creates
temporary access path.
What is the necessary keyword used in a physical file to refer field definitions from the field
reference file?
Ans: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)
What is purpose of declarative statement DEFN?
Ans: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.
What is the purpose of SFLNXTCHG keyword in a subfile?
Ans:Which 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.
What is the difference between Array and Table?
Ans:
Array: Array is stored any where in the body of the input records.
Table: Table is stored at the begining 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.
What are the different types of access paths maintained on the file?
Ans:
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 takes place.
What is the purpose of reorganizing the physical file i. e. , RGZPFM?
Ans: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.
What is the purpose of CHGPF (Change physical file) command?
Ans: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
How can you identify End of file in CLP program?
Ans:With the help of MONMSG MSGID(CPF0864) we can identify end of file in clp program.
What is the difference between production library and test library ?
Ans:In debug mode, the files exists in production library not allowed to update.
In the other hand, the files exists in test library allowed to update.
Nov 13 Mainframe AS-400 Interview Questions Part 5
2009
Posted by admin in Untagged
[Link] would you design the process for a nightly, high volume check producing process that needs to select only
records that are flagged to be processed?
[Link] the help of OPNQRYF Clp command, we can select the records from the data base file. The process involves
following steps:
Steps:
[Link] with SHARE (*YES)
[Link]
[Link] the program
[Link]
[Link]
[Link] would you join 3 separate fields, a first name, middle initial and last name together as 1 field with proper
spacing?
[Link] can describe in either RPG and/or RPG ILE (Integrated Language Environment)
MOVE 'Dr. ' FNAME 3
MOVE 'JOHN' MNAME 4
MOVE 'WATSON' LNAME 6
FNAME CAT MNAME: 1 VAR1 8
VAR1 CAT LNAME:1 VAR2 15
DSPLY VAR2
MOVE *ON *INLR
[Link] PGMA calls PGMB for the first time PGMB executes the *INZSR. PGMB uses the RETRN operation to return to
PGMA. When PGMA call PGMB the second time is the *INZSR executed?
[Link] you specify RETRN in called program, the *INZSR will not execute again.
[Link] 2 ways to convert a date from YYMMDD to MMDDYY (MULT operation not acceptable)
A.
CVTDAT DATE() RTNVAR( ) FROMFMT( ) TOFMT( )
Source code is required to convert from one date format to another date format.
The source code in CLP is given below:
PGM
DCL VAR(&VAR1) LENGTH(6) TYPE(*CHAR) VALUE('YYMMDD')
DCL VAR(&RCVD) LENGTH(6) TYPE(*CHAR)
DCL VAR(&VAR2) LENGTH(4) TYPE(*CHAR)
DCL VAR(&VAR3) LENGTH(2) TYPE(*CHAR)
CHGVAR VAR(&VAR2) VALUE(%SST(&VAR1 3 4))
CHGVAR VAR(&VAR3) VALUE(%SST(&VAR1 1 2))
CHGVAR VAR(&RCVD) VALUE(&VAR2 *CAT &VAR3)
SNDMSG MSG(&RCVD) TOUSR(*USRPRF)
ENDPGM
[Link] the value of the result field
a. Cost = $110. 00
b. Tax = 20%
c. MarkUp= 05%
d. Sale = 10%
A.C Eval TotalCost = ((Cost * MarkUp) * Tax)) - Sale
= 1. 0$
40. Define the purpose of Factor 1 the Operation Code and *IN15 in following code
HI LO EQ
C *YMD Test(D) yymmddDate 15
If the factor 1 value matches with factor2 value, the indicator specified in EQ comes *ON.
[Link] the function of SETLL operation in RPG language?
[Link] SETLL operation positions a file at the next record with a key or relative record number that is greater than or
equal to key or relative record number specified in factor1.
[Link] the function of SETGT operation in RPG language?
[Link] SETGT operation positions a file at the next record with a key or relative record number that is greater than
key or relative record number specified in factor 1.
[Link] is the purpose of Level Check parameter in a Physical file?
[Link] whether the level identifiers of the record formats in the physical file are checked when the file is opened
by the program.
[Link] a Job Queue?
[Link] queues are queues of batch jobs waiting to be processed.
[Link] a Output Queue?
[Link] queues are queues of jobs waiting to be printed.
[Link] is the function of CPYSPLF command?
[Link] copies the spooled file to the data base file.
[Link] is the function of CPYF command?
[Link] copy the data from the one file to another.
[Link] is the function of CRTDUPOBJ command?
[Link] create the replica from the original object.
[Link] Subsystem?
[Link] is nothing but it provides specialized environment to complete the execution of jobs.
[Link] are different types of Substems?
[Link], QINTER, QSPL, QCMN, QCTL, QBASE.
[Link] a Batch Job?
A.
1.A user request the job.
[Link] job is created (job name is assigned, job attributes are allocated)
[Link] job is placed on a job queue
[Link] sub system QBATCH takes the job from job queue and starts it.
[Link] generated by the batch job is placed on an output queue.
[Link] spool sub system prints the output on the output queue.
[Link] about Query/400?
[Link]/400 is a licensed program that uses a query to analyze and select the information contained in the data base
files and create a query report.
A query report can be:
[Link] on a workstation (screen)
[Link]
[Link] in another database file.
[Link] is the CLP command to access a Query/400?
[Link]
[Link] of Overrides?
[Link] basic purpose of Overrides is to temporarily change the attributes of a file. So you don't have to create
permanent files for every combination of attributes your application might need. Overrides gives you the flexibility to
use existing model files and dynamically change their attributes.
[Link] Data Structure?
[Link] structures are specified in the Input specifications of an RPG/400 program to define an area in storage and
layouts of related sub fields.
[Link] is the purpose of Data structure?
A.
[Link] a field in to sub fields
[Link] the format of a field
[Link] non-contiguous data in a contiguous format
[Link] an area of storage in more than one format
[Link] Multiple occurrences of data structures.
[Link] and explain the different type of data structures?
A.
[Link] area data structure:When the data area is defined in an RPG/400 program as a data area data structure, its
data is implicitly retrieved for processing and written back at the end of the program. In the data area data structure,
letter "U" must be entered to define the data structure as a data area data structure.
[Link] information data structure :A file information data structure provides exception/error information that may be
occurred when processing a file during program execution. This type of data structure contains pre defined sub fields
that identify
[Link] name of the file for which the error occurred
[Link] record processed when the error occurred
[Link] operation being processed when the error occurred
[Link] status code number
[Link] RPG/400 routine in which the error occurred.
Exception errors may be controlled by testing for an error code in the *STATUS field which is included in a file
information data structure. Specifically, keywords including *FILE, *RECORD, *OPCODE, *STATUS, *ROUTINE
provide the previously named information.
[Link] status data structure
Program status data structure however identity exception/errors that are generated in the program by RPG/400
operations and not by a file. Note that any code greater than 00099 is flagged as an exception/error. Four keywords
- *STATUS, *ROUTINE, *PROGRAM, *PARMS are supported by a program status data structure.
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
Nov 13 Mainframe AS-400 Interview Questions Part 6
2009
Posted by admin in Untagged
[Link] is the purpose of DYNSLT keyword?
[Link] is a file level keyword used in a logical file. If you specify this in a file level, the system doesn't perform record
selection until the program reads file. Then on the Select/Omit criteria, it selects the records from the specified file.
[Link] is the difference between access path and Dynamic select?
[Link] select occurs whenever the program reads file. But access path occurs before the file is read (but not
necessarily). Because access path maintenance performed on the file.
[Link] would you prefer OPNQRYF than logical file?
[Link] main difference is : Logical file creates permanent object on the system. OPNQRYF creates temporary access
path.
[Link] would you prefer logical file than OPNQRYF?
[Link] 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.
[Link] the purpose of the keywords FIFO, LIFO, FCFO?
[Link] keywords are used at file level. The purpose of each one is described below:
[Link]: The duplicate key records will retrieved in first in first out order.
[Link]: The duplicate key records will retrieved in last in first out order.
[Link]: The duplicate key records will retrieved in first changed first out order.
[Link] is the difference between regular logical file and join logical file?
A.
[Link] logical file contains more than one record format.
[Link] format name in regular logical file should be same based on the physical file.
[Link] logical file contains only one record format.
[Link] format name in join logical file should be different.
[Link] logical file we can made changes in physical file.
[Link] join logical file we can't made changes in physical file.
[Link] between logical file and physical file?
A.
[Link] file contains only one record [Link] file contains actual data.
[Link] file contains more than one record [Link] file doesn't contains data but it provides view from the
physical file.
[Link] is field reference file?
[Link] 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.
[Link] is the necessary keyword used in a physical file to refer field definitions from the field reference file?
[Link] 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)
[Link] is the purpose of reorganizing the physical file i. e. , RGZPFM?
[Link] 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.
[Link] is the purpose of CHGPF (Change physical file) command?
[Link] command is used to change the attributes of a physical file. Attributes like
[Link] number of members
[Link] size
[Link] check enforced
[Link] data path is shared
[Link] is purpose of declarative statement DEFN?
[Link] on the factor 1 value it will do two things:
[Link] the factor1is *LIKE then DEFN opcode defines the new field based on the attributes old field.
[Link] the factor 1 is *NAMVAR then DEFN opcodes defines the field as a data area.
[Link] is the purpose of SFLNXTCHG keyword in a subfile?
[Link] 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.
[Link] is the difference between Array and Table?
A.
[Link]: Array is stored any where in the body of the input records.
Array: We can access all the elements in array by specifying the array name.
Array: Array can be searched randomly.
Table: Table is stored at the begining of the input records.
Table: Only one table element can be accessed at a time.
Table: Table can be searched consecutively.
[Link] are the different types of access paths maintained on the file?
A.
[Link]: All the access paths (open and close) associated with a file will be updated whenever changes made to
a file.
[Link]- only open access paths will update whenever changes made to the file. Rebuild takes place whenever
remaining access paths will be open.
[Link] : Rebuild will not takes place.
[Link] can you identify End of file in CLP program?
[Link] the help of MONMSG MSGID(CPF0864) we can identify end of file in clp program.
[Link] is the difference between production library and test library ?
[Link] debug mode, the files exists in production library not allowed to [Link] the other hand, the files exists in test
library allowed to update.
[Link] is message subfile?
[Link] subfile is special file contains multiple messages taken from program message queue and placed in
message sub file for display on the screen.
[Link] are necessary keywords to code message subfile?
[Link], SFLMSGKEY, SFLPGMQ
[Link] is the difference between SETON LR and RETRN?
[Link] you specify SETON LR, all the files used in program will be [Link] you specify RETRN, all the files used in
program will remain open.
[Link] will you use OPEN and CLOSE opcodes in RPG program?
[Link] 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.
[Link] is difference between fully procedural file and primary file?
In primary file the records will be read and processed from begining to end. This order is not [Link] fully
procedural file the records will be read and processed in any order. The logic flow is controlled by the opcodes in RPG
program.
[Link] is the difference between externally described file and program described file?
[Link] 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.
[Link] many primary files allowed in a program?
[Link] one primary file is allowed in program.
[Link] many secondary files allowed in a program?
[Link] than one secondary files are allowed in a program.
[Link] is the purpose of RTVMBRD command?
[Link] order to access the information related to member, we can RTVMBRD command.
[Link] an Interactive Job?
A.
1.A user requests a job.
[Link] is created and job name, job attributes are assigned.
[Link] is placed on a job queue.
[Link] sub system QINTER takes the job from the job queue and starts processing.
[Link] output generated by the interactive job is placed on the output queue
[Link] spool sub system QSPL prints the output.
[Link] can you check the existence of object in a system?
[Link] 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.
Mainframe AS-400 Interview Questions Part 7
[Link] is the purpose of FRCDTA (Force Data) keyword?
[Link] this record-level keyword to immediately display a record format, without waiting for the
next input or output/input operation.
[Link] is the purpose of SFLFOLD and SFLDROP keywords?
A.
[Link]: To fold the second line of multiple line subfile.
[Link]: To drop the second line of multiple line subfile.
[Link] is the purpose of PUTOVR (Put with explicit override) keyword?
[Link] 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.
[Link] is the purpose of OVRDTA (Override Data) keyword?
[Link] this field level keyword with PUTOVR keyword to override the existing the data contents
of a field already on the display.
[Link] is the maximum number of record formats in DSPF?
A.1024 (One thousand and twenty four)
[Link] is the maximum number of fields under a record format of physical file?
A.8000 (eight thousand)
[Link] is the maximum number of parameters allowed in RPG?
A.255 (Two hundred and fifty five)
[Link] is the maximum number of parameters allowed in CLP?
A.43 (Forty three)
[Link] is the maximum number of subroutines allowed in RPG?
A.254 (Two hundred and fifty four)
[Link] is a Logical file?
[Link] is nothing but a logical view provided by the physical file.
[Link] is Join Logical file?
[Link] logical file joins more than one file. The maximum of number of files allowed to join is
32 (thirty two).
[Link] are the necessary keywords for the Join Logical file?
[Link], JFILE, JOIN, JFLD, JREF.
[Link] is a Non-join logical file?
[Link] only provides logical view based on the physical file. This is also called as regular logical
file.
[Link] is the necessary keyword for Non-join logical file?
[Link] (which is record level keyword)
[Link] many levels are there in a Physical file?
Four levels. They are File level, Record level, Field level, Key field level.
[Link] between View and Index ?
[Link] will not any data.. It only shows a data from table while Index has a Indexing Data for a
sequence on which Index is created. View is similar to Logical file without having Key and
Index is similar to Logical File having Key (as keyed logical file has access path data) Table is
similar to PF.
[Link] we have records (with fields from more than one file) from multiple files and Nested / sub
query in SQL ?
[Link], we can have record from multiple file with join condition and we also can have nested
query or subquery like SELECT * FROM FILE1 WHERE FILE1.FLD1 IN (SELECT
FILE2.FLD1 FROM FILE2)
[Link] is the sequence when using CURSOR?
A.
[Link] Cursor
[Link] Cursor
[Link] Cursor
[Link] record
[Link]
[Link] Cursor
[Link] type of Cursor?
[Link] types of Cursor
[Link] / Serial Cursor
a.A serial cursor is one defined without SCROLL key word
[Link] serial cursor each row is fetched only once per OPEN
[Link] it is opened it is positioned before the first row in the table.
[Link] use serial cursor we have to re-issue OPEN
[Link] Cursor which is defined with SCROLL key word.
[Link] defined with SCROLL key word
[Link] of cursor can be fetched many times
[Link] it is opened it is positioned before the first row in the table.
[Link] the FETCH is issued , the cursor is positioned to the row of the table that is specified by
the POSITION option. (FIRST, LAST, PREV, NEXT, RELATIVE)
[Link] do you achieve referential integrity?
[Link] adding Referential Integrity Constraints to a Physical file or Logical file. Constraints like
PRIMARY KEY, FOREGIN KEY, DELETE RULE, UPDATE RULE. ETC.
Commands are ADDPFCST for Physical file and ADDLFCST for Logical [Link] of
constraints
[Link] - A referential constraint is being added
[Link] - A unique constraint is being added.
[Link] - A primary key constraint is being added
[Link] - A check constraint is being added
Type of Delete rule (DLTRULE)
[Link] –
[Link] a record in parent file is permitted (not restricted) if data for a non-null parent key
does not match data for a foreign key.
[Link] a record in a parent file is restricted (does not occur) if data for a non-null parent key
matches data for a foreign key.
[Link] –
[Link] a record in a parent file is permitted if data for a non-null parent key does not match
data for a foreign key.
[Link] a record in a parent file is restricted if data for a non-null parent key matches data for
a foreign key.
[Link] –
The cascade delete rule is used. Deleting a record in a parent file causes matching records in the
dependent file to be deleted when data for a non-null parent key matches data for a foreign key.
Type of Update rule (UPDRULE)
[Link] – No Action
[Link] –
[Link] a record in a parent file is permitted if data for a non-null parent key does not match
data for a foreign key.
[Link] a record in a parent file is restricted if data for a non-null parent key matches data for
a foreign key.
[Link] Stored procedure lies in the system.
[Link] we want to have a look where the stored procedure, we can have a look through SQL.
[Link] is the stored procedure and how do you define a stored procedure.
A.A stored procedure is a program that can be called to perform operations that can include both
host language statements and SQL statements. Procedures in SQL provide the same benefits as
procedures in a hot language. That is, a common piece of code need only be written and
maintained once and can be called from several programs. Stored procedures can be used in both
distributed and non-distributed [Link] is defined using DECLARE PROCEDURE
statement, syntax is as below…
EXEC SQL
DELCARE P1 PROCEDURE
(:PARM1 INOUT CHAR(10))
(EXTERNAL NAME MYLIB/PROC1
LANGUAGE RPGLE
SIMPLE CALL WITH NULLS);
END-SQL
We can have parameters as IN , OUT , INOUT type. Language can be RPGLE, C, CL, etc..
MYLIB/PROC1 this PROC1 is a program written and compiled separately and it is of language
which you are specifying in section LANGUAGE.
[Link] an SQL statement from selecting records from TWO files using single statement and
Nested select statement.
A.
Using Single statement.
SELECT * FROM FILE1, FILE2
WHERE FILE1.FLD1 = FILE2.FLD1
Using Nested Select statement
SELECT * FROM FILE1
WHERE FILE1.FLD1 EQ (SELECT FILE2.FLD1 FROM FILE2).
Mainframe AS-400 Interview Questions Part 8
[Link] is Procedure ?
A.A procedure is the set of self contained high level language statements that can perform a particular task and then
returns to a caller.
[Link] to define a procedure ?
[Link] we have define Procedure Prototype along with all parameter. And PR.
D PROC1 PR
Then define Procedure with Begin/End
Procedure Name Begin/End
P PROC1 B Export
Then define Procedure Interface along with parameter and PI
D PROC1 PI 5 0
D PARMA 5 0
D PARMB 5 0
Define all the parameters as a variable to the procedure
D PARMA S 5 0
D PARMB S 5 0
In not returnable procedure, the procedure should end with
C PROC1 E
In returnable procedure, it should end with
C RETURN PARMA + PARMB
671. What is Procedure Prototype and Procedure Interface.
Procedure Prototype
In this section we specify the name of the procedure along with PR.
D PROC1 PR
Procedure Interface
It is section where we define all the parameter which are receiving or returning some values.
D PROC1 PI 5 0
D PARMA 5 0
D PARMB 5 0
[Link] to define Global Parameter in ILE ?
[Link] a variable with key word EXPORT and while using this variable in anther program declare with IMPORT
keyword.
[Link] is the disadvantage of using Global variable?
[Link] can not trace out at which point the value of variable is changed.
[Link] is Service Program?
A.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:
[Link] does not contain a program entry procedure. This means that you cannot call a service program using the CALL
operation.
2.A service program is bound into a program or other service programs using binding by reference.
[Link] is *ISO date format?
[Link]-MM-DD for other formats refer to IBM manual or ERIS document.
[Link] we tried to move year part of *ISO date into a field of length 3, what will happen ?
[Link] crashes, as in case of *ISO format it required fields of 4,2,2.
[Link] to avoid using indicators in ILE ?
[Link] using the standard Built In Expressions like %FOUND,%EOF, NOT %EOF, %BOF, NOT %BOF…[Link] /
Printer File
[Link] is EDTCDE and EDTWRD ?
A.
EDTCDE & EDTWRD are key words used for formatting purpose. EDTCDE cannot be applied to Character filed. And
EDTCDE has some Codes pre-defined for example, EDTCDE(Z) – for suppressing the leading zero Y – for date
[Link] can be used to define user defined formatting for a fields.
[Link] is OVERLAY?
[Link] allows a record format to be displayed on screen retaining the previous displayed record formats.
[Link] key word is used when screen is re-display?
[Link] is a parameter to be specified at compile time for display file.
[Link] Attention key and Command Function Key ?
[Link] the help of Command attention key we can pass only the indicator status to program not the data from
screen. While command function key passes indicator status as well as a data from screen to program.
[Link] to validate input values in Display file ?
[Link] the help of Validity check key words VALUE, RANGE, COMP
[Link] are the disadvantage of using Validity Check keyword? How to overcome these disadvantages ?
A.
[Link] invalid values are entered,
[Link] option filed is displayed in reverse image.
[Link] defined message is displayed which may not be user friendly.
[Link] is locked, we have to reset it.
[Link] overcome above disadvantage validations is done within program and user
[Link] are the important factors in Error message subfile ?
[Link] must define error message record format (SFLMSG). And a Program Queue. (PGMQ) and Record format is
associated to a line number.
[Link] to define to define a Hidden filed in DSPF ?
[Link] a filed in a DSPF of use HIDDEN.(H)
[Link] To get the cursor position?
[Link] the help of RTNCSRLOC keyword, here we need to define a field to get row and column. Length of variable
should be 5,0 fixed We can specify *FILED for filed *REC for Record on which a key is pressed.
[Link] do we can do with the Embedded SQL statements?
[Link] can Insert/Update/Delete records, fetch records, fetch values from records into variables.
[Link] is the values SQLCOD when there is an error in fetching the records specified in the select statement?
A.-ve value
Q.A file cannot have more than 1 unique key?
[Link]
[Link] command is mandatory for removing lock on any object?
[Link]
[Link] is a Journal?
A.A Journal is an object used primarily to record changes to data in a PF.
[Link] are the DB2 tools to protect Integrity of the database?
[Link] & Commitment Control, Referential Integrity Embedded SQL & Object/Record Locks.
Q.A program variable coded in an Embedded SQL statement is referred to as?
[Link] Variable
[Link] of the CL command can be used to determine which logical files are dependent on a specific file?
[Link]
[Link] CL command is used to trap error messages during program execution?
[Link]
[Link] CL command can be used at program execution to redirect the file named in an RPG program?
[Link]
[Link] is the length of the variable in the given example? DCL VAR (&Name) TYPE (*Char)?
[Link] 32 & for Decimal 15,5
1 - 8 Character *FILE The first 8 characters of the file
9 - 9 Character Open indication (1 = open).
10 - 10 Character End of file (1 = end of file)
11 - 15 Zoned dec *STATUS Status code.
16 - 21 Character *OPCODE Operation code The first five posi
22 - 29 Character *ROUTINE First 8 characters of the procedure
30 - 37 Character RPG IV source listing line number
[Link] to determine if the record is in used by another user ?
[Link] can determine weather a record is in use bye another user with the help of status code (*STATUS). If
*STATUS = 01218 i.e. record already locked.
[Link] to write *PSSR ?
[Link] just similar to any other subroutine.
*PSSR BEGSR
………………
………………
…………….
ENDSR
Nov 13 Mainframe AS-400 Interview Questions Part 9
2009
Posted by admin in Untagged
[Link] are the different commands used in RLU ?
A.
[Link] - Define Record,
[Link] - Change Line for Continuation,
[Link] - Change Line for Record,
[Link] - Create Sample Data,
[Link] - View Fields,
[Link] - New Page,
[Link] - Define Constants,
[Link] - Define Fields
[Link] - Centre Fields
[Link] - Space Fields evenly.
[Link] is the command used to invoke RLU ?
[Link].
[Link] are different record spacing keywords in RLU ?
[Link], SKIPB, SPACEA & SPACEB.
[Link] keywords of sub file
[Link], SFLCTL, SFLDSP, SFLSIZ, SFLPAG are the mandatory key words
[Link] between SFLRCDNBR and SFLNXTCHG
[Link] 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
[Link] can see logical file based on which physical file and vice versa
[Link]
[Link] can u check no of records in a file
[Link]
[Link] do u compile RPGLE program
[Link] thru 15 or crtrpgmod
[Link] module executable
[Link] You need to create an RPG prog to run the module
[Link] is procedure?
A.A procedure is the set of self-contained high level language statements that can perform a particular task and then
returns to a caller
[Link] is service program?
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:
[Link] does not contain a program entry procedure. This means that you cannot call a service program using the CALL
operation.
2.A service program is bound into a program or other service programs using binding by reference
[Link] is LOKUP opcode?
Look’s for a particular element of an array
[Link] many files, printer files you can describe in a RPG
A.50 files and 8 printers
[Link] do handle file exception/error
A.*INFDS ,*PSSR defining it in F spec
[Link] is OPNQRYF, MONMSG commands
[Link] 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 [Link] 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.
[Link] do you set pointers to values 55 or next higher or greater?
[Link].
[Link] will I explicitly open a file in an RPG program?
[Link] defining UC in file condition and to opening the file mention OPEN opcode and closing the file by mentioning
CLOSE in opcode of C spec.
Q. Distinguish between terminating a program through SETON LR and RETURN?
[Link] closes all the files used in the program and RETURN is used to return the control to the parent program.
[Link] will you add a field to physical file already containing data?
[Link] CPYF command and *NOCHK & *DROP
[Link] are the uses of FACTOR1, FACTOR2 and RESULT field for the RPG operation code PARM?
[Link] is add value of FACTOR1 to FACTOR2 or compare the value of FACTOR 2 with FACTOR1.
[Link] will you find a string using PDM?
[Link] using FNDSTRPDM.
[Link] will you search an array?
[Link]
[Link] are the different types of arrays?
[Link] gets populated at the time input. Runtime gets populated at the time [Link] time gets
populated at the time of compilation.
[Link] is message file?
[Link] is file which contain messages created by the user through which a user can display own message while
validating.
[Link] does DEFN do?
[Link] is used to define a field based on the value specified in FACTOR 1.
[Link] are two types of record are used in subfile?
[Link] RECORD FORMAT and SUBFILE CONTROL RECORD FORMAT.
[Link] are DDS required for SUBFILE?
[Link] DISPLAY (SFLDSP) SUBFILE DISPLAY CONTROL (SFLDSPCTL) SUBFILE CLEAR (SFLCLR) SUBFILE SIZE
(SFLSIZE) SUBFILE PAGE (SFLPAGE).
[Link] is ELASTIC and NON ELASTIC SUBRILE?
[Link] 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.
[Link] is SFLINZ and SFLRNA?
[Link] 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).
[Link] you display a empty subfile?
[Link] by using the keyword SFLINZ and SFLRNA.
[Link] do we use READC?
[Link] is SFLNXTCHG? 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.
[Link] do you read changed records backward in subfile?
[Link] POSSIBLE.
[Link] you will find an error which is not in the first page of the subfile without using ROLLDOWN key?
[Link] using keyword SFLRCDNBR.
[Link] is SFLROLVAL?
[Link] 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).
[Link] you will know whether you are in SFLDROP or SFLFOLD mode?
[Link] using the keyword SFLMODE.
[Link] you get the relative record in a subfile in which cursor is located?
[Link] using the keyword SFLCUSRRN (Subfile cursor relative record number).
[Link] is QCMDEXC?
[Link] is used to execute a single CL command within the RPG program.
[Link] is maximum size of data area?
A.9999.
[Link] to fire a JOB?
[Link].
[Link] many levels of security are there on AS/400?
[Link] are 10 to 50 level of security on AS/400.
Nov 13 Mainframe AS-400 Interview Questions Part 10
2009
Posted by admin in Untagged
[Link] to translate field values form lower case to Upper case?
[Link] using opcode XLATE.
[Link] are the maximum parameters can be passed from one RPG program to another RPG program?
A.255
[Link] many maximum parameters can be passed from on RPG program to another CL program?
A.40
[Link] many maximum arrays can be used in a single RPG program?
A.200.
[Link] many maximum loops can be used in a single RPG program?
A.100
[Link] many maximum printer files can be used in a single RPG program?
A.8
[Link] is the maximum length of an OCCUR?
A.9999.
[Link] is a subfile?
[Link] is a group of records which can be used for (Displaying, Adding new record, Modifying the existing record,
and Deleting the existing records).
[Link] is maximum size of a subfile?
A.9999.
[Link] do you write and read a value (similarly as EXFMT of RPG) using a display file in CL?
A. SNDRCVF.
[Link] do you display a screen in CL?
[Link].
[Link] to check end of file in CL?
[Link] the message ID (CPF0864).
[Link] you update a file in CL?
[Link].
[Link] you add a record to a physical file through CL?
[Link]
[Link] opcode is used for submit job? Why it is used?
[Link] opcode is used and it is used for background processing.
[Link] do you monitor message in CL?
[Link] using monitor message ID: (MONMSG MSGID (CPF0000)
[Link] report design what else can be done by O spec?
[Link] can write a Physical File from O spec.
[Link] is the full for of CA and CF?
[Link] Attention and Command Function.
[Link] between WRKUSRJOB and WRKACTJOB?
[Link] the jobs in WRKUSRJOB are seen including Active jobs where as in WRKACTJOB only active jobs are seen.
[Link] are the three levels of SDA?
[Link] level, Record level, Field level.
[Link] is *PSSR?
[Link] is a system subroutine which is executed by default when any error occurs in a program.
[Link] do we define MOVE *ON *INLR?
[Link] frees the memory. All the fields and parameters in the memory will become blank.
[Link] do you shutdown your IBM server?
[Link].
[Link] your workstation does not show login screen what might be the problem?
[Link] with some subsystem.
[Link] have given a job for printing and you are not getting the printout what might be the reason?
[Link] more pending jobs might be there in Job Queue.
[Link] are multiple jobs for printing in job queue and you want to print a important document then what will you
do?
[Link] the priority or change the job queue name.
[Link] to see the CPU usage?
[Link] or WRKSYSSTS.
[Link] the sequence of execution of an RPG/400 program?
[Link] execution, an RPG/400 program automatically follows a sequence of operations for each record that is
processed. The built-in program cycle includes the following logical steps.
[Link] input (READ)
[Link] calculations (PROCESS)
[Link] output (WRITE)
[Link] is the Function of PDM?
[Link] tool for copying, deleting, scanning, changing & creating source files.
[Link] is the function of SEU ?
A.A utility for editing programming language source code.
[Link] is the use of SDA ?
[Link] Design Aid is used to create display files interactively.
[Link] is a library in AS/400 ?
[Link] in AS/400 is an object that serves as a repository for other objects.
[Link] few IBM supplied libraries ?
[Link], QTEMP, QUSRTOOL, QSYS, QRPG & QCBL.
[Link] is a library list ?
[Link] list that indicates libraries used for the process and the order in which it has to be searched. System
identifies it in *LIBL.
[Link] many libraries can be there in a library list ?
[Link] 40 (15 system and 25 application).
[Link] - Data Description Specification.
[Link] Physical File contains the source for the various objects created. This file has a specific structure.
RPG, CLP, DSPF, PRTF, etc.
A-spec
UNIQUE, PFILE, REFFLD
[Link] is the difference between Physical and Logical files ?
[Link] file contains data, where as Logical file serves as a access path to database.
[Link] does the keyword UNIQUE mean ?
[Link] with duplicate key values are not allowed.
Q. How many record formats can you have in a Physical file and in a Logical file ?
[Link] file can contain only one record format, Logical file can contain more than one record format.
[Link] does SDA stands for ?
[Link] Design Aid.
[Link] is the symbol used for defining a new field in SDA?
A.'+'.
[Link] is the symbol used for shifting fields in SDA?
A.''.
[Link] is the symbol used for copying & moving new field in SDA?
[Link] : '-' & '=='.
Moving : '-' & '='.
[Link] is the symbol used to get name & length of a field in SDA?
A.'?' .
*DATE, *TIME.
2009 Mainframe AS-400 Interview Questions Part 12
Posted by admin in Untagged
[Link] do you place or remove locks on the objects?
A.*AACOBJ & *DLCOBJ
[Link] of the object types on which locks can be allocated?
Data Area, Data Queue, File, Library, Message Queue, Menu &Program.
[Link] is the opcode to release all the locks on a particular PF?
[Link]
[Link] is a trigger?
A.A trigger is an action that automatically occurs whenever a change Is made to a physical file.
[Link] many triggers can be associated with a single PF?
A.6 (max)
[Link] can we know the triggers associated with the PF?
[Link] with parameter TYPE (*TRG)
[Link] can we add & remove trigger to a PF?
[Link] & RMVPFTRG
[Link] is an Output Queue?
[Link] are the holding areas that store printed output generated from Batch programs or Interactive applications.
[Link] does print writer do?
[Link] is a system job that selects files from the output queue & prints Them on a printer. It provides the interface
between output queue’s Spooled files & the printer.
[Link] are the 2 types of lines on O Specs?
[Link] Identification Line & Field Identification Line.
[Link] a Subroutine contain another Subroutine?
[Link].
[Link] the SETLL & SETGT retrieve the record?
[Link], they simply position to the record.
[Link] is a table?
A.A table is collection of data elements in one column, data elements Must be of same type and same length.
[Link] is a Compile Time Table?
[Link] can hard code data within the program is said to be Compile Time Table.
[Link] is a Run Time Table?
[Link] from a separate disk file is loaded into a table each time the Program runs.
[Link] the Table definition?
[Link] 1 12 2 A Where 1 = Number of entries per record 12 = Total number of entries 2 = Length of each entry A
= Ascending Sequence.
[Link] the data is likely to change over a period of time & Moreover data is large than which type of table is preferred?
[Link] Time Table.
[Link] is Alternate Table?
[Link] tables stores information in 1 column. To store information in multiple columns, it uses the concept of
Alternate Table.
[Link] is an Array?
[Link] is a collection of data, the data elements must be of same Length and same type.
[Link] Qualified name for an object ORDPF residing in a library TRAINING is?
[Link]/ORDPF
[Link] members in a Source Physical File contain?
[Link] statements for a program.
[Link] members in LF contain?
[Link] Path.
Q. The members in a PF contain data? True/False)
[Link]
[Link] is the command to view the library list?
[Link]
[Link] is the command to create PF?
[Link]
[Link] LF is associated with how many PF’s?
[Link] least one PF at a time.
[Link] function key to start SEU session through program development manager is?
A.F6
[Link] Member type for an RPG & CL program which SEU supports is?
[Link] & CLP
[Link] output items placed in an output queue are known as?
[Link] Files.
[Link] a spooled file is created, it is placed into an?
[Link]
[Link] command to display a list of spooled files?
[Link]
[Link] in the externally described file does not require recompilation of the program? (True/False)
[Link]
[Link] to display current library is?
[Link]
Q.A PF can have how many record formats?
[Link] one
[Link] one of the following has the highest priority Library on top of the library list, Library QGPL, Library on the
bottom of the library list & Current library?
A. Current library
[Link] designing the screen user wants to add file level keywords then which function key is pressed?
A.F14
[Link] designing the report using RLU user wants to add record level keywords which function key is pressed?
A.F18
[Link] user wants to add one field on the report then which function key is pressed?
A.F11
[Link] user wants to center the company name on his report then which command will be used?
[Link] (Center Field)
[Link] shows prompt/syntax checking according to?
[Link] Type
[Link] is possible to run Query using RUNQRY command?
[Link]
[Link] Query it is possible to create level break report?
[Link]
[Link] DFU user can do which operation?
[Link], Update & Select fields
[Link] is the difference between UPDDTA to PF & updating using DFU?
[Link] are same, only difference is DFU program allows you to add & update selected fields.
Q. Which function key should be pressed to define hidden field while you are working with SDA?
A.F4
[Link] function key should be pressed to watch all string defined on SDA screen?
A.F20
[Link] designing the screen using SDA, which function key should be pressed to get the field from the FRF?
A.F10.
[Link] WRKMBRPDM screen you have to modify existing member-using SDA which option do you select?
A.17.
[Link] system defined function used to place system name on the screen?
A.*SYSNAME
[Link] designing screen F3 function key is kept common for all record formats on which level should it be defined?
[Link] level
[Link] user wants to change the length of the numeric field defined in the report then which combination of the keys
will be used?
A.F23 & F10
[Link] is the difference between SKIPB (2) & SPACEB (2)?
[Link] (2) skips 1 page & on the next page after skipping 2 lines space print next while SPACEB (2) skips 2 lines
space before printing.
[Link]: If user wants to define new numeric field on record format then which line command will be used?
[Link]
[Link] report length is 132, if user is designing a report using RLU?
[Link] (Maximum is 378)
[Link] change constant field defined on RLU screen which field level keyword should be used?
[Link] (Default)s
Mainframe AS-400 Interview Questions Part 13
[Link] Function key should be pressed to define hidden field while you are working with
SDA?
A.F4
[Link] function key should be pressed to watch all strings defined on the SDA screen?
A.F20
[Link] designing the screen using SDA, which function key should be pressed to get the field
from the field reference file?
A.F10
[Link] work with member using PDM screen you have to modify existing member using SDA,
which option do you select?
A.17
[Link] designing the screen, F3 function key is kept common for all record formats. On which
level should it be defined?
[Link] Level
[Link] designing the screen user wants to add file level keywords, then which function key
should be pressed?
A.F14.
[Link] designing the report using RLU, user wants to add record level keyword then which
function key should be pressed?
A.F18.
[Link] user wants to add one field on the report then which function key should be pressed?
A.F11.
[Link] user wants to center the company name on his report then which line command will be
used?
[Link].
[Link] user wants to change the length of the numeric field defined in report then which
combination of keys will be used?
A.F23 & F10.
[Link]: If user wants to define new numeric field on record format then which line command
will be used?
[Link].
[Link] report length is 132, if user is designing a report using RLU?
[Link] (378 Max).
[Link] change constant field defined on RLU screen which field level keyword should be used?
[Link]
[Link]: Which field level keyword should be used to change any numeric field of length 8 to
99.99.9999 format?
[Link] (‘ . . ‘)
[Link] is the difference between normal UPDDTA to PF and updating using DFU program?
[Link] are same only difference is DFU allows you to add or change selected fields.
[Link] is Library?
A.A library is a system object that serves as a directory to other objects or collection of object
[Link] is Library List?
A.A job’s library list defines the path of libraries that the job follows when trying to locate
programs, files or other As/400 objects.
[Link] between Source Physical File & Physical File?
[Link] Physical File contains members who contain source statements & Physical File
contains members, which contain data.
[Link] of Libraries on As/400?
[Link] are 3 types of libraries on As/400 they are System (*sys), User (*test) & Product
(*prod).
[Link] of Source File & Physical File?
[Link] File: - *PF/SRC Physical File: - *PF/DTA
[Link]’s the use of STRPDM?
[Link] work with Libraries, Objects, Members & User Options.
[Link] which Specs can PF be made internally?
[Link] I Specs.
[Link] is the format of As/400 Commands?
[Link] Object Qualifier Verb: - action Object: - on which action is performed Qualifier: -
identifies your job
[Link] is externally described file?
A.A file, which is created externally & described in the program, is called as external described
file.
[Link] is Qualified & Unqualified path?
[Link] path means mentioning object name along with library name while Unqualified path
means directly writing the object name.
[Link] path a good programmer should use?
[Link] path.
[Link] many types of files are available on As/400?
[Link] are 2 types of files on As/400 they are Databases files & Device files.
[Link] can you specify no duplicate key?
[Link] defining the unique key.
[Link] is the command to know how many LF are related to a PF?
[Link] (Display Database Relationship)
[Link] is the command to know key fields of file?
[Link] (F4) *ACCPTH(Access Path).
[Link] a Join Logical File be updated?
[Link].
[Link] is the object type of PF, LF, Printer file & Display file?
A.*File
[Link], which purpose is H Specs used?
[Link] header information, date separator, currency symbol etc.
[Link] is the size of the filename in RPG?
A.8 Characters (Max.)
[Link] are the different File Types in RPG?
A.I (Input), O (Output), U (Update) & C (Combine).
[Link] are the different File Designation Types in RPG?
A.P (Primary) & F (Fully Procedural)
[Link] is the use of UNIQUE keyword and what level it is defined?
[Link] will avoid to enter duplicate key values. We have to define it in a file level.
[Link] what level S,O are defined and what they will do?
A.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.
[Link] is the difference between Packed decimal and Zoned decimal?
A.
[Link] decimal : One digit occupies 1 byte.
[Link] decimal : One digit occupies 2 bytes.
[Link] is default data type (if you define decimals '0') in Physical file?
[Link] decimal
[Link] is default data type for the fields(sub fields) defined in data structures in RPG?
[Link] decimal
[Link] is the use of JDFTVAL in join logical file?
[Link] you specify JDFTVAL at file level, even the primary file record does not match with
secondary file record, the join takes place.
[Link] it possible to create a physical file without DDS?
[Link]. With the help of CRTPF we can achieve this. But we have to give record length.
[Link] is a Keyed physical file?
[Link] a field as a key in physical file. Hence we can access records through the key field.
[Link] is a composite key?
[Link] more than one key as a key field in physical file.
[Link] is arrival sequence?
[Link] records will be accessed the way in which records are added to physical file.
[Link] is the maximum number of key fields allowed defining in a physical file?
A.s120
[Link] is acronym of RPG?
[Link] Program Generator
Mainframe AS-400 Interview Questions Part 14
[Link] many types of display are available on As/400 for user interaction?
[Link] 4 Types they are Entry, Menu, Information & List Display.
[Link] is the Primary Editor of As/400?
[Link] Entry Utility (SEU).
[Link] are the basic features of SEU?
Prompt depending upon type, shows right hand side date & left hand side the line number.
[Link] are the different methods to access SEU?
Use the Start Source Entry Utility command (STRSEU) Option 8 from STRPGMMNU Through Program Development
Manager (PDM)
[Link] are the member types which SEU supports?
RPG, CL, PF, LF, PRTF & DSPF.
[Link] which Specs Arrays, Tables & Constants are defined?
[Link] I Specs.
[Link] is a Spool File?
[Link] output items placed in an output queue are known as spooled files.
[Link] many Specs are there in RPG & Which are they?
[Link] are 7 Specs in RPG they are H, F, E, L, I, C & O.
[Link] between GOTO & EXSR?
[Link] is a conditional branching while a GOTO is an unconditional branching.
[Link] between CA & CF?
[Link]: - It does not retains the value into the buffer memory. CF: - It retains the value into the buffer memory.
[Link] does EXFMT does?
[Link] & Read.
[Link] does the OVRDBF command do?
[Link] overrides the PF temporarily for a job.
[Link] does the RUNQRY show the output?
[Link] shows the output always in RRN (Relative Record Number) & not in keyed sequence.
[Link] many printer files maximum can be used in single RPG program?
A.8 because of the overflow indicators OA-OG & OV.
[Link] you are defining a flat file in your program in F Specs which format will you specify?
[Link] File: - F (Fixed Length) Other File: - E (Externally Described)
[Link] between skip before & space before?
[Link] before leaves the specified no. of lines moving to the next page while Space before leaves the specified no.
of lines on that page.
[Link] indicator is used for Read?
[Link] (Equal to)
[Link] are the figurative constants used in RPG?
A.*ZERO,*BLANK, *ZEROS, *BLANKS, *HIVAL, *LOVAL, *OFF, *ON & *ALL.
[Link] is the syntax for PLIST?
*ENTRY PLIST PARM
[Link] are indicators?
[Link] are inbuilt class of variables for RPG.
[Link] is CAB?
[Link] compares Factor1 with Factor2 & if condition is true, control is transferred to label designated in the result
field. The label specified must appear as the Factor1 of a TAG operation somewhere in the program.
[Link] are the Relational Operators in RPG?
[Link], GE, LT, LE & EQ.
[Link] ‘O’ Specs what is the opcode for write?
[Link].
[Link] is Subroutine in RPG?
A.A subroutine is a group of statements in a program that can be processed several times in that program.
[Link] we have to Execute the *INZSR compulsory?
[Link], it is a system-defined subroutine it is executed automatically.
[Link] is the use of *PSSR in the program?
[Link] there is any type error in the program the control straight away passes onto this subroutine.
[Link] are the types of Tables in RPG?
[Link] are 2 types of tables in RPG they are: - Compile Time Tables Pre-Runtime Tables
[Link] does LOKUP does in Tables & Arrays?
[Link] LOKUP opcode searches the Factor1 entry in table or array.
[Link]’s the use of File Designation in RPG?
[Link] refers to the way program will access or retrieve the data from the file.
[Link] are the different File Format Types in RPG?
A.F (Fixed Length) & E (Externally Described)
[Link] is the use of File Format in RPG?
[Link] tells to the program that the records are within the program (F) or outside the program (E).
[Link] is L Specs for?
[Link] tell length of page & number of lines to be printed on a page.
[Link] is I Specs for?
[Link] describe the records within Program described file, fields, constants, divide fields into sub fields & to form a
group of fields.
[Link] Access Opcodes?
[Link], SETLL, SETGT, READE, READP, READPE CHAIN, KLIST, KFLD, EXCPT & WRITE.
[Link] is RPG Fixed Logic Cycle?
A. A logic the compiler supplies is called RPG Fixed Logic Cycle.
[Link] between Interactive & Batch Job?
[Link] job begins, runs & continues to execute instructions without human intervention or control while
Interactive job are user driven.
[Link] can we run a Batch Job?
[Link] Command.
[Link] between CALL & SBMJOB?
[Link] performs interactively job while SBMJOB performs batch job.
[Link] does VLDCMDKEY means?
[Link] Command Key.
[Link] is the error if we don’t get login screen?
[Link] is some problem with subsystem.
[Link] to run other job when one job is active?
[Link] the priority or rename the job.
[Link] is the use of Data Structures?
A.
[Link] a field into sub fields.
[Link] the format of a field.
[Link] non-contiguous data in a contiguous format.
[Link] an area of storage in more than 1 format.
Q. Space & Skip are which level keywords?
[Link] & Record
Q.A Join Logical File has how many Record formats?
A.1
Q.A Multiple format Logical File is also known as?
[Link] File
[Link] does Union file maintains Record formats?
A.1 Record format for each PF
[Link] is full form for DDS?
[Link] Description Specification
[Link] are members?
[Link] are separate entities within a database file & they are components of As/400 object.
[Link] many maximum spaces could be given in O Specs?
A.3
[Link] are Control Break Logic indicators?
A.L1 – L9.
[Link] are the String Manipulation Opcodes?
[Link], SCAN, CHECK, CHECKR, SUBST & CAT
Q.DB2 is a type of Database?
[Link] is an Integrated RDBMS.
[Link] access path may be in which sequence?
[Link] can be in Arrival & Keyed sequence
[Link] can be Read/Update/Deleted with which file?
[Link] Logical File & Physical File.
[Link] type of object is used in DB2/400?
A.*FILE
Q.A Query can be displayed without saving it?
[Link]
[Link] are the Query selection criteria, which can be given in a Query?
[Link]
[Link] add a file to the ‘File Selection’ option of a Query, the function key to be pressed is?
A.F9
Q.A Query can be run in which mode?
[Link] & Interactive