IBM AS/400 Interview Questions and Answers:-
1. How are the objects stored on AS/400?
All objects are stored on AS/400 in single-level storage.
In this method, all objects are referenced by one virtual address which is translated into a physical address whether it is auxiliary storage or main memory.
2. What is a Library in AS/400?
A library in AS/400 is an object that serves (acts) as a repository for other objects.
3. Name few IBM supplied libraries?
QGPL, QTEMP, QSYS, QUSRTOOL, QCBL, QRPG.
4. What is a library list?
A list that indicates libraries used for the process and the order in which it has to be searched System identifies it in *LIBL.
5. How many libraries can be there in the library list?
Total 40 (15 system and 25 application).
6. Describe the function of SETLL operation in RPG language?
The SETLL operation positions a file at the next record with a key or relative record number that is greater than or equal to a key or relative record number specified in factor1.
7. Describe the function of SETGT operation in RPG language?
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.
8. What is the purpose of the Level Check parameter in a Physical file?
Specifies whether the level identifiers of the record formats in the physical file are checked when the file is opened by the program.
9. Define a Job Queue?
Job queues are queues of batch jobs waiting to be processed.
10. Define an Output Queue?
Output queues are queues of jobs waiting to be printed.
11. What is the function of the CPYSPLF command?
and copies the spooled file to the database file.
12. What is the function of the CPYF command?
and copy the data from the one file to another.
13. What is the function of the CRTDUPOBJ command?
and create the replica from the original object.
14. Define Subsystem?
a subsystem is nothing but it provides a specialized environment to complete the execution of jobs.
15. What are the different types of Substems?
and QBATCH, QINTER, QSPL, QCMN, QCTL, QBASE.
16. Define a Batch Job?
- A user requests the job.
- The job is created (job name is assigned, job attributes are allocated)
- The job is placed on a job queue
- The subsystem QBATCH takes the job from the job queue and starts it.
- Output generated by the batch job is placed on an output queue.
- The spool subsystem prints the output on the output queue.
17. Describe Query/400?
andQuery/400 is a licensed program that uses a query to analyze and select the information contained in the database files and create a query report.
A query report can be:
- displayed on a workstation (screen)
- stored in another database file.
18. What is the CLP command to access a Query/400?
19. How do you pass parameters in CL?
andUsing PARM keyword.
20. What are the valid user defined data area types?
andCHAR, NUMERIC and LOGICAL
21. What is a Multi-format logical file?
and logical which uses fields from two or more physical files.
22. What is the Select and Omit criteria in a logical file?
andThis is used to specify rules for the Selection/Omission of records from a Physical File.
23. Can fields be concatenated INa logical file level?
andYes. by using CONCAT keyword
24. When would the ALL keyword be used?
andUse with Select or Omit, to select/omit records.
25. What are the different types of keywords in display files?
and file level, Record format level, Field level
26. What is the difference between CAT, TCAT, BCAT?
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
TCAT – Truncates all trailing blanks in the first character string, the two character strings
27. What are the different types of messages in CL?
the and Immediate message, Break message, Program message, User message
28. How to trap errors in CL?
andBy using Monitor Message Command (MONMSG)
29. What is the maximum length of a variable name in CL?
andMaximum 11 characters (including ‘&’)
30. What is the use of Header Specification in RPG/400?
and identifies by H in column 6, provides information about generating and running programs.
31. When will DUMP and DEBUG opcodes be ignored?
and blank is specified in position 15 of H specs.
32. Specify different indicators used in RPG?
- overflow indicators
- Record Identifying Indicators
- Field Indicators
- Resulting Indicators
- Control Level Indicators
33. What are Control level indicators?
andL1 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.
34. What is the use of E specification in RPG?
andExtension Specs describes all record address files, arrays, and tables.
35. What is the use of L specs in RPG?
an and Line counter specification can be used to describe a printer file to indicate the length of the form and number of lines per page.
36. In which specification the report layout can be defined?
and O Specification.
37. How many files can be defined in F specs?
38. How many printer files can be defined in F specs?
39. A program variable coded in an Embedded SQL statement is referred to as?
and Host Variable
40. Which of the CL command can be used to determine which logical files are dependent on a specific file?
41. What does DFU program you to do on a record?
and Insert, Update Delete & File Enquiry.
42. When are the Unique Constraints executed?
43. When are the Referential Constraints executed?
and Insert, Update & Delete.
44. How many triggers can be associated with a file?
45. Why is the Declare cursor statement is used for?
and defines & name the cursor & specify rows to be fetched.
46. What do we can do with the Embedded SQL statements?
andWe can Insert/Update/Delete records, fetch records, fetch values from records into variables.
47. Which CL command is used to trap error messages during program execution?
48. Which CL command can be used at program execution to redirect the file named in an RPG program?
49. What is *ISO date format?
andYYYY-MM-DD for other formats refer to IBM manual or ERIS document.
50. What are the important factors in Error message subfile?
andWe must define error message record format (SFLMSG). And a Program Queue. (PGMQ) and Record format is associated with a line number.
51. How to define a Hidden filed in DSPF?
andDefine a filed in a DSPF of use HIDDEN.(H)
52. How To get the cursor position?
andWith the help of RTNCSRLOC keyword, here we need to define a field to get row and column. Length of a variable should be 5,0 fixed We can specify *FILED for filed *REC for Record on which a key is pressed.
53. What is OVERLAY?
and It allows a record format to be displayed on screen retaining the previously displayed record formats.
54.What keyword is used when the screen is re-display?
andRSTDSP is a parameter to be specified at compile time for display file.
55. Command Attention key and Command Function Key?
andWith the help of Command attention key we can pass only the indicator status to program not the data from the screen. While command function key passes indicator status as well as data from screen to program.
56.How to validate input values in the Display file?
andWith the help of Validity check keywords VALUE, RANGE, COMP
57.How can see logical file based on which physical file and vice versa
58.How can u check no of records in a file
59.How do u compile RPGLE program
andEither thru 15 or crtrpgmod
60.Is module executable
and No You need to create an RPG prog to run the module.
61.What are SFLPAG and SFLSIZ?
SFLPAG: it is an attribute which specifies the number of records that can be displayed in a screen.
SFLSIZ: it is an attribute which specifies the number of records can be stored in the subfile.
62. What are the three line types in RLU?
andReport line, Filler line & Sample line.
63. What is the function of RLU?
andTo design & prototype a report.
64. List some of the commonly used commands for debugging
andSTRDBG(for batch jobs), STRISDB.
65. Define the RCVF command?
an andRCVF command used to receive the records either from the database file or device file.
66. Define the purpose of the %SST function?
and To extract the information from the specified string.
67. Define the purpose of the *CAT function?
and concatenate the two strings into one string.
68. Define the purpose of the *BCAT function?
and concatenate the two strings by placing a single blank in a resultant.
69. Describe the difference between the DOWxx and DOUxx operations?
andDOWxx: If the condition becomes true, then only the group of instructions allowed executing.
DOUxx: Irrespective of condition, it will execute at least one time.
70. What is the difference between Packed decimal and Zoned decimal?
and packed decimal: One digit occupies 1 byte.
Zoned decimal: One digit occupies 2 bytes.
71. What is default data type (if you define decimals ‘0’) in Physical file?
and packed decimal
72. What is default data type for the fields(subfields) defined in data structures in RPG?
and zoned decimal
73. What is the difference between GOTO & EXSR?
Anderson is a conditional branching while a GOTO is an unconditional branching.
74.Difference between CA & CF?
and: – It does not retain the value into the buffer memory. CF: – It retains the value into the buffer memory.
75. What does EXFMT do?
andWrite & Read.
76. What is the term CUA, SAA?
andCommon User Access
System Application Architecture
77. Define a Job Queue?
Job queues are queues of batch jobs waiting to be processed.
78. Define an Output Queue?
Output queues are queues of jobs waiting to be printed.
79. What is the acronym of RPG?
Report Program Generator
80. What is the native language of AS/400?
81. Why RPG/400 is famous?
- Easy to code and analyze.
- Supports externally described files.
82. How do you use exceptional write in C specs?
Using EXCEPT opcode.
83. What does the opcode FREE do?
The FREE operation removes a program from the list of activated programs, frees static storage and ensures program initialization (first cycle processing) the next time program is called. It does not close the file or unlocks data area.
84. What does opcode POST do?
Puts information in INFDS.
85. A Query can be displayed without saving it?
86. Which are the Query selection criteria, which can be given in a Query?
87. To add a file to the ‘File Selection’ option of a Query, the function key to be pressed is?
88. A query can be run in which mode?
andBatch & Interactive
89. What are the values SQLCOD when there is an error in fetching the records specified in the select statement?
90. A file cannot have more than 1 unique key?
91.DLCOBJ command is mandatory for removing the lock on any object?
92. What is the Journal?
and Journal is an object used primarily to record changes to data in a PF.
93. Which are the DB2 tools to protect the Integrity of the database?
journaling & Commitment Control, Referential Integrity Embedded SQL & Object/Record Locks.
94. How many types of display are available on As/400 for user interaction?
A. The 4 Types they are Entry, Menu, Information & List Display.
95. Which is the Primary Editor of As/400?
A.Source Entry Utility (SEU).
96. What are the basic features of SEU?
Prompt depending upon type shows right-hand side date & left-hand side the line number.
97. What are the different methods to access SEU?
Use the Start Source Entry Utility command (STRSEU) Option 8 from STRPGMMNU Through Program Development Manager (PDM)
98. Which are the member types which SEU supports?
RPG, CL, PF, LF, PRTF & DSPF.
99. In which Specs Arrays, Tables & Constants are defined?
A.In I Specs.
100. What is a Spool File?
A. Printed output items placed in an output queue are known as spooled files.