|AS400 Interview questions and answers part22|
Q1: When program1 calls program2 for the first time and program2 executes INZSR and uses only the RETURN statement. When returning to program1. When the PROGRAM2 calls for the second time will INZSR be executed?
Q2: What is the purpose of the level check parameter in PF?
The system generates unique code for identifying the record format. If that PF is defined in an RPG program then the record format identifier gets associated with the program once that program object is compiled. S, whenever any change happens to the PF and the record format identifier gets changed then that RPG program is still associated with the old record format id. Therefore, If the level check parameter is specified as *YES then during the program execution once the file gets opened PF record format id gets compared with the one associated with the RPG program and if a mismatch occurs then the level check error occurs at run time. Therefore, to keep the record format id in sync at all places we must recompile all the programs where that file is being declared.
Q3: What is a job Queue?
Job Queue is an object of type *JOBQ in AS400 and all the submitted jobs go to the Job Queue and wait for their turn to be processed. For more information please refer to Job Queue (JOBQ) in AS400.
Q4: What is Output Queue?
An output queue is an object of type *OUTQ in the AS400 system that provides the place for the spooled files to wait for their tur to be printed. Output queues are either created by the system or the user. For more information please refer to Output Queue (OUTQ) in AS400.
Q5: Why do we use CPYSPLF?
The Copy Spooled File (CPYSPLF) command is used to copy the spool file to the database physical file.
Q6: Why do we use CPYF?
The Copy file (CPYF) command copies all or some part of data from one database file to the other database file. For more information please refer to Copy File (CPYF) command in AS400.
Q7: What is the Subsystem?
The subsystem is the one where jobs run. There are several systems supplied by IBM i subsystems that run different types of jobs. For more information please refer to AS400 Subsystem.
Q8: What are the different types of Subsystems?
The different types of Subsystems are QBATCH, QCMN, QSYSWRK, QBASE, QSERVER, etc. For more information please refer to AS400 Subsystem.
Q9: What is a batch job?
Batch Jobs are those jobs that are not enabled with screen Input/Output. They are active even if we signed off from sessions. So if a session ends, the Batch job still runs. For more information please refer to Batch Jobs.
Q10: What is the purpose of OVERRIDES?
The Override with Database File (OVRDBF) command is used to override the file named in the program.
Q11: When do we use LF over OPNQRYF?
OPNQRYF will select those records which are going to be processed by the program at run time and is a temporary access path that gets deleted after its use and is a costly process if we have to process a large set of data repeatedly and LF is the best way to go, A Logical file (LF) with Keys are Access path (INDEX) and has a permanent object/Access path on the IBM i system.
Q12: What are READ, READE, READP, READPE, READC, and CHAIN?
Q13: How to detect overflow for report printing program?
Using overflow indicators with keyword OFLIND in F-SPECS to detect overflow for the report printing program.
Q14: What is INZSR?
INZSR is a specific subroutine and it represents the initialization of the program and will be executed only once when the program starts. We do not need to call this subroutine explicitly.
Q15: How to execute the command from the RPG program without calling the CL program?
QCMDEXC is used to execute command from RPG program without calling CL program.