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:
- DCL VAR(&VAR1) TYPE(CHAR)?
- DCL VAR(&VAR2) TYPE(DEC)?
Answer 5:
The length of the variable:
- 32
- 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.