AS400 Interview Questions and Answers part16

This blog contains interview questions for IBM i developer.
AS400 Interview Questions and Answers part16, 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, opnqryf, crtdupobj, ovrdbf, udate
AS400 Interview Questions and Answers part16

Q1: How to retrieve RRN value in the RPGLE program?

Answer 1:

Relative Record Number (RRN) is associated with every record of a file, it also identifies which position in a file the record is in. for example, a record has an RRN of 6 there does not have to be 5 records before it.

Q2: Difference between CHAIN and READE?

Answer 2:

CHAIN and READE are two operation codes in the RPG program. CHAIN will retrieve one record and READE will retrieve one or more than one record. Basically, CHAIN retrieves the exact matching of the record whereas READE retrieves all the equal records.

Q3: What is the benefit of using Externally Described files over Internally Described files?

Answer 3:

Externally Described files are easy to manage because they are created separately from the program and also they can be used in any of the programs the system, In the case of Internally Described files, there is no benefit because they are defined internally in the program and cannot be used anywhere else.

Q4: What is the function the of CRTDUPOBJ command?

Answer 4:

The Create Duplicate Object (CRTDUPOBJ) command creates a copy of a single object or a group of objects. For more details please refer to the following link created Create Duplicate Object (CRTDUPOBJ) command in AS400.

Q5: How can you identify the End of the file in the CLP program?

Answer 5:

The mon message-id for checking the end-of-file is CPF0864 and this message id helps us to check whether the end-of-file has been reached or not while reading a file.

Q6: What controls which printer a report goes to?

Answer 6:

When the report gets printed, it should go to the printer to get printed and there is a parameter named OUTQUEUE which basically controls the printer for printing a report.

Q7: Can we use multi-format LF in CL program?

Answer 7:

We cannot use multi-format LF in CL program instead we can use the single format LF in the CL program.

Q8: What is the significance of UDATE?

Answer 8:

It gives us a date when the job is actually entered into the system or became active. It does not provide the current system date.

Q9: Can we copy the records created by the OPNQRYF to other files and how?

Answer 9:

Yes, we can copy the records created by the OPNQRYF to other files and there is a command available in the IBM i named Copy From Query File (CPYFRMQRYF) and this command basically copies the records which are created by the OPNQRYF command.

Q10: How can we override a file during runtime in RPG? Without using OVRDBF or calling a CL program?

Answer 10:

EXTFILE keyword is used in F-SPECS in RPG program with file definition to override a file during runtime.

Post a Comment

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