|AS400 Interview questions - Part 2|
Q1: Which library gets loaded first when we login to IBM i?
Q2: How to see all the objects in the library and their size?
Q3: How to check all members of a file?
- DSPFD <FILENAME> TYPE(*MBRLIST)
Q4: How to see all the record format in a file?
- DSPFD <FILENAME> TYPE(*RCDFMT)
Q5: How to change the record size of a PF?
- CHGPF SIZE(<changed Size>)
Q6: Why do we use the USROPN keyword in RPGLE?
- To explicitly open a file in the RPG program.
Q7: Why do we use the EXTMBR keyword in RPGLE?
- Override the file member.
- EXTMBR('Member Name')
Q8: What is the purpose of using VARYING?
DVAR1 S 10A VARYING /Free VAR1 = 'HELLO'; /End-Free
- To dynamically allocate the length.
Q9: What is CPF4131?
- It's a Level Check Error.
Q10: Difference between CRTDUPOBJ and CPYF command?
- CRTDUPOBJ will create the exact replica of an object such as LF would be LF.
- CPYF is used to copy data and it makes LF a PF.
Q11: What are mandatory keywords for a Subfile?
- SFL (Subfile format keyword)
- SFLCTL (Subfile control format keyword)
- SFLDSP (Subfile Display keyword)
- SFLPAG (Subfile Page keyword)
- SFLSIZ (Subfile Size keyword)
Q12: What is the difference between PLIST ad KLIST?
- PLIST is list of parameters.
- KLIST is list of key fields.
Q13: What is the difference between *INLR = *ON and RETURN?
- RETURN will return the program to the caller.
- *INLR = *ON would free the memory and the program gets end.
Q14: What are the effective use and side effects of *INLR? How to overcome the side effects? Example use case scenarios?
- If *INLR = *OFF, return from called program, next call faster, program variable do not get reinitialized and program defined files do not get closed.
- File stay open.
- Variable keep their values between calls.
- File locking.
- Activation group use in ILE.
- Reclaim activation group.
- Ends all programs running in activation group.
- Files closed.
- Reinitialize all variables.
- No tracking is required, OS takes care of that.
Q15: What operations we can perform on Indicators?
Q16: How to check if a record is locked in RPGLE?
- *STATUS INFDS, Code 01218
Q17: How we can execute a CL command from within RPG program without calling a CL program?
- QCMDEXC API
- QCAPCMD API
- SYSTEM API (C API)
Q18: Can we use a file with the same file name and same record format name in RPGLE?
- No, but if we RENAME the record format name in F specs in RPG then Yes.
Q19: What are those commands which can only be executed in CL program but not in the RPG program?
- CL commands starts with RTV*
Q20: How to retrieve the RRN value of the file record in RPGLE?
- Using INFDS (file information data structure)
AS400 Interview Questions - Part 1
AS400 Interview Questions - Part 3
AS400 Interview Questions - Part 4
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