Object (IBM i)
| Industry | Computer operating systems |
|---|
Overview
IBM i objects share similarities with those found in object-oriented programming by allocating storage according to specific object categories, with access limited to particular programs. Nevertheless, IBM i objects differ as they do not support inheritance, have a predetermined set of object types, and only IBM is authorized to introduce new types.
While there exists a wide variety of object types, users generally work with a select few. Each object type is denoted by a mnemonic ranging from three to six characters, always preceded by an asterisk. Important object types include:
- *LIB: Library (functions as a container for all objects except directories and stream files; nesting of libraries is not permitted).
- *PGM: Program (compiled from languages such as CL, RPG-IV, C, C++, COBOL; no restrictions on language interoperability).
- *MODULE: Module (linkable components within programs; supports cross-language linking).
- *SRVPGM: Service program (dynamic modules akin to Windows DLLs).
- *BNDDIR: Binding directory (catalogs modules and service programs used during program creation).
- *CMD: Command (invokes programs with interactive parameter prompting; defined using Command Definition language).
- *MENU: Menu (accessible via the GO command).
- *FILE: File (serves various roles including data storage, I/O device representation, or source code depending on subtype).
- *DTAARA: Data area (small-sized storage for rapid data access).
- *DIR: Directory (part of the Integrated File System, comparable to Unix and Windows directories).
- *STMF: Stream file (classic file format housed within directories, familiar to Unix/Windows users).
- *JRN and *JRNRCV: Journal and journal receiver (monitor modifications to files, data areas, and stream files).
- *USRPRF: User profile (manages user authentication and sign-on procedures).
- *JOBD: Job description (specifies parameters for job submission and execution).
- *SBSD: Subsystem description (initiates subsystems where user jobs operate).
- *JOBQ: Job queue (holds batch jobs pending execution within subsystems).
- *LIND: Line description (defines communication lines such as Ethernet or token ring).
- *CTLD: Controller description (represents communication controllers managing lines and devices).
- *DEVD: Device description (describes communication devices like printers and tape drives).
- *DTAQ: Data queue (stores data entries for quick retrieval by other jobs).
- *MSGQ: Message queue (delivers messages to users; also functions similarly to data queues).
- *OUTQ: Output queue (manages printer output queues).
- *USRSPC: User space (a flexible data container capable of holding up to 16 terabytes).
Libraries
Within IBM i, a library (*LIB) acts as a system-level directory object that provides a namespace for organizing other objects. Libraries do not directly contain objects but serve as unique containers at the system level, appearing under the QSYS library.
Standard libraries
Libraries supplied by IBM for the operating system generally begin with the letter 'Q'. Notable IBM standard libraries include:
- QSYS - Primary System Library
- QSYS2 - System Library supporting CPI (Characters Per Inch)
- QHLPSYS - Library for Online Documentation
- QTCP - Utilities for TCP Connectivity
- QAFP - Advanced Function Printing Library
- QGPL - General Purpose Library
- QTEMP - Temporary library specific to each job, removed upon job completion
Library List
A library list (*LIBL) specifies the default directories where objects are searched, functioning similarly to the PATH environment variable found in other operating systems. This list is always associated with an object such as a job or a job description (*JOBD). Certain job descriptions refer to *SYSVAL, which points to the system value QUSRLIBL. Starting with OS/400 V5R1, the user segment can accommodate up to 250 libraries, an increase from the previous limit of 25.
The library list of a job is divided into four distinct parts:
- System portion: Positioned at the top and fixed, this section includes essential system libraries like
QSYS,QHLPSYS, andQUSRSYS. It supports up to 15 libraries, initially set by theQSYSLIBLsystem value and adjustable for individual jobs using theCHGSYSLIBLcommand. - Product portion: Temporarily incorporates up to two product-specific libraries during the execution of CL commands that specify a production library.
- Current library: Represents a single library linked to a user profile, enabling users to prioritize their own library at the top of the list. This can be altered temporarily with
CHGCURLIBor permanently throughCHGUSRPRF. - User portion: Contains libraries related to applications, assigned through the job description but can be overridden in batch jobs by using the
INLLIBLparameter of theSBMJOBcommand. Users may modify this section locally by employing commands such asEDTLIBL,CHGLIBL,ADDLIBLE, andRMVLIBLE.