AS400 Interview questions - Part 4 |
Q1: How we can check the number of records in a file using the CL command?
Answer:
- DSPFD and refer to Total records.
- RTVMBRD command and parameter NBRCURRCD.
- RUNQRY QRYFILE(<FILENAME>) OUTFORM(*SUMMARY)
Q2: Difference between SFLINZ and SFLCLR?
Answer:
- SFLINZ - clear Subfile and initialize Subfile fields
- SFLCLR - clear Subfile.
Q3: Difference between Fully procedural file and Primary file?
Answer:
- Fully procedural file- we can read any record.
- Primary file -Read all records (first till the end).
Q4: What is a Journal?
Answer:
- The object keeps track of changes made in a database file.
Q5: What is the final status of the Job?
Answer:
- OUTQ
Q6: Difference between CHAIN and READE?
Answer:
- CHAIN - look for the exact record in a file.
- READE - Read equal records.
Q7: Advantage of using Externally described files over Internally described files?
Answer:
- Externally described files are separate from the program and can be reusable in the whole application.
- Require less coding etc.
Q8: What is the output of the following?
DVAR1 s 5P 0
DVAR2 s 5P 1
/Free
VAR1 = *LOVAL;
VAR2 = *HIGHVAL;
/End-Free
Answer:
- VAR1 = -99999
- VAR2 = 9999.9
Q9: Which built-in function would you use to achieve the below result?
/Free
IF VAR1 < 0;
VAR1 = VAR1 * -1;
ENDIF;
/End-Free
Answer:
- %ABS bif.
Q10: What is the significance of UDATE?
Answer:
- Job Date Format
- Tells at which time job gets fired or becomes Active in the IBM i system.
Q11: What is DDM?
Answer:
- Distributed data management function of OS400. It allows our application program to access the files present on remote systems.
Q12: How to retrieve the attribute of a Job?
Answer:
- RTVJOBA
Q13: What are system objects required for Journaling?
Answer:
- Journal
- Journal Receiver
- Database File(PF)
Q14: Difference between Journaling and Commitment control?
Answer:
- Journal is used to record changes in a database file.
- Commitment control allows us to execute various changes to database files as a single unit.
- The file opened for input in a commitment control need not be journaled. However, if it's open for output in a commitment control needs to be journaled otherwise error occurs.
Q15: How to check active jobs in the system?
Answer:
- WRKACTJOB
Q16: How to create a user-defined command?
Answer:
- CRTCMD
Q17: How to lock a data area after updating it?
Answer:
- OUT *LOCK
Q18: How to retrieve data area value in CL and RPG?
Answer:
- In CL - RTVDTAARA
- In RPG - IN
Q19: How to change data area value in CL and RPG?
Answer:
- In CL - CHGDTAARA
- In RPG - OUT
Q20: What is the type and length of *LDA?
Answer:
- Type - CHAR
- Length - 1024
Related Post
AS400 Interview Questions - Part 1
AS400 Interview Questions - Part 2
AS400 Interview Questions - Part 3
AS400 Interview Questions - Part 5
AS400 Interview Questions - Part 6
AS400 Interview Questions - Part 7
AS400 Interview Questions - Part 8
AS400 Interview Questions - Part 9
AS400 Interview Questions - Part 10
AS400 Interview Questions - Part 11
AS400 Interview Questions - Part 12
As400 Interview Questions - Part 13
AS400 Interview Questions (DB2) - Part 1
AS400 Interview Questions (DB2) - Part 2