|AS400 Interview questions and answers part20|
Q1: CL command to find Dependent file?
The Display Database Relations (DSPDBR) command identifies dependent files on a specific physical file.
Q2: When are the referential constraints executed?
The referential constraints are executed at the time of INSERT, UPDATE, and DELETE.
Q3: Why do we use DECLARE cursor statement?
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?
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)?
The length of the variable:
- 15, 5
Q6: What is the disadvantage of using a Global variable?
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?
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?
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?
EDTCDE(Z) for suppressing leading zeros.
Q10: EDTCDE for date field?
EDTCDE(Y) for the date field.
Q11: Can we use EDTCDE on the character field?
We cannot use EDTCDE on the character field.
Q12: Can we use EDTCDE on the numeric field?
Yes, we can use EDTCDE on the numeric field.
Q13: How can we validate input values in DSPF?
Using some keywords like RANGE and VALUES to validate input values in DSPF.
Q14: Difference between View and Index?
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?
Lookup opcode is used to search any particular value in the array.
Post a Comment