As400 Interview Questions Part 5

16 Views


Here’s the next 20 answers (set #5, total 100 Q&A now).


1. What is SFL and SFLCTL?

  • SFL → Subfile record format (holds multiple rows of data).

  • SFLCTL → Subfile control format (controls subfile display, paging, options like SFLCLR, SFLDSP, etc.).


2. List some of the commonly used commands for debugging?

  • STRDBG → Start Debug

  • ENDDBG → End Debug

  • DSPPGMVAR → Display program variables

  • UPDPROD → Update production files

  • EVAL → Evaluate variable value

  • BREAK → Set breakpoint


3. What is SFLCSRRRN and SFLRCDNBR?

  • SFLCSRRRN → Subfile cursor relative record number (row where cursor is placed).

  • SFLRCDNBR → Subfile record number (row number of current record).


4. How to print HEADER if O-specs are used in program?

  • Use O-specs with 1P (first-page) or H (header line) entries.

  • Example: specify page headings with H-spec line in output specifications.


6. How to define Global Parameter in ILE?

  • Define in a Module or Service Program as global variable.

  • Export it with EXPORT keyword so other modules can access it.


7. What is Service Program?

  • A collection of modules bound together.

  • Provides reusable procedures/functions.

  • Unlike program objects, they are not directly called — must be bound.


8. What is *ISO date format?

  • *ISO → YYYY-MM-DD (10 chars).

  • Example: 2025-09-06.


9. How can we copy messages from one message file to another?

  • Use CPYMSGF FROMMSGF(MSGF1) TOMSGF(MSGF2).


10. What is the significance of QTEMP library?

  • Each job has its own private QTEMP.

  • Objects in QTEMP are deleted when job ends.

  • Useful for temp work files, overrides, etc.


11. If no current library exists in which library does a Create command create the object?

  • If no current library (CURLIB), object is created in QGPL by default.


12. Is Library list an object? In which order it is searched?

  • Library list itself is not an object (it’s a system job attribute).

  • Search order: System portion (QSYS)Product librariesCurrent libraryUser portion.


13. What is the difference between Production and Test libraries?

  • Production libraries → Stable, used in live system.

  • Test libraries → For development, testing new code.

  • Often separated with different authorities/security.


14. What is the significance of *LIBL, *ALLUSR and *USRLIBL?

  • *LIBL → Search/bind library list.

  • *ALLUSR → All user libraries (excludes QSYS, QTEMP, etc.).

  • *USRLIBL → User portion of library list only.


15. What is a flat file?

  • File with a single record format and no keys.

  • Typically used for sequential data storage.


16. If a CL program contains the reference to a flat file, how can the data be retrieved?

  • Use RCVF (Receive File Record).

  • Each call reads next sequential record.


17. How many record-formats can a database file have, which is declared in CL?

  • CL supports only one record format per file.


18. Do I need to declare the fields of a file, which is declared in a CL?

  • No. When you DCLF FILE(...), all fields from that file are available in CL automatically.


19. What happens if a file is created with expiry date less than current date?

  • File is created but immediately marked expired.

  • It can still be used until explicitly deleted or saved with expiration check.


20. Under what circumstances we will not be able to delete a PF?

  • When:

    • PF has dependent LFs.

    • PF is journaled.

    • PF is locked by active job.

    • PF is in use by another program/job.


✅ That’s 100 AS400 interview Q&A total.
AS400 interview questions | Answers with explanation 20 questions | Part5

Post Comments