Mainframe AS400 Interview Questions

download Mainframe AS400 Interview Questions

of 47

Transcript of Mainframe AS400 Interview Questions

  • 8/8/2019 Mainframe AS400 Interview Questions

    1/47

  • 8/8/2019 Mainframe AS400 Interview Questions

    2/47

    Q.Explain the purpose of KEEP and ASSUME keywords?

    A.KEEP: Keep the display from being deleted when the display file is closed.ASSUME: 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.

    Q.Explain the use of DFTWRT display keyword?

    A.No records will be displayed until there is any I/O operation.

    Q.What is the purpose of FRCDTA keyword ?

    A.Immediately display a record format without waiting for the next I/O operation.

    Q.What keyword must be used with PROTECT keyword?

    A.OVERLAY

    Q.What is Subfile?

    A.Subfile is group of records of same record format and can be read from or write to the display in a single

    operation.

    Q.What are all the contents of subfile?

    A.Subfile Record Format, Subfile Control Record Format, Relative Record Number, Subfile Record Number, Associated

    Subfile Keywords.

    Q.What are the two record formats a subfile contain ?

    A.Subfile record forma (SFL), and subfile control record forma (SFLCTL).

    Q.What is SFLPAG and SFLSIZ ?

    A.

    1.SFLPAG : it is an attribute which specifies the number of records that can be displayed in a screen.

    2.SFLSIZ : it is an attribute which specifies the number of records can be stored in subfile.

    Q.What is the maximum number of subfiles that can be specified in a display file,

    A.512

    Q.Maximum number of subfiles that can Defined in a RPG program for one display file is

    A.24

    Q.Maximum number of subfiles that can be active for a single file is?

    A.12

    Q.Can more than one subfile record be displayed on one line?

    A.Yes, by using SFLLIN keyword.

  • 8/8/2019 Mainframe AS400 Interview Questions

    3/47

    Q.How do you specify the number of records to roll in a subfile?

    A.Use SFLROLVAL keyword in DDS along with number, which specifies the number of records to scroll at a time.

    Q.How will you display a particular page in subfile?

    A.Move a valid relative record number (RRN) in the field specified using SFLRCDNBR keyword in DDS.

    Q.How to pick up the changed records every time in a subfile after the first change made?

    A.Seton SFLNXTCHG keyword indicator and update the subfile record.

    Q.What is the use of SFLEND keyword?

    A.By specifying this keyword, the Bottom/More message could be displayed at end of screen.

    Q.How to toggle between single line and Multi - line display of a particular record in a subfile?

    A.Using SFLDROP keyword.

    Q.Explain the difference between defining Subfile and Message-subfile?

    A.Subfile record is defined by SFL keyword, where as Message subfile is defined by SFLMSG keyword.

    Q.What are the different types of variables available in CL?

    A.DEC, CHAR, LGL

    Q.How do you pass parameters in CL?

    A.Using PARM keyword.

    Q.What are the valid user defined data area types?

    A.CHAR, NUMERIC and LOGICAL

    Q.What is Multi-format logical file?

    A.Logical which uses fields from two or more physical files.

    Q.What is the Select and Omit criteria in logical file?

    A.This is used to specify rules for the Selection/Omission of records from a Physical File.

    Q.Can fields be concatenated INa logical file level?

    A.Yes. by using CONCAT keyword

    Q.When would the ALL keyword be used?

    A.Use with Select or Omit, to select/omit records.

    What are the different types of keywords in display files?

  • 8/8/2019 Mainframe AS400 Interview Questions

    4/47

    A.File level, Record format level, Field level

    Q.What is difference between CAT, TCAT, BCAT?

    A.

    1.CAT - Concatenate two variables or constants into one continuous string.

    2.BCAT - Truncates all trailing blanks in the first character string, one blank is inserted, then the two character

    strings are concatenated.

    3.TCAT - Truncates all trailing blanks in the first character string, the two character strings are concatenated.

    Q.What are the different types of messages in CL?

    A.Immediate message, Break message, Program message, User message

    Q.How to trap errors in CL?

    A.By using Monitor Message Command (MONMSG)

    Q.What is the maximum length of a variable name in CL?

    A.Maximum 11 characters (including '&')

    Q.What are the limitations of CL (compare to RPG) ?

    A.

    1.You can not use CL program to ADD or UPDATE records in database files.

    2.Use Printer or ICF files.

    3.Use Program described files.

    4.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.

    5.Use subroutines.

    6.You cannot declare more than one object (file) in a CL programme

    Mainframe AS-400 Interview Questions Part2

    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.

  • 8/8/2019 Mainframe AS400 Interview Questions

    5/47

    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

  • 8/8/2019 Mainframe AS400 Interview Questions

    6/47

    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 dont 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.

  • 8/8/2019 Mainframe AS400 Interview Questions

    7/47

    What is the purpose of the "N" in the following calculation specification?

    Ans:C KEY CHAIN FILE N 99.If 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.

  • 8/8/2019 Mainframe AS400 Interview Questions

    8/47

    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

  • 8/8/2019 Mainframe AS400 Interview Questions

    9/47

  • 8/8/2019 Mainframe AS400 Interview Questions

    10/47

    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

    AMultiple 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 PFs

  • 8/8/2019 Mainframe AS400 Interview Questions

    11/47

    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

    Q.What is the Function of PDM?

    A.Productivity tool for copying, deleting, scanning, changing & creating source files.

  • 8/8/2019 Mainframe AS400 Interview Questions

    12/47

    Q.What is the function of SEU ?

    A.A utility for editing programming language source code.

    Q.How can the user implicitly open and close the files in RPG program ?

    A.Enter UC in position 71-72 of F specs.

    Use OPEN and CLOSE opcodes in RPG program to open and close files.

    Q.How many parameters can be defined in a RPG program. ?

    A.255

    Q.What is File Information Data Structure?

    A.File 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

    occurred.The status code. The RPG routine in which the exception/error occurred.

    Q.What is the use of SDA ?

    A.Screen Design Aid is used to create display files interactively.

    Q.When will you use OPEN and CLOSE opcodes in RPG program?

    A.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.

    Q.What is difference between fully procedural file and primary file?

    A.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.

    Q.What is the difference between externally described file and program described file?

    A.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.

    Q.How many primary files allowed in a program?

    A.Only one primary file is allowed in program.

    Q.How many secondary files allowed in a program?

    A.More than one secondary files are allowed in a program.

    Q.What is the purpose of RTVMBRD command?

  • 8/8/2019 Mainframe AS400 Interview Questions

    13/47

    A.In order to access the information related to member, we can RTVMBRD command.

    Q.Define an Interactive Job?

    A.

    1.A user requests a job.

    2.Job is created and job name, job attributes are assigned.

    3.Job is placed on a job queue.

    4.The sub system QINTER takes the job from the job queue and starts processing.

    5.The output generated by the interactive job is placed on the output queue

    6.The spool sub system QSPL prints the output.

    Q.How 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.

    Q.What is the purpose of FRCDTA (Force Data) keyword?

    A.Use this record-level keyword to immediately display a record format, without waiting for the next

    input or output/input operation.

    Q.What is the purpose of SFLFOLD and SFLDROP keywords?

    A.

    1.SFLFOLD: To fold the second line of multiple line subfile.

    2.SFLDROP: To drop the second line of multiple line subfile.

    Q.What is the function of DSPATR (display attributes) keyword?

  • 8/8/2019 Mainframe AS400 Interview Questions

    14/47

    A.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.

    Q.Define a shared access path?

    A.To share the open data path by various programs in a same job.

    Q.What is the difference between array and a multiple occurrence data structure?

    A.The values stored in array dont vary. In the other hand, we can store the different values in same

    variables at various stages.

    Q.What is *INZSR used for?

    A.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.

    Q.How can you execute a command from within an RPG program without calling a CLP program?

    A.By calling QCMDEXC application program interface we can execute a CL command with in an RPG

    program.

    Q.What is the purpose of the "N" in the following calculation specification?

    A.C KEY CHAIN FILE N 99.If 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.

    Q.Which 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

  • 8/8/2019 Mainframe AS400 Interview Questions

    15/47

    C CLEAR FLDA

    C MOVE *BLANKS FLDA

    The last instruction does NOT zero the field FLDA.

    Q.How can you check for a records existence without causing and I/O (CHAIN/READ)?

    A.With 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 Part4

    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.

  • 8/8/2019 Mainframe AS400 Interview Questions

    16/47

    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.

  • 8/8/2019 Mainframe AS400 Interview Questions

    17/47

    What is the difference betweenArray 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 ?

  • 8/8/2019 Mainframe AS400 Interview Questions

    18/47

    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 132009

    Mainframe AS-400 Interview Questions Part 5Posted by admin in Untagged

    Q.How would you design the process for a nightly, high volume check producing process that needs to select onlyrecords that are flagged to be processed?A.With the help of OPNQRYF Clp command, we can select the records from the data base file. The process involvesfollowing steps:Steps:1.OVRDBF with SHARE (*YES)2.OPNQRYF3.CALL the program4.DLTOVR

    5.CLOF

    Q.How would you join 3 separate fields, a first name, middle initial and last name together as 1 field with properspacing?A.You can describe in either RPG and/or RPG ILE (Integrated Language Environment)MOVE 'Dr. ' FNAME 3MOVE 'JOHN' MNAME 4MOVE 'WATSON' LNAME 6FNAME CAT MNAME: 1 VAR1 8VAR1 CAT LNAME:1 VAR2 15DSPLY VAR2MOVE *ON *INLR

    Q.When 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?A.If you specify RETRN in called program, the *INZSR will not execute again.

    Q.Show 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:PGMDCL 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

    Q.Determine the value of the result fielda. Cost = $110. 00b. Tax = 20%c. MarkUp= 05%d. Sale = 10%

  • 8/8/2019 Mainframe AS400 Interview Questions

    19/47

    A.C Eval TotalCost = ((Cost * MarkUp) * Tax)) - Sale= 1. 0$40. Define the purpose of Factor 1 the Operation Code and *IN15 in following codeHI LO EQC *YMD Test(D) yymmddDate 15If the factor 1 value matches with factor2 value, the indicator specified in EQ comes *ON.

    Q.Describe the function of SETLL operation in RPG language?A.The SETLL operation positions a file at the next record with a key or relative record number that is greater than orequal to key or relative record number specified in factor1.

    Q.Describe the function of SETGT operation in RPG language?A.The SETGT operation positions a file at the next record with a key or relative record number that is greater thankey or relative record number specified in factor 1.

    Q.What is the purpose of Level Check parameter in a Physical file?A.Specifies whether the level identifiers of the record formats in the physical file are checked when the file is openedby the program.

    Q.Define a Job Queue?

    A.Job queues are queues of batch jobs waiting to be processed.

    Q.Define a Output Queue?A.Output queues are queues of jobs waiting to be printed.

    Q.What is the function of CPYSPLF command?A.It copies the spooled file to the data base file.

    Q.What is the function of CPYF command?A.To copy the data from the one file to another.

    Q.What is the function of CRTDUPOBJ command?A.To create the replica from the original object.

    Q.Define Subsystem?A.Subsystem is nothing but it provides specialized environment to complete the execution of jobs.

    Q.What are different types of Substems?A.QBATCH, QINTER, QSPL, QCMN, QCTL, QBASE.

    Q.Define a Batch Job?A.1.A user request the job.2.The job is created (job name is assigned, job attributes are allocated)3.The job is placed on a job queue4.The sub system QBATCH takes the job from job queue and starts it.5.Output generated by the batch job is placed on an output queue.6.The spool sub system prints the output on the output queue.

    Q.Describe about Query/400?A.Query/400 is a licensed program that uses a query to analyze and select the information contained in the data basefiles and create a query report.A query report can be:1.displayed on a workstation (screen)2.printed3.stored in another database file.

    Q.What is the CLP command to access a Query/400?

  • 8/8/2019 Mainframe AS400 Interview Questions

    20/47

    A.WRKQRY

    Q.Purpose of Overrides?A.The basic purpose of Overrides is to temporarily change the attributes of a file. So you don't have to createpermanent files for every combination of attributes your application might need. Overrides gives you the flexibility touse existing model files and dynamically change their attributes.

    Q.Define Data Structure?A.Data structures are specified in the Input specifications of an RPG/400 program to define an area in storage andlayouts of related sub fields.

    Q.What is the purpose of Data structure?A.1.Divide a field in to sub fields2.Change the format of a field3.Group non-contiguous data in a contiguous format4.Define an area of storage in more than one format5.Define Multiple occurrences of data structures.

    Q.List and explain the different type of data structures?A.

    1.Data area data structure:When the data area is defined in an RPG/400 program as a data area data structure, itsdata 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.

    2.File information data structure :A file information data structure provides exception/error information that may beoccurred when processing a fi le during program execution. This type of data structure contains pre defined sub fieldsthat identifya.The name of the file for which the error occurredb.The record processed when the error occurredc.The operation being processed when the error occurredd.The status code numbere.The 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 fileinformation data structure. Specifically, keywords including *FILE, *RECORD, *OPCODE, *STATUS, *ROUTINE

    provide the previously named information.

    3.Program status data structureProgram status data structure however identity exception/errors that are generated in the program by RPG/400operations 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.

  • 8/8/2019 Mainframe AS400 Interview Questions

    21/47

    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)

  • 8/8/2019 Mainframe AS400 Interview Questions

    22/47

    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:

    ForAll 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

  • 8/8/2019 Mainframe AS400 Interview Questions

    23/47

    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

    2009

    Mainframe AS-400 Interview Questions Part 6

    Posted by admin in Untagged

    aQ.What is the purpose of DYNSLT keyword?A.This is a file level keyword used in a logical file. If you specify this in a file level, the system doesn't perform recordselection until the program reads file. Then on the Select/Omit criteria, it selects the records from the specified file.

    Q.What is the difference between access path and Dynamic select?A.Dynamic select occurs whenever the program reads file. But access path occurs before the file is read (but notnecessarily). Because access path maintenance performed on the file.

    Q.Why would you prefer OPNQRYF than logical file?A.The main difference is : Logical file creates permanent object on the system. OPNQRYF creates temporary accesspath.

    Q.When would you prefer logical file than OPNQRYF?A.The physical file you are working with very large, creating and using a logical file will allow an application toperform 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 nothave to be rebuilt every time the file is open.

    Q.What the purpose of the keywords FIFO, LIFO, FCFO?A.These keywords are used at file level. The purpose of each one is described below:1.FIFO: The duplicate key records will retrieved in first in first out order.2.LIFO: The duplicate key records will retrieved in last in first out order.3.FCFO: The duplicate key records will retrieved in first changed first out order.

    Q.What is the difference between regular logical file and join logical file?A.1.Regular logical file contains more than one record format.2.Record format name in regular logical file should be same based on the physical file.3.Join logical file contains only one record format.4.Record format name in join logical file should be different.5.Through logical file we can made changes in physical file.6.Through join logical file we can't made changes in physical file.

    Q.Distinguish between logical file and physical file?A.1.Physical file contains only one record format.Physical file contains actual data.2.Logical file contains more than one record format.Logical file doesn't contains data but it provides view from thephysical file.

    Q.What is field reference file?A.Field reference file is a file, which contains field definitions and descriptions, and it doesn't have member. Physicalcontains data derived by the field reference file.

  • 8/8/2019 Mainframe AS400 Interview Questions

    24/47

    Q.What is the necessary keyword used in a physical file to refer field definitions from the field reference file?A.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)

    Q.What is the purpose of reorganizing the physical file i. e. , RGZPFM?A.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.

    Q.What is the purpose of CHGPF (Change physical file) command?A.CHGPF command is used to change the attributes of a physical file. Attributes like1.Maximum number of members2.Member size3.Level check enforced4.Open data path is shared

    Q.What is purpose of declarative statement DEFN?A.Depends on the factor 1 value it will do two things:1.If the factor1is *LIKE then DEFN opcode defines the new field based on the attributes old field.2.If the factor 1 is *NAMVAR then DEFN opcodes defines the field as a data area.

    Q.What is the purpose of SFLNXTCHG keyword in a subfile?A.Which is a subfile record format keyword. If you perform read on the subfile, the internal indicator MDT (modifieddata tag) is automatically set off by the system. If you again perform read on the same records, records won't beread. Because internal indicator MDT would be off. Hence you should be explicitly set on the MDT by SFLNXTCHGkeyword.

    Q.What is the difference between Array and Table?A.1.Array: 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 t ime.Table: Table can be searched consecutively.

    Q.What are the different types of access paths maintained on the fi le?A.1.Immediate: All the access paths (open and close) associated with a file will be updated whenever changes made toa file.2.Rebuild- only open access paths will update whenever changes made to the file. Rebuild takes place wheneverremaining access paths will be open.3.Delay : Rebuild will not takes place.

    Q.How can you identify End of file in CLP program?A.With the help of MONMSG MSGID(CPF0864) we can identify end of file in clp program.

    Q.What is the difference between production library and test library ?A.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.

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

    Q.What are necessary keywords to code message subfile?A.SFLMSGRCD, SFLMSGKEY, SFLPGMQ

    Q.What is the difference between SETON LR and RETRN?

  • 8/8/2019 Mainframe AS400 Interview Questions

    25/47

    A.If you specify SETON LR, all the files used in program will be closed.If you specify RETRN, all the files used inprogram will remain open.

    Q.When will you use OPEN and CLOSE opcodes in RPG program?A.If you specify the letter "U" at columns 73 - 74 in a file description specification indicating that user control on afile. Hence we have to explicitly open and close the file in a program.

    Q.What 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 changed.In fullyprocedural file the records will be read and processed in any order. The logic flow is controlled by the opcodes in RPGprogram.

    Q.What is the difference between externally described file and program described file?A.The field definitions and descriptions are defined out side of the program in a externally described file. The fielddefinitions and descriptions are defined in side the program in a program described file.

    Q.How many primary files allowed in a program?A.Only one primary file is allowed in program.

    Q.How many secondary files allowed in a program?A.More than one secondary files are allowed in a program.

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

    Q.Define an Interactive Job?A.1.A user requests a job.2.Job is created and job name, job attributes are assigned.3.Job is placed on a job queue.4.The sub system QINTER takes the job from the job queue and starts processing.5.The output generated by the interactive job is placed on the output queue6.The spool sub system QSPL prints the output.

    Q.How 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')ENDDORTVDTAARA DTAARA(JBA001DT *ALL) RTNVAR (&FROMDATE)

    The execution of above steps is listed below:steps1: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 thesystem.

    Mainframe AS-400 Interview Questions Part 7

  • 8/8/2019 Mainframe AS400 Interview Questions

    26/47

    Q.What is the purpose of FRCDTA (Force Data) keyword?A.Use this record-level keyword to immediately display a record format, without waiting for the

    next input or output/input operation.

    Q.What is the purpose of SFLFOLD and SFLDROP keywords?

    A.1.SFLFOLD: To fold the second line of multiple line subfile.2.SFLDROP: To drop the second line of multiple line subfile.

    Q.What is the purpose of PUTOVR (Put with explicit override) keyword?

    A.Use this record-level keyword to permit the override of either display file attributes or datacontents of specific fields within a record displayed on the work station device.

    Q.What is the purpose of OVRDTA (Override Data) keyword?

    A.Use this field level keyword with PUTOVR keyword to override the existing the data contentsof a field already on the display.

    Q.What is the maximum number of record formats in DSPF?

    A.1024 (One thousand and twenty four)

    Q.What is the maximum number of fields under a record format of physical file?A.8000 (eight thousand)

    Q.What is the maximum number of parameters allowed in RPG?

    A.255 (Two hundred and fifty five)

    Q.What is the maximum number of parameters allowed in CLP?A.43 (Forty three)

    Q.What is the maximum number of subroutines allowed in RPG?

    A.254 (Two hundred and fifty four)

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

    Q.What is Join Logical file?

    A.Join logical file joins more than one file. The maximum of number of files allowed to join is32 (thirty two).

    Q.What are the necessary keywords for the Join Logical file?

    A.JDFTVAL, JFILE, JOIN, JFLD, JREF.

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

    file.

  • 8/8/2019 Mainframe AS400 Interview Questions

    27/47

    Q.What is the necessary keyword for Non-join logical file?A.PFILE (which is record level keyword)

    Q.How many levels are there in a Physical file?

    Four levels. They are File level, Record level, Field level, Key field level.

    Q.Difference between View and Index ?A.View 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 andIndex is similar to Logical File having Key (as keyed logical file has access path data) Table is

    similar to PF.

    Q.Can we have records (with fields from more than one file) from multiple files and Nested / subquery in SQL ?

    A.Yes, we can have record from multiple file with join condition and we also can have nestedquery or subquery like SELECT * FROM FILE1 WHERE FILE1.FLD1 IN (SELECT

    FILE2.FLD1 FROM FILE2)

    Q.What is the sequence when using CURSOR?A.

    1.Define Cursor2.Declare Cursor

    3.Open Cursor4.Fetch record

    5.Processing6.Close Cursor

    Q.Different type of Cursor?

    A.Two types of Cursor1.Simple / Serial Cursor

    a.A serial cursor is one defined without SCROLL key wordb.For serial cursor each row is fetched only once per OPEN

    c.When it is opened it is positioned before the first row in the table.d.To use serial cursor we have to re-issue OPEN

    2.Scrollable Cursor which is defined with SCROLL key word.

    a.Cursor defined with SCROLL key wordb.Rows of cursor can be fetched many times

    c.When it is opened it is positioned before the first row in the table.d.When 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)

    Q.How do you achieve referential integrity?

    A.By adding Referential Integrity Constraints to a Physical file or Logical file. Constraints likePRIMARY KEY, FOREGIN KEY, DELETE RULE, UPDATE RULE. ETC.

  • 8/8/2019 Mainframe AS400 Interview Questions

    28/47

    Commands are ADDPFCST for Physical file and ADDLFCST for Logical file.Type ofconstraints

    1.REFCST - A referential constraint is being added2.UNQCST - A unique constraint is being added.

    3.PRIKEY - A primary key constraint is being added

    4.CHKCST - A check constraint is being added

    Type of Delete rule (DLTRULE)

    1.NOACTION a.Deleting 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.b.Deleting 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.

    2.RESTRICT a.Deleting a record in a parent file is permitted if data for a non-null parent key does not match

    data for a foreign key.b.Deleting a record in a parent file is restricted if data for a non-null parent key matches data for

    a foreign key.

    3.CASCADE 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)1.NOACTION No Action

    2.RESTRICT

    a.Updating a record in a parent file is permitted if data for a non-null parent key does not matchdata for a foreign key.

    b.Updating a record in a parent file is restricted if data for a non-null parent key matches data fora foreign key.

    Q.Where Stored procedure lies in the system.

    A.If we want to have a look where the stored procedure, we can have a look through SQL.

    Q.What 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 asprocedures 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 bothdistributed and non-distributed applicaitons.It is defined using DECLARE PROCEDURE

    statement, syntax is as below

    EXEC SQLDELCARE P1 PROCEDURE

  • 8/8/2019 Mainframe AS400 Interview Questions

    29/47

    (:PARM1 INOUT CHAR(10))(EXTERNAL NAME MYLIB/PROC1

    LANGUAGE RPGLESIMPLE 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.

    Q.Writing an SQL statement from selecting records from TWO files using single statement andNested select statement.

    A.Using Single statement.

    SELECT * FROM FILE1, FILE2WHERE FILE1.FLD1 = FILE2.FLD1

    Using Nested Select statement

    SELECT * FROM FILE1WHERE FILE1.FLD1 EQ (SELECT FILE2.FLD1 FROM FILE2).

    Mainframe AS-400 Interview Questions Part 8

    Q.What is Procedure ?A.A procedure is the set of self contained high level language statements that can perform a particular task and thenreturns to a caller.

    Q.How to define a procedure ?A.First we have define Procedure Prototype along with all parameter. And PR.D PROC1 PRThen define Procedure with Begin/EndProcedure Name Begin/EndP PROC1 B ExportThen define Procedure Interface along with parameter and PID PROC1 PI 5 0D PARMA 5 0D PARMB 5 0Define all the parameters as a variable to the procedureD PARMA S 5 0D PARMB S 5 0In not returnable procedure, the procedure should end with

    C PROC1 EIn returnable procedure, it should end withC RETURN PARMA + PARMB

    671. What is Procedure Prototype and Procedure Interface.Procedure PrototypeIn this section we specify the name of the procedure along with PR.D PROC1 PRProcedure InterfaceIt is section where we define all the parameter which are receiving or returning some values.

  • 8/8/2019 Mainframe AS400 Interview Questions

    30/47

    D PROC1 PI 5 0D PARMA 5 0D PARMB 5 0

    Q.How to define Global Parameter in ILE ?A.Declare a variable with key word EXPORT and while using this variable in anther program declare with IMPORTkeyword.

    Q.What is the disadvantage of using Global variable?A.We can not trace out at which point the value of variable is changed.

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

    Q.What is *ISO date format?A.YYYY-MM-DD for other formats refer to IBM manual or ERIS document.

    Q.If we tried to move year part of *ISO date into a field of length 3, what will happen ?A.Program crashes, as in case of *ISO format it required fields of 4,2,2.

    Q.How to avoid using indicators in ILE ?A.By using the standard Built In Expressions like %FOUND,%EOF, NOT %EOF, %BOF, NOT %BOFetc.Display /Printer File

    Q.What is EDTCDE and EDTWRD ?A.EDTCDE & EDTWRD are key words used for formatting purpose. EDTCDE cannot be applied to Character filed. AndEDTCDE has some Codes pre-defined for example, EDTCDE(Z) for suppressing the leading zero Y for datefield.EDTWRD can be used to define user defined formatting for a fields.

    Q.What is OVERLAY?A.It allows a record format to be displayed on screen retaining the previous displayed record formats.

    Q.What key word is used when screen is re-display?A.RSTDSP is a parameter to be specified at compile time for display file.

    Q.Command Attention key and Command Function Key ?A.With the help of Command attention key we can pass only the indicator status to program not the data fromscreen. While command function key passes indicator status as well as a data from screen to program.

    Q.How to validate input values in Display file ?A.with the help of Validity check key words VALUE, RANGE, COMP

    Q.What are the disadvantage of using Validity Check keyword? How to overcome these disadvantages ?

    A.1.If invalid values are entered,2.The option filed is displayed in reverse image.3.System defined message is displayed which may not be user friendly.4.Keyboard is locked, we have to reset it.5.To overcome above disadvantage validations is done within program and user

    Q.What are the important factors in Error message subfile ?A.We must define error message record format (SFLMSG). And a Program Queue. (PGMQ) and Record format isassociated to a line number.

  • 8/8/2019 Mainframe AS400 Interview Questions

    31/47

    Q.How to define to define a Hidden filed in DSPF ?A.Define a filed in a DSPF of use HIDDEN.(H)

    Q.How To get the cursor position?A.With the help of RTNCSRLOC keyword, here we need to define a field to get row and column. Length of variableshould be 5,0 fixed We can specify *FILED for filed *REC for Record on which a key is pressed.

    Q.What do we can do with the Embedded SQL statements?A.We can Insert/Update/Delete records, fetch records, fetch values from records into variables.

    Q.What 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?A.False

    Q.DLCOBJ command is mandatory for removing lock on any object?A.False

    Q.What is a Journal?

    A.A Journal is an object used primarily to record changes to data in a PF.

    Q.Which are the DB2 tools to protect Integrity of the database?A.Journaling & Commitment Control, Referential Integrity Embedded SQL & Object/Record Locks.

    Q.A program variable coded in an Embedded SQL statement is referred to as?A.Host Variable

    Q.Which of the CL command can be used to determine which logical files are dependent on a specific file?A.DSPDBR

    Q.Which CL command is used to trap error messages during program execution?A.MONMSG

    Q.Which CL command can be used at program execution to redirect the file named in an RPG program?A.OVRDBF

    Q.What is the length of the variable in the given example? DCL VAR (&Name) TYPE (*Char)?A.Default 32 & for Decimal 15,51 - 8 Character *FILE The first 8 characters of the file9 - 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 posi22 - 29 Character *ROUTINE First 8 characters of the procedure30 - 37 Character RPG IV source listing line number

    Q.How to determine if the record is in used by another user ?

    A.We 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.

    Q.How to write *PSSR ?A.It just similar to any other subroutine.*PSSR BEGSR.ENDSR

  • 8/8/2019 Mainframe AS400 Interview Questions

    32/47

    Nov 13

    2009

    Mainframe AS-400 Interview Questions Part 9

    Posted by admin in Untagged

    Q.What are the different commands used in RLU ?A.1.DR - Define Record,2.CLC - Change Line for Continuation,3.CLR - Change Line for Record,4.SD - Create Sample Data,5.VF - View Fields,6.NP - New Page,7.DC - Define Constants,8.DF - Define Fields9.CF - Centre Fields10.SP - Space Fields evenly.

    Q.What is the command used to invoke RLU ?

    A.STRRLU.

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

    Q.Mandatory keywords of sub fileA.SFL, SFLCTL, SFLDSP, SFLSIZ, SFLPAG are the mandatory key words

    Q.Difference between SFLRCDNBR and SFLNXTCHGA.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 itis SETON then READC will read only the changed record. And if the indicator is not associated and it is seton itREADC reads all the records from sub-file

    Q.How can see logical file based on which physical file and vice versaA.DSPDBR

    Q.How can u check no of records in a fileA.DSPFD

    Q.How do u compile RPGLE programA.Either thru 15 or crtrpgmod

    Q.Is module executableA.No You need to create an RPG prog to run the module

    Q.What 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

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

  • 8/8/2019 Mainframe AS400 Interview Questions

    33/47

    Q.What is LOKUP opcode?Looks for a particular element of an array

    Q.How many files, printer files you can describe in a RPGA.50 files and 8 printers

    Q.How do handle file exception/error

    A.*INFDS ,*PSSR defining it in F spec

    Q.What is OPNQRYF, MONMSG commandsA.It is Dynamically creation of access path, and it can have resultant fields i.e. if the expression is A = B + C then Band 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 monitorand error/exception message so that in case of an error a dump is avoided and the control is in program. It is alsoused to monitor user message.

    Q.How do you set pointers to values 55 or next higher or greater?A.SETGT.

    Q.How will I explicitly open a file in an RPG program?A.By 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?A.LR closes all the files used in the program and RETURN is used to return the control to the parent program.

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

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

    Q.How will you find a string using PDM?A.by using FNDSTRPDM.

    Q.How will you search an array?A.LOKUP

    Q.What are the different types of arrays?A.Preruntime gets populated at the time input. Runtime gets populated at the time execution.Compile time getspopulated at the time of compilation.

    Q.What is message file?A.It is file which contain messages created by the user through which a user can display own message whilevalidating.

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

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

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

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

  • 8/8/2019 Mainframe AS400 Interview Questions

    34/47

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

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

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

    Q.How do you read changed records backward in subfile?A.NOT POSSIBLE.

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

    Q.What is SFLROLVAL?

    A.By using this keyword you can tell system to roll on of records when the user presses ROLLDOWN key (For this youdefine a hidden of 4 byte).

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

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

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

    Q.What is maximum size of data area?

    A.9999.

    Q.How to fire a JOB?A.SBMJOB.

    Q.How many levels of security are there on AS/400?A.There are 10 to 50 level of security on AS/400.

    Nov 13

    2009

    Mainframe AS-400 Interview Questions Part 10

    Posted by admin in Untagged

    Q.How to translate field values form lower case to Upper case?A.By using opcode XLATE.

    Q.What are the maximum parameters can be passed from one RPG program to another RPG program?A.255

    Q.How many maximum parameters can be passed from on RPG program to another CL program?A.40

  • 8/8/2019 Mainframe AS400 Interview Questions

    35/47

    Q.How many maximum arrays can be used in a single RPG program?A.200.

    Q.How many maximum loops can be used in a single RPG program?A.100

    Q.How many maximum printer files can be used in a single RPG program?A.8

    Q.What is the maximum length of an OCCUR?A.9999.

    Q.What is a subfile?A.Subfile is a group of records which can be used for (Displaying, Adding new record, Modifying the existing record,and Deleting the existing records).

    Q.What is maximum size of a subfile?A.9999.

    Q.How do you write and read a value (similarly as EXFMT of RPG) using a display file in CL?

    A. SNDRCVF.

    Q.How do you display a screen in CL?A.SNDF.

    Q.How to check end of file in CL?A.Monitor the message ID (CPF0864).

    Q.Can you update a file in CL?A.NO.

    Q.Can you add a record to a physical file through CL?A.NO

    Q.What opcode is used for submit job? Why it is used?A.SBMJOB opcode is used and it is used for background processing.

    Q.How do you monitor message in CL?A.By using monitor message ID: (MONMSG MSGID (CPF0000)

    Q.Except report design what else can be done by O spec?A.We can write a Physical File from O spec.

    Q.What is the full for of CA and CF?A.Command Attention and Command Function.

    Q.Difference between WRKUSRJOB and WRKACTJOB?A.All the jobs in WRKUSRJOB are seen including Active jobs where as in WRKACTJOB only active jobs are seen.

    Q.What are the three levels of SDA?A.File level, Record level, Field level.

    Q.What is *PSSR?A.It is a system subroutine which is executed by default when any error occurs in a program.

    Q.Why do we define MOVE *ON *INLR?A.It frees the memory. All the fields and parameters in the memory will become blank.

  • 8/8/2019 Mainframe AS400 Interview Questions

    36/47

    Q.How do you shutdown your IBM server?A.PWRDWNSYS.

    Q.If your workstation does not show login screen what might be the problem?A.Problem with some subsystem.

    Q.You have given a job for printing and you are not getting the printout what might be the reason?

    A.Some more pending jobs might be there in Job Queue.

    Q.There are multiple jobs for printing in job queue and you want to print a important document then what will youdo?A.Change the priority or change the job queue name.

    Q.How to see the CPU usage?A.WRKACTJOB or WRKSYSSTS.

    Q.Explain the sequence of execution of an RPG/400 program?A.During execution, an RPG/400 program automatically follows a sequence of operations for each record that isprocessed. The built-in program cycle includes the following logical steps.1.reading input (READ)2.processing calculations (PROCESS)

    3.writing output (WRITE)

    Q.What is the Function of PDM?A.Productivity tool for copying, deleting, scanning, changing & creating source files.

    Q.What is the function of SEU ?A.A utility for editing programming language source code.

    Q.What is the use of SDA ?A.Screen Design Aid is used to create display files interactively.

    Q.What is a library in AS/400 ?A.Library in AS/400 is an object that serves as a repository for other objects.

    Q.Name few IBM supplied libraries ?A.GPL, QTEMP, QUSRTOOL, QSYS, QRPG & QCBL.

    Q.What is a library list ?A.Library list that indicates libraries used for the process and the order in which it has to be searched. Systemidentifies it in *LIBL.

    Q.How many libraries can be there in a library list ?A.Total 40 (15 system and 25 application).1.DDS - Data Description Specification.2.Source Physical File contains the source for the various objects created. This file has a specific structure.RPG, CLP, DSPF, PRTF, etc.A-specUNIQUE, PFILE, REFFLD

    Q.What is the difference between Physical and Logical files ?A.Physical file contains data, where as Logical file serves as a access path to database.

    Q.What does the keyword UNIQUE mean ?A.Records with duplicate key values are not allowed.

    Q. How many record formats can you have in a Physical file and in a Logical file ?A.Physical file can contain only one record format, Logical file can contain more than one record format.

  • 8/8/2019 Mainframe AS400 Interview Questions

    37/47

    Q.What does SDA stands for ?A.Screen Design Aid.

    Q.What is the symbol used for defining a new field in SDA?A.'+'.

    Q.What is the symbol used for shifting fields in SDA?

    A.''.

    Q.What is the symbol used for copying & moving new field in SDA?A.Copying : '-' & '=='.Moving : '-' & '='.

    Q.What 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

    Q.How do you place or remove locks on the objects?A.*AACOBJ & *DLCOBJ

    Q.Some of the object types on which locks can be allocated?Data Area, Data Queue, File, Library, Message Queue, Menu &Program.

    Q.What is the opcode to release all the locks on a particular PF?A.UNLCK

    Q.What is a trigger?A.A trigger is an action that automatically occurs whenever a change Is made to a physical file.

    Q.How many triggers can be associated with a single PF?A.6 (max)

    Q.How can we know the triggers associated with the PF?A.DSPFD with parameter TYPE (*TRG)

    Q.How can we add & remove trigger to a PF?A.ADDPFTRG & RMVPFTRG

    Q.What is an Output Queue?A.They are the holding areas that store printed output generated from Batch programs or Interactive applications.

    Q.What does print writer do?A.It is a system job that selects files from the output queue & prints Them on a printer. It provides the interface

    between output queues Spooled files & the printer.

    Q.What are the 2 types of lines on O Specs?A.Record Identification Line & Field Identification Line.

    Q.Can a Subroutine contain another Subroutine?A.No.

    Q.Does the SETLL & SETGT retrieve the record?A.No, they simply position to the record.

  • 8/8/2019 Mainframe AS400 Interview Questions

    38/47

    Q.What is a table?A.A table is collection of data elements in one column, data elements Must be of same type and same length.

    Q.What is a Compile Time Table?A.We can hard code data within the program is said to be Compile Time Table.

    Q.What is a Run Time Table?A.Data from a separate disk file is loaded into a table each time the Program runs.

    Q.Give the Table definition?A.TABMT 1 12 2 A Where 1 = Number of entries per record 12 = Total number of entries 2 = Length of each entry A= Ascending Sequence.

    Q.If the data is likely to change over a period of time & Moreover data is large than which type of table is preferred?A.Compile Time Table.

    Q.What is Alternate Table?A.RPG tables stores information in 1 column. To store information in multiple columns, it uses the concept ofAlternate Table.

    Q.What is an Array?A.Array is a collection of data, the data elements must be of same Length and same type.

    Q.The Qualified name for an object ORDPF residing in a library TRAINING is?A.RAINING/ORDPF

    Q.The members in a Source Physical File contain?A.Source statements for a program.

    Q.The members in LF contain?A.Access Path.

    Q. The members in a PF contain data? True/False)A.True

    Q.What is the command to view the library list?A.DSPLIBL

    Q.What is the command to create PF?A.CRTPF

    Q.The LF is associated with how many PFs?A.At least one PF at a time.

    Q.The function key to start SEU session through program development manager is?A.F6

    Q.The Member type for an RPG & CL program which SEU supports is?

    A.RPG & CLP

    Q.Printed output items placed in an output queue are known as?A.Spool Files.

    Q.When a spooled file is created, it is placed into an?A.OUTQUEUE

    Q.The command to display a list of spooled files?A.WRKSPLF

  • 8/8/2019 Mainframe AS400 Interview Questions

    39/47

    Q.Change in the externally described file does not require recompilation of the program? (True/False)A.False

    Q.Command to display current library is?A.DSPCURLIB

    Q.A PF can have how many record formats?A.Only one

    Q.Which one of the following has the highest priority Library on top of the library list, Library QGPL, Library on thebottom of the library list & Current library?A. Current library

    Q.While designing the screen user wants to add file level keywords then which function key is pressed?A.F14

    Q.While designing the report using RLU user wants to add record level keywords which function key is pressed?A.F18

    Q.If user wants to add one field on the report then which function key is pressed?

    A.F11

    Q.If user wants to center the company name on his report then which command will be used?A.CF (Center Field)

    Q.SEU shows prompt/syntax checking according to?A.Member Type

    Q.It is possible to run Query using RUNQRY command?A.YES

    Q.Using Query it is possible to create level break report?A.YES

    Q.Using DFU user can do which operation?A.Add, Update & Select fields

    Q.What is the difference between UPDDTA to PF & updating using DFU?A.Both 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

    Q.Which function key should be pressed to watch all string defined on SDA screen?A.F20

    Q.While designing the screen using SDA, which function key should be pressed to get the field from the FRF?A.F10.

    Q.From WRKMBRPDM screen you have to modify existing member-using SDA which option do you select?A.17.

    Q.Write system defined function used to place system name on the screen?A.*SYSNAME

    Q.While designing screen F3 function key is kept common for all record formats on which level should it be defined?A.File level

  • 8/8/2019 Mainframe AS400 Interview Questions

    40/47

    Q.If user wants to change the length of the numeric field defined in the report then which combination of the keyswill be used?A.F23 & F10

    Q.What is the difference between SKIPB (2) & SPACEB (2)?A.SKIPB (2) skips 1 page & on the next page after skipping 2 lines space print next while SPACEB (2) skips 2 linesspace before printing.

    Q.RLU: If user wants to define new numeric field on record format then which line command will be used?A.VF

    Q.Maximum report length is 132, if user is designing a report using RLU?A.FALSE (Maximum is 378)

    Q.To change constant field defined on RLU screen which field level keyword should be used?A.DFT (Default)s

    Mainframe AS-400 Interview Questions Part 13

    Q.Which Function key should be pressed to define hidden field while you are working withSDA?

    A.F4

    Q.Which function key should be pressed to watch all strings defined on the SDA screen?

    A.F20

    Q.While designing the screen using SDA, which function key should be pressed to get the fieldfrom the field reference file?

    A.F10

    Q.From work with member using PDM screen you have to modify existing member using SDA,which option do you select?

    A.17

    Q.While designing the screen, F3 function key is kept common for all record formats. On whichlevel should it be defined?

    A.File Level

    Q.While designing the screen user wants to add file level keywords, then which function keyshould be pressed?

    A.F14.

    Q.While designing the report using RLU, user wants to add record level keyword then whichfunction key should be pressed?

    A.F18.

    Q.If user wants to add one field on the report then which function key should be pressed?A.F11.

  • 8/8/2019 Mainframe AS400 Interview Questions

    41/47

    Q.If user wants to center the company name on his report then which line command will be

    used?A.CF.

    Q.If user wants to change the length of the numeric field defined in report then whichcombination of keys will be used?A.F23 & F10.

    Q.RLU: If user wants to define new numeric field on record format then which line command

    will be used?A.VF.

    Q.Maximum report length is 132, if user is designing a report using RLU?

    A.FALSE (378 Max).

    Q.To change constant field defined on RLU screen which field level keyword should be used?A.DFT

    Q.RLU: Which field level keyword should be used to change any numeric field of length 8 to

    99.99.9999 format?A.EDTWRD ( . . )

    Q.What is the difference between normal UPDDTA to PF and updating using DFU program?

    A.Both are same only difference is DFU allows you to add or change selected fields.

    Q.What is Library?A.A library is a system object that serves as a directory to other objects or collection of object

    Q.What is Library List?

    A.A jobs library list defines the path of libraries that the job follows when trying to locateprograms, files or other As/400 objects.

    Q.Difference between Source Physical File & Physical File?

    A.Source Physical File contains members who contain source statements & Physical Filecontains members, which contain data.

    Q.Types of Libraries on As/400?

    A.There are 3 types of libraries on As/400 they are System (*sys), User (*test) & Product(*prod).

    Q.Type of Source File & Physical File?

    A.Source File: - *PF/SRC Physical File: - *PF/DTA

    Q.Whats the use of STRPDM?A.To work with Libraries, Objects, Members & User Options.

  • 8/8/2019 Mainframe AS400 Interview Questions

    42/47

    Q.In which Specs can PF be made internally?

    A.In I Specs.

    Q.What is the format of As/400 Commands?

    A.Verb Object Qualifier Verb: - action Object: - on which action is performed Qualifier: -identifies your job

    Q.What is externally described file?A.A file, which is created externally & described in the program, is called as external described

    file.

    Q.What is Qualified & Unqualified path?A.Qualified path means mentioning object name along with library name while Unqualified path

    means directly writing the object name.

    Q.Which path a good programmer should use?A.Unqualified path.

    Q.How many types of files are available on As/400?

    A.There are 2 types of files on As/400 they are Databases files & Device files.

    Q.How can you specify no duplicate key?A.By defining the unique key.

    Q.What is the command to know how many LF are related to a PF?

    A.ASPDBR (Display Database Relationship)

    Q.What is the command to know key fields of file?A.DSPFD (F4) *ACCPTH(Access Path).

    Q.Can a Join Logical File be updated?

    A.No.

    Q.What is the object type of PF, LF, Printer file & Display file?A.*File

    Q.For, which purpose is H Specs used?

    A.Writing header information, date separator, currency symbol etc.

    Q.What is the size of the filename in RPG?A.8 Characters (Max.)

    Q.Which are the different File Types in RPG?

    A.I (Input), O (Output), U (Update) & C (Combine).

  • 8/8/2019 Mainframe AS400 Interview Questions

    43/47

    Q.What are the different File Designation Types in RPG?

    A.P (Primary) & F (Fully Procedural)

    Q.What is the use of UNIQUE keyword and what level it is defined?

    A.It will avoid to enter duplicate key values. We have to define it in a file level.

    Q.At 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.

    Q.What is the difference between Packed decimal and Zoned decimal?A.

    1.Packed decimal : One digit occupies 1 byte.2.Zoned decimal : One digit occupies 2 bytes.

    Q.What is default data type (if you define decimals '0') in Physical file?

    A.Packed decimal

    Q.What is default data type for the fields(sub fields) defined in data structures in RPG?A.Zoned decimal

    Q.What is the use of JDFTVAL in join logical file?

    A.If you specify JDFTVAL at file level, even the primary file record does not match withsecondary file record, the join takes place.

    Q.Is it possible to create a physical file without DDS?

    A.Yes. With the help of CRTPF we can achieve this. But we have to give record length.

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

    Q.What is a composite key?

    A.Defining more than one key as a key field in physical file.

    Q.What is arrival sequence?A.The records will be accessed the way in which records are added to physical file.

    Q.What is the maximum number of key fields allowed defining in a physical file?

    A.s120

    Q.What is acronym of RPG?A.Report Program Generator

    Mainframe AS-400 Interview Questions Part 14

  • 8/8/2019 Mainframe AS400 Interview Questions

    44/47

    Q.How many types of display are available on As/400 for user interaction?A.The 4 Types they are Entry, Menu, Information & List Display.

    Q.Which is the Primary Editor of As/400?A.Source Entry Utility (SEU).

    Q.What are the basic features of SEU?Prompt depending upon type, shows right hand side date & left hand side the line number.

    Q.What are the different methods to access SEU?Use the Start Source Entry Utility command (STRSEU) Option 8 from STRPGMMNU Through Program DevelopmentManager (PDM)

    Q.Which are the member types which SEU supports?RPG, CL, PF, LF, PRTF & DSPF.

    Q.In which Specs Arrays, Tables & Constants are defined?A.In I Specs.

    Q.What is a Spool File?

    A.Printed output items placed in an output queue are known as spooled files.

    Q.How many Specs are there in RPG & Which are they?A.There are 7 Specs in RPG they are H, F, E, L, I, C & O.

    Q.Difference between GOTO & EXSR?A.EXSR is a conditional branching while a GOTO is an unconditional branching.

    Q.Difference between CA & CF?A.CA: - It does not retains the value into the buffer memory. CF: - It retains the value into the buffer memory.

    Q.What does EXFMT does?A.Write & Read.

    Q.What does the OVRDBF command do?A.It overrides the PF temporarily for a job.

    Q.How does the RUNQRY show the output?A.RUNQRY shows the output always in RRN (Relative Record Number) & not in keyed sequence.

    Q.How many printer files maximum can be used in single RPG program?A.8 because of the overflow indicators OA-OG & OV.

    Q.When you are defining a flat file in your program in F Specs which format will you specify?A.Flat File: - F (Fixed Length) Other File: - E (Externally Described)

    Q.Difference between skip before & space before?A.Skip before leaves the specified no. of lines moving to the next page while Space before leaves the specified no.

    of lines on that page.

    Q.Which indicator is used for Read?A.EQ (Equal to)

    Q.Which are the figurative constants used in RPG?A.*ZERO,*BLANK, *ZEROS, *BLANKS, *HIVAL, *LOVAL, *OFF, *ON & *ALL.

    Q.What is the syntax for PLIST?*ENTRY PLIST PARM

  • 8/8/2019 Mainframe AS400 Interview Questions

    45/47

    Q.What are indicators?A.Indicators are inbuilt class of variables for RPG.

    Q.What is CAB?A.It compares Factor1 with Factor2 & if condition is true, control is transferred to label designated in the resultfield. The label specified must appear as the Factor1 of a TAG operation somewhere in the program.

    Q.Which are the Relational Operators in RPG?A.GT, GE, LT, LE & EQ.

    Q.In O Specs what is the opcode for write?A.EXCPT.

    Q.What is Subroutine in RPG?A.A subroutine is a group of statements in a program that can be processed several times in that program.

    Q.Do we have to Execute the *INZSR compulsory?A.No, it is a system-defined subroutine it is executed automatically.

    Q.What is the use of *PSSR in the program?

    A.Whenever there is any type error in the program the control straight away passes onto this subroutine.

    Q.What are the types of Tables in RPG?A.There are 2 types of tables in RPG they are: - Compile Time Tables Pre-Runtime Tables

    Q.What does LOKUP does in Tables & Arrays?A.The LOKUP opcode searches the Factor1 entry in table or array.

    Q.Whats the use of File Designation in RPG?A.It refers to the way program will access or retrieve the data from the fi le.

    Q.What are the different File Format Types in RPG?A.F (Fixed Length) & E (Externally Described)

    Q.What is the use of File Format in RPG?A.It tells to the program that the records are within the program (F) or outside the program (E).

    Q.What is L Specs for?A.To tell length of page & number of lines to be printed on a page.

    Q.What is I Specs for?A.To describe the records within Program described file, fields, constants, divide fields into sub fields & to form agroup of fields.

    Q.File Access Opcodes?A.READ, SETLL, SETGT, READE, READP, READPE CHAIN, KLIST, KFLD, EXCPT & WRITE.

    Q.What is RPG Fixed Logic Cycle?

    A. A logic the compiler supplies is called RPG Fixed Logic Cycle.

    Q.Difference between Interactive & Batch Job?A.Batch job begins, runs & continues to execute instructions without human intervention or control whileInteractive job are user driven.

    Q.How can we run a Batch Job?A.SBMJOB Command.

    Q.Difference between CALL & SBMJOB?

  • 8/8/2019 Mainframe AS400 Interview Questions

    46/47

    A.CALL performs interactively job while SBMJOB performs batch job.

    Q.What does VLDCMDKEY means?A.Valid Command Key.

    Q.What is the error if we dont get login screen?A.There is some problem with subsystem.

    Q.How to run other job when one job is active?A.Change the priority or rename the job.

    Q.What is the use of Data Structures?A.1.Dividing a field into sub fields.2.Changing the format of a field.3.Grouping non-contiguous data in a contiguous format.4.Defining an area of storage in more than 1 format.

    Q. Space & Skip are which level keywords?A.Field & Record

    Q.A Join Logical File has how many Record formats?A.1

    Q.A Multiple format Logical File is also known as?A.Union File

    Q.How does Union file maintains Record formats?A.1 Record format for each PF

    Q.What is full form for DDS?A.Data Description Specification

    Q.What are members?A.Members are separate entities within a database file & they are components of As/400 object.

    Q.How many maximum spaces could be given in O Specs?A.3

    Q.Which are Control Break Logic indicators?A.L1 L9.

    Q.Which are the String Manipulation Opcodes?A.TESTN, SCAN, CHECK, CHECKR, SUBST & CAT

    Q.DB2 is a type of Database?A.It is an Integrated RDBMS.

    Q.An access path may be in which sequence?

    A.It can be in Arrival & Keyed sequence

    Q.Records can be Read/Update/Deleted with which file?A.Simple Logical File & Physical File.

    Q.Which type of object is used in DB2/400?A.*FILE

    Q.A Query can be displayed without saving it?A.true

  • 8/8/2019 Mainframe AS400 Interview Questions

    47/47

    Q.Which are the Query selection criteria, which can be given in a Query?A.LIST

    Q.To 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?A.Batch & Interactive