AS400 Interview Questions & Answers

AS400 Interview Questions

Searching for jobs know a day has turned out to be very difficult that searching itself becomes a job. Not only preparing for the interview one must know where to apply for appropriate job. Here in Wisdomjobs site to avoid such difficulty and save your precious time we have provided a complete detail of AS400 interview question and answers in our site. To clear the interview, one must prepare well for the interview. There are many leading companies that offer AS400 jobs in various position like As/400 Application Developer, AS400 Testing Engineer, AS/400 Application Developer - iSeries/COBOL, AS 400 Developer, RPG/AS400 Senior Developer, and many other roles too. To get the complete details about AS400 Interview Question and Answers and various role in AS400 jobs visit our site

AS400 Interview Questions And Answers

AS400 Interview Questions
    1. Question 1. How Are The Objects Stored On As/400?

      Answer :

      All objects are stored on AS/400 in a single level storage. In this method all objects are referenced by one virtual address which is translated in to a physical address whether it is an auxiliary storage or main memory.

    2. Question 2. What Is A Library In As/400?

      Answer :

      A library in AS/400 is an object that serve(acts) as a repository for other objects.

    3. Question 3. What Is Library List?

      Answer :

      A list that indicates libraries used for the process and the order in which it has to be searched System identifies it in *LIBL.

    4. Question 4. How Many Libraries Can Be There In Library List?

      Answer :

      Total 40 (15 system and 25 application).

    5. Question 5. Describe The Function Of Setll Operation In Rpg Language?

      Answer :

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

    6. Question 6. Describe The Function Of Setgt Operation In Rpg Language?

      Answer :

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

    7. Question 7. What Is The Purpose Of Level Check Parameter In A Physical File?

      Answer :

      Specifies whether the level identifiers of the record formats in the physical file are checked when the file is opened by the program.

    8. Question 8. Define A Job Queue?

      Answer :

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

    9. Question 9. What Is Compiler Directive In As400? Give Example Of Compiler Directive.?

      Answer :

      Compiler directive : Compiler directive is an instruction (directive) given to the compiler, to perform some specific task during compilation or to generate customize compiler listing report after compilation.
      Compiler directive serve many purposes like it is used to control the heading information in compiler listing, to control the spacing of the compiler listing, to include source statement from other source member, to do a free form calculation in our rpgle program, to control the source records selection/omission based on some condition etc.
      Compiler directives are:

      1. /FREE... /END-FREE
      2. /TITLE
      3. /EJECT
      4. /SPACE
      5. /COPY or /INCLUDE
      6. /IF……/ELSEIF…. /ELSE…… /ENDIF
      7. /EOF

    10. Question 10. How Can We Create Subsystem In As400?

      Answer :

      Steps of creating the subsystem :
      Create Subsystem description (CRTSBSD) :
       First of all we create subsystem description as below:
      CRTSBSD   SBSD (AMINEM/MYSBSD) POOLS ((2 *BASE)) MAXJOBS(2)  TEXT('My  subsystem description')
      Here, the subsystem job will run in pool 2 and will use *BASE for main memory storage. There can maximum of 2 jobs inside the subsystem at a time.
      Create Job queue (CRTJOBQ) : Then we create a job queue as below:
      CRTJOBQ   JOBQ (AMINEM/MYJOBQ) TEXT('My job queue') 
      Add Job Queue Entry (ADDJOBQE) : Once the job queue is created, then we attach the (ADDJOBQE) command, as follows:
      MAXACT denotes the number of the jobs that can be process at the same time.
      Create Class (CRTCLS)
      Class defines the run time attribute e.g. Run priority, Time slice, Default wait time, Maximum temporary storage etc.
      Add Routing Entry (ADDRTGE)
      Start Subsystem (STRSBS)
      Once the subsystem is started it can be used to submit the job.

    11. Question 11. What Is File Information Data Structure(infds) In As400?

      Answer :

      A file information data structure (INFDS) can be defined for each file to make file exception/error and file feedback information available to the program.

    12. Question 12. What Is Program Status Data Structure(psds) In As400?

      Answer :

      A program status data structure (PSDS) can be defined to make program exception/error information available to the program so that the necessary action can be taken for the unhandled exception. The exception /errors can beDivide by zero, array index out-of-bound, Invalid Date, Time or Timestamp value. The PSDS must be defined in the main source section; therefore, there is only one PSDS per module.

    13. Question 13. What Are The Types Of Data Structure In As400?

      Answer :

      Below are the types of data structures in as/400:


    14. Question 14. What Is Data Structure In As400? What Is The Use Of Data Structure?

      Answer :


      •  Data structure in general means a structure of different data type.
      •  Data structure is specified in the Input Specification of an RPG 3 Program whereas in RPG 1V we specify it in 'D' specification.

      Data Structure is used:-

      1. To break fields into subfields
      2. To Group fields
      3. To change the format of the field
      4. To Group non-contiguous data into contiguous format
      5. To convert data.

    15. Question 15. What Is Array In As400? What Are The Types Of Array?

      Answer :

      Array is collection of elements of same data type.
      Types of Array

      1. Compile time array
      2. Pre-runtime array
      3. Run time array

    16. Question 16. What Is The Difference Between Physical File And Logical File?

      Answer :

      Physical file

      • Occupies the portion of memory. It’s containing data. 
      • A physical file contains one record format
      • Can be exist even without LF
      • If you delete a LF, the PF can’t be deleted
      • CRTPF command is used to create such object

      Logical file

      • Does not occupy any memory space. Does not contain any data.
      • A logical file can contain up to 32 record formats.
      • Can’t exist without PF
      • If you delete a LF, the PF can’t be deleted
      • CRTLF command is used to create such type object

    17. Question 17. What Is The Difference Between Non-join Logical Files And Join Logical Files?

      Answer :

      Non join logical file:

      • We can insert or delete or update records using non-logical file.
      • DFU can be used to display non-join logical file.
      • 1-32 record format is specified
      • Commitment control is used

      Join logical file:

      • Insertion, updating or deletion of records is not possible in join logical files.
      • DFU is not available
      • Only one record format can be specified
      • Commitment control cannot be used.

    18. Question 18. What Is Access Path In As400?

      Answer :

      Access path

      •  Access path describes the order in which records are to be read.
      •  Access paths can be kept on the system permanently (such as physical or logical file) or temporarily.
      •  OPNQRYF command may create a temporary access path for use one time, and then discard the access path.

    19. Question 19. What Is The Difference Between Crtdupobj And Copyf?

      Answer :

      In CRTDUPOBJ for a logical file the created duplicate file will be also logical file and for a physical file the created file will also be a physical file. Even the record format identifier will also be the same. While in case of COPYF, if we are copying a logical file then the created file be a physical file not a logical file.

    20. Question 20. What Are The Record Format Field Mapping Options In Cpyf?

      Answer :

      Record format field mapping (FMT):

      MAP :   Fields with the same name in the from-file and to-file record formats are copied, and any fields in the to-file that do not exist in the from-file format are set to the default value specified on the DFT keyword for the data description specification (DDS) of the to-file or zero for numeric fields, blanks for character fields, current date/time for date/time fields, or null value for null-capable fields.
      If *MAP is specified, *DROP can also be specified.
      DROP : This value must be specified for field-level mapping if any of the field names in the from-file record format do not exist in the to-file format. If *DROP is specified, *MAP can also be specified. When *DROP is specified, all the field names that exist in both record formats must have the same attributes and relative positions in the from-file and to-file record formats, or *MAP must also be specified. Null values are copied.
      NOCHK :  If the record formats of the database files are different, the copy operation continues despite the differences. Record data is copied directly (left to right) from one file to the other. FMTOPT (*NOCHK) is required when copying all record formats from a logical file with multiple formats (when RCDFMT (*ALL) is specified) to a physical file that is of the same type (source or data) as the from-file.
      CVTSRC : This value is used to copy between database files, from a source file to a data file, or from a data file to a source file. It is valid only when the from-file and to-file are different types (source and data).

    21. Question 21. What Is The Default Access Path Of A File?

      Answer :

      If you do not specify the type of maintenance for a file, the default is immediate maintenance.

    22. Question 22. What Is Logical File In As400? What Are The Types Of Logical File?

      Answer :

      Logical file : 

      • Logical file does not occupy any memory.
      • One or more logical file can be derived from a single physical file.
      • It simply contains the record selection definition and when accessed retrieves the records from the physical file to which it refers.
      • A logical file can contain up to 32 record formats.
      • It selects records dynamically. It cannot exist without a physical file.
      • We can filter the data with criteria by using select and omit command.
      • A logical file does not contain any data but provides the ‘VIEWS’ of the data to satisfy end-user’s needs.

      Types of Logical file :  There are two types.

      1. Non-join logical file
      2. Join logical file

    23. Question 23. What Is Dynslt?

      Answer :

      DYNSLT: Use this file-level keyword to indicate that the selection and omission tests specified in the file (using select/omit specifications) are done at processing time. This keyword specifies dynamic select/omit rather than access path select/omit.
          Only a Physical file contains data. Logical files just contain pointers for processing the data in a specific sequence and/or subset of data.
          When a record is added/changed/deleted in a physical file, the system has to put a lock on it and then go out to check and update any logical files before it can release the lock. While the amount of time to do this is hardly measurable, it can be significant if massive batch updates are done to a file. 
          If you are using the Select/Omit option in your DDS and using DYNSLT, the above process does not need to be done at record update time. 
          Where this is beneficial is when your selection process includes almost all the records in the file. Now when you process using DYNSLT, it will read all the records in the file, but do the selection of which records to process at that time rather than having done all the maintenance ahead of time.

    24. Question 24. What Is The Difference Between Access Path And Dynamic Select?

      Answer :

      Dynamic select occurs whenever the program reads file. But access path occurs before the file is read (but  not necessarily).

    25. Question 25. What Is The Use Of Jdftval In As400?

      Answer :

      • When this file-level keyword is used the system provides default values for all for fields when a join to a secondary file does not produce any records.
      • If this keyword is not specified a record in the primary file for which there is no corresponding record in the secondary file is skipped.

    26. Question 26. Can Level Check Error Occur If We Do Chgpf?

      Answer :

      It depends on the value that we have set for LVLCHK (Record format level check) attribute. If its value is *YES then the record format level identifier is checked when the file is opened and if it doesn’t match it throws the error. If its value is *NO, then the record format level identifier is not checked, hence no error.

    27. Question 27. How Can We Arrange Duplicate Records In A File?

      Answer :

      For this we will use file level keywords FIFO/LIFO/FCFO in the physical file.
      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.

    28. Question 28. How To See All Record Formats Used In A File?

      Answer :

      By using the command shown below:

    29. Question 29. How To See All Members Of A File?

      Answer :

      By using the command shown below:

    30. Question 30. What Is Source Physical File?

      Answer :

      Source physical file is a file which contains the sources of different types of objects. There can be up to 32768 members. Source physical file is an object. But the source member is not an object. When we compile the member, the object is created for that source. Command used is CRTSRCPF.

    31. Question 31. Is Qgpl A User Library Or System Library?

      Answer :

      It’s a user library.

    32. Question 32. What Is Library Is As400? What Are The Types Of Library?

      Answer :

      When we execute a command or call a program, the AS/400 must know where to find the command or program and the answer is library. A Library is a collection of objects. QSYS is the only library that contains other library. QSYS is the root library where the entire user defined/ system defined library is created. System supplied libraries begin with the letter "Q" or "#".
      Library list types:
      System library: All IBM supplied library e.g. QSYS, QHLPSYS, QUSRSYS…
      Product Library: Whenever Ibm product is used it is added to the library automatically and is removed itself when the job completes.
      Current Library: Current library is the working library i.e. all the work done by you is stored in current library.
      User Library: Non-IBM supplied i.e. created by the user.

    33. Question 33. What Is The Use Of L Specs In Rpg?

      Answer :

      Line counter specification can be used to describe printer file to indicate the length of the form and number of lines per page.

    34. Question 34. What Are Control Level Indicators?

      Answer :

      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.

    35. Question 35. What Is The Use Of E Specification In Rpg?

      Answer :

      Extension Specs describes all record address files, arrays and tables.

    36. Question 36. Specify Different Indicators Used In Rpg?

      Answer :

      • Overflow indicators
      • Record Identifying Indicators
      • Field Indicators
      • Resulting Indicators
      • Control Level Indicators

    37. Question 37. When Will Dump And Debug Opcodes Be Ignored?

      Answer :

      If blank is specified in position 15 of H specs.

    38. Question 38. What Is The Use Of Header Specification In Rpg/400?

      Answer :

      It identifies by H in column 6, provides informaion about generating and running programs.

    39. Question 39. What Is The Maximum Length Of A Variable Name In Cl?

      Answer :

      Maximum 11 characters (including ‘&’)

    40. Question 40. How To Trap Errors In Cl?

      Answer :

      By using Monitor Message Command (MONMSG)

    41. Question 41. What Are The Different Types Of Messages In Cl?

      Answer :

      Immediate message, Break message, Program message, User message

    42. Question 42. What Is Difference Between Cat, Tcat, Bcat?

      Answer :

      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.

    43. Question 43. What Are The Different Types Of Keywords In Display Files?

      Answer :

      File level, Record format level, Field level

    44. Question 44. When Would The All Keyword Be Used?

      Answer :

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

    45. Question 45. Can Fields Be Concatenated Ina Logical File Level?

      Answer :

      Yes. by using CONCAT keyword

    46. Question 46. What Is The Select And Omit Criteria In Logical File?

      Answer :

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

    47. Question 47. What Is Multi­format Logical File?

      Answer :

      Logical which uses fields from two or more physical files.

    48. Question 48. What Are The Valid User Defined Data Area Types?

      Answer :


    49. Question 49. Define A Batch Job?

      Answer :

      • A user request the job.
      • The job is created (job name is assigned, job attributes are allocated)
      • The job is placed on a job queue
      • The sub system QBATCH takes the job from job queue and starts it.
      • Output generated by the batch job is placed on an output queue.
      • The spool sub system prints the output on the output queue.

    50. Question 50. Describe About Query/400?

      Answer :

      Query/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:

      • displayed on a workstation (screen)
      • printed
      • stored in another database file.

AS400 Related Tutorials

AS400 Related Interview Questions

AS400 Related Practice Tests

Popular Interview Questions

All Interview Questions

As400 Practice Test

All rights reserved © 2020 Wisdom IT Services India Pvt. Ltd Protection Status

IBM - AS/400 Tutorial