|AS400 Interview questions and answers part21|
Q1: Difference between SETON LR and RETURN?
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?
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?
Lookup opcode is used to search a particular element in RPG.
Q4: What is a message file?
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?
We cannot read changed records backward in the subfile.
Q6: How to read a pf record without having a lock?
The READ WITH NO LOCK statement read the records without acquiring any lock.
Q7: Can we define multiple lists for a single file?
Yes, we have multiple key lists to define multiple lists for a single file.
Q8: Can we define a multi-dimensional array in RPG?
No, we cannot define a multi-dimensional array in RPG.
Q9: Difference between LIKE and NAMVAR?
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?
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?
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?
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?
We define report layout in O-SPEC.
Q14: When do we use TAG in RPG?
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?
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.Steps: