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 part21

This article contain AS400 interview questions.
AS400 Interview questions and answers part21, 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, SETON LR, RETURN in AS400, FNDSTRPDM, LOOKUP in RPG, Message file in ibmi AS400,SUBFILE in as400, subfile, subfile in RPG,LIKE, NAMVAR, QTEMp, QSYS, QGPL,PFILE, PFILE keyword in LF, logical file, TAG keyword in RPG, self join in as400, O-specs in RPG,DLTOVR, OVRDBF SHARE(*YES). OPNQRYF
AS400 Interview questions and answers part21

Q1: Difference between SETON LR and RETURN?

Answer 1:

SETON LR is used to release the memory of whatever is taken by the variables and resources used by the process and will close files that were opened in the program whereas RETURN is used to return the call to the caller program and it ends the program returning to calling program.

Q2: How to find strings using PDM?

Answer 2:

The Find String Using PDM (FNDSTRPDM) command is used to find the character or hexadecimal strings in source physical file members.

Q3: How will you search an array in RPG?

Answer 3:

Lookup opcode is used to search a particular element in RPG.

Q4: What is a message file?

Answer 4:

The Message file is a type of file object where we store the message data with respect to the message id and it is used to check any validation or any error that occurs.

Q5: How do you read changed records backward in the subfile?

Answer 5:

We cannot read changed records backward in the subfile.

Q6: How to read a pf record without having a lock?

Answer 6

The READ WITH NO LOCK statement read the records without acquiring any lock.

Q7: Can we define multiple lists for a single file?

Answer 7:

Yes, we have multiple key lists to define multiple lists for a single file.

Q8: Can we define a multi-dimensional array in RPG?

Answer 8:

No, we cannot define a multi-dimensional array in RPG.

Q9: Difference between LIKE and NAMVAR?

Answer 9:

LIKE keyword is used to define the fields the same as some old fields whereas NAMVAR is used to define the data area.

Q10-: What are the few IBM-supplied libraries?

Answer 10:

The few libraries which are supplied by IBM are QGPL, QSYS, QTEMP, QRPG, QCBL, etc.

Q11: Why and where do we use the PFILE keyword?

Answer 11:

PFILE keyword is used in LF and this is used to refer to the physical file.

Q12: Is it possible to join the same file itself?

Answer 12:

Yes, it is possible to join the same file itself and it is called a self join.

Q13: In which spec do we define report layout?

Answer 13:

We define report layout in O-SPEC.

Q14: When do we use TAG in RPG?

Answer 14:

We used TAG for the labels in the RPG.

Q15: How do you design the process for a night batch job which processes the claimed cheque that has to select only those records marked as the flag for processing?

Answer 15:

Suppose we have a huge file and we only have to process the claimed cheque out of it which is much lesser in number. We need to ensure performance while writing such processes.

  • Use OVRDBF SHARE(*YES) in the CL program
  • Use the OPNQRYF command to select the claimed cheques record only and this will create the temporary access path in CL program.
  • Call RPG program which processes claimed cheques. So, whatever records selected by OPNQRYF will be shared with the RPG program using OVRDBF SHARE(*YES)
  • Close the OPNQRYF file.
  • Post a Comment

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