As400 Interview Questions Part 11

16 Views


Here's a clear and concise explanation of each of your AS400 / IBM i questions:


1. What is the purpose of Level Check parameter in a physical file?

The Level Check ensures that the record format used by a program matches the current format of the file on the system. If the file structure changes and the program isn’t recompiled, a level check error (MCH3601) will occur when the program runs.


2. What is File Information Data Structure in AS400?

A File Information Data Structure (INFDS) provides file-related information such as file status, record length, and number of records read or written. It’s defined using the INFDS keyword in RPG.


3. What is Program Status Data Structure in AS400?

The Program Status Data Structure (PSDS) holds program-level info, like the status code (error), procedure name, job info, etc. It helps with error handling and debugging.


4. What is Array in AS400? What are the types of arrays?

An array is a collection of elements of the same type stored in continuous memory.
Types:

  • Compile-time array: Values defined in source.

  • Pre-runtime array: Loaded from a data area or file.

  • Run-time array: Loaded dynamically during execution.


5. What is the difference between Non-join Logical Files and Join Logical Files?

  • Non-join logical file: Based on a single physical file.

  • Join logical file: Combines records from two or more physical files based on a key.


6. What is Access Path in AS400?

An Access Path determines how records in a file are read or retrieved (sequentially or by key). It can be permanent (saved with file) or temporary (created during program execution).


7. What are the Record Format Field Mapping Options in CPYF?

  • *NOCHK: No format check; copies data as-is.

  • *MAP: Matches fields by name and converts data types.

  • *DROP: Fields in target but not in source are ignored.


8. What is the default Access Path of a file?

For a physical file, the default access path is sequential, based on the order records are added (arrival sequence). For a logical file, it’s based on defined keys.


9. Can Level Check Error occur if we do CHGPF?

Yes. If you use CHGPF and change the record format, level ID changes, and if the program using it is not recompiled, a level check error will occur at runtime.


10. How can we arrange duplicate records in a file?

Use logical files with keys to sort records. You can also use SQL ORDER BY, or copy the file to another file with CPYF and a sort sequence or sort using query or SQL.


11. How to see all Record Formats used in a file?

Use *DSPFD FILE(library/filename) TYPE(RCDFMT) or DSPFFD to see all record formats and field details.


12. How to see all Members of a file?

Use WRKMBRPDM or WRKMBR FILE(library/filename) or DSPFD FILE(*ALL) TYPE(*MBRLIST).


13. What is Source Physical File?

A Source Physical File holds source code (RPG, CL, DDS). Common files: QRPGLESRC, QCLSRC. Each member in it contains source for one program or object.


14. Is QGPL a user library or system library?

QGPL (General Purpose Library) is a user library, but it's provided by IBM as a default storage area.


15. What is Library in AS400? What are the types of Library?

A library is like a directory that holds AS400 objects (files, programs).
Types:

  • System libraries (e.g., QSYS)

  • User libraries (e.g., QGPL, custom libs)

  • Product libraries

  • Current library

  • Temporary libraries


16. How many libraries can be there in library list?

The library list (*LIBL) can hold:

  • 15 system libraries

  • 25 product libraries

  • 1 current library

  • 250 user libraries


17. What is RPG?

RPG (Report Program Generator) is a high-level programming language used on IBM i for business applications. Versions include RPG III, RPG IV (RPGLE), and Free Format RPG.


18. What is Data Area and how is it used in RPG program?

A Data Area (DTAARA) is a storage area used to store global data or control values. In RPG, you access it using **IN, OUT, or LDA / GDA.


19. Which program RPG or CL is efficient to update a transaction onto a database file and why?

RPG is more efficient for database updates, as it supports native I/O operations and better performance for record handling compared to CL, which is mainly for job control.


20. What is the purpose of Indicators in RPG?

Indicators are used to control:

  • Logic flow (e.g., IF, DOW)

  • File operations (e.g., read success)

  • Display attributes (in display files)


 

AS400 interview questions | Answers with explanation for 20 questions |Part11

Post Comments