Now, Get RPG Codes in all three formats only on this website on every RPGLE related programming article.

Fixed, /Free and Fully Free RPG


AS400 Interview questions and answers part22

This article contain AS400 interview questions.
AS400 Interview questions and answers part22, as400 interview question, ibm i interview questions, interview question, rpg developer questions, cl interview question, as400 and sql tricks, ibm i, as400, iseries, system i,  chain, reade, crtdupobj, INZSR in RPG, INZSR subroutine, Initialization subroutine in RPGLE,level check parameter in PF, level check error,DSPPGMREF,Record format level id in as400,JOBQ, job queue in ibmi as400,OUTQ, output queue in ibmi as400,cpysplf, CPYF,subsystem, typesof subsystem,QBATCH, QCMN,QSYSWRK, QBASE, QSERVER, batch job, batch job in ibmi as400, LF, logical file, OPNQRYF,override in as400, OVRDBF,QCMDEXC,READ, READE, READP, READPE, READC,CHAIN,OFLIND, INZSR
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?

Answer 1:

No.

Q2: What is the purpose of the level check parameter in PF?

Answer 2:

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?

Answer 3:

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?

Answer 4:

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?

Answer 5:

The Copy Spooled File (CPYSPLF) command is used to copy the spool file to the database physical file.

Q6: Why do we use CPYF?

Answer 6:

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?

Answer 7:

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?

Answer 8:

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?

Answer 9:

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?

Answer 10:

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?

Answer 11:

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?

Answer 12:

  • READ is reading the file sequentially
  • READE is reading the equal records,
  • READP operation reads the prior equal record,
  • READPE moves the pointer to the previous record,
  • READC read subfile records that have been changed, and
  • CHAIN is used to read a particular row and record.
  • Q13: How to detect overflow for report printing program?

    Answer 13:

    Using overflow indicators with keyword OFLIND in F-SPECS to detect overflow for the report printing program.

  • Introduction to Printer File in IBM i (AS400)
  • Using Program Described Printer File in RPGLE
  • Using Externally Described Printer File in RPGLE
  • Q14: What is INZSR?

    Answer 14:

    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?

    Answer 15:

    QCMDEXC is used to execute command from RPG program without calling CL program.

    Post a Comment

    © AS400 and SQL Tricks. All rights reserved. Developed by Jago Desain