AS400 Interview Questions and Answers part 24 |
Q1:What is shared access path?
Answer: An access path describes how records in a database file are retrieved. When a logical file with a keyed sequence access path is created, the system tries to share an existing access path. Share the ODP(open data path) created. OPNQRYF command used to created ODP.
Q2:What is the difference between array and multi occurrence data structure?
Answer: The values stored in array don't vary however, MODS can store the different values in same variable at different indexes.
Q3:Why we use *INZSR subroutine in RPG program?
Answer: It is special subroutine that we can write in an RPG program and is executed automatically at the start of the program. We can keep initialization code here that only have to be executed once.
Q4:How can you execute a command from within and RPG program without calling a CL program?
Answer: Using QCMDEXC api or C api() named system().
Q5:What is the purpose of using 'N' at the 53rd position in calcution specification?
C KEY CHAIN FILE N 99
Answer: If 'N' is specified then the record will not be locked during chain operation.
Q6:Which of the following operations does not zero the field VAR1 defined as 5,0?
- C MOVE *ZEROS VAR1
- C Z-ADD *ZEROS VAR1
- C Z-ADD 0 VAR1
- C MOVE *ALL'0' VAR1
- C MOVE '00000' VAR1
- C CLEAR VAR1
- C MOVE *BLANKS VAR1
Answer: The 7th instruction does not zero the VAR1 field.
Q7:How can you check for a record existence without causing an I/O(CHAIN/READ)?
Answer: Using SETLL.
Q8:What is data area and why we use it?
Answer: A data area is an object used to hold data for access by any job running on the system. A data area can be used whenever you need to store information of limited size, independent of the existence of procedures or files.
Q9:What is data queue and why we use it?
Answer: Data queues are the fastest means of asynchronous communication between two jobs. Using a data queue to send and receive data requires less overhead than using database files, message queues, or data areas to send and receive data.
Q10:What is the difference between UDATE and System date?
Answer: UDATE supports 2-digit year with format *MDY(MMDDYY) and System date supports 4-digit year with format *MDYY(MMDDYYYY).