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 part20

This article contain AS400 interview questions.
AS400 Interview Questions and Answers part20, 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, DSPDBR, referential constraint, INSERT, UPDATE, DELETE in SQL, CRUD in SQL DB2, declare cursor in sql db2,OVRDBF, override database file,disadvanatge of using global variables,bif in rpg, built-in function in RPG, %FOUND, %END-OF-FILE, NOT %END-OF-FILE, %BOF, EDTCDE, EDTCDE(Z), EDTCDE(Y),RANGE in DSPF, VALUES in DSPF,LOOKUP in RPGLE, VIEW and Index in IBM i as400 DB2
AS400 Interview questions and answers part20

Q1: CL command to find Dependent file?

Answer 1:

The Display Database Relations (DSPDBR) command identifies dependent files on a specific physical file.

Q2: When are the referential constraints executed?

Answer 2:

The referential constraints are executed at the time of INSERT, UPDATE, and DELETE.

Q3: Why do we use DECLARE cursor statement?

Answer 3:

DECLARE cursor statement is the first point for defining a cursor and giving it a name. The OPEN statement occupies the result set, and FETCH returns a row from the result set

Q4: Which CL command can be used at run time to redirect the file name in an RPG program?

Answer 4:

The Override with Database File (OVRDBF) command can be used at run time to redirect the file name in an RPG program.

Q5: What is the length of the variable:

  1. DCL VAR(&VAR1) TYPE(CHAR)?
  2. DCL VAR(&VAR2) TYPE(DEC)?

Answer 5:

The length of the variable:

  1. 32
  2. 15, 5

Q6: What is the disadvantage of using a Global variable?

Answer 6:

The main disadvantage of using a Global variable is can cause memory issues and harm the system in long run. No one knows who changed the values of the global variables.

Q7: If we try to move the YEAR part of *ISO date into a field of length 3, what is the output?

Answer 7:

If we tried to move the YEAR part of *ISO date into a field of length 3 then the program gets crashed.

Q8: How to avoid using indicators in ILE?

Answer 8:

There are some Built-in functions(bifs) like %FOUND, %END-OF-FILE, NOT %END-OF-FILE, %BOF, etc. So, these are the bifs that we can use to avoid the use of indicators in ILE.

Q9: EDTCDE for suppressing leading zeros?

Answer 9:

EDTCDE(Z) for suppressing leading zeros.

Q10: EDTCDE for date field?

Answer 10:

EDTCDE(Y) for the date field.

Q11: Can we use EDTCDE on the character field?

Answer 11:

We cannot use EDTCDE on the character field.

Q12: Can we use EDTCDE on the numeric field?

Answer 12:

Yes, we can use EDTCDE on the numeric field.

Q13: How can we validate input values in DSPF?

Answer 13:

Using some keywords like RANGE and VALUES to validate input values in DSPF.

Q14: Difference between View and Index?

Answer 14:

The Index is an access path that creates an entry for each value whereas the View is a logical view that represents the data.

Q15: What is the lookup opcode in RPGLE?

Answer 15:

Lookup opcode is used to search any particular value in the array.

Post a Comment

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