IBM i Global

IBM i Global

Connect, learn, share, and engage with IBM Power.

 View Only

Understanding IBM i Libraries, Objects, and Files

By Gaurav Khanna posted Mon March 17, 2025 08:12 AM

  

Introduction

IBM i is known for its unique and structured way of storing and organizing data. Unlike traditional operating systems that use folders and files, IBM i uses libraries, objects, and files to manage data and programs. Understanding these concepts is essential for navigating and working efficiently in the IBM i environment. This guide provides a simple explanation of how data and programs are stored and organized on IBM i.

1. What is a Library?

A library in IBM i is a container that stores different types of objects, including files, programs, and data areas. Libraries function like directories in other operating systems but are more structured and secure.

Key Points About Libraries:

  • Every object in IBM i must reside in a library.
  • Libraries help organize and control access to data and programs.
  • IBM i has system libraries (e.g., QSYS, QGPL) and user-defined libraries.
  • The library list determines which libraries can be accessed in a session.

Common Commands for Libraries:

  • WRKLIB – Work with libraries.
  • DSPLIB – Display the contents of a library.
  • CRTLIB  – Create a new library.
  • DLTLIB  – Delete a library.

2. Understanding Objects in IBM i

Everything in IBM i is an object. An object can be a file, program, user profile, job description, or other system components.

Types of Objects:

  • Library (*LIB) – Stores objects.
  • File (*FILE) – Holds data (physical and logical files).
  • Program (*PGM) – Contains compiled executable programs.
  • User Profile (*USRPRF) – Defines user access and permissions.
  • Job Description (*JOBD) – Specifies job settings.
  • Message Queue (*MSGQ) – Stores system and user messages.

Common Commands for Objects:

  • WRKOBJ – Work with objects in the system.
  • DSPOBJD – Display object details.
  • CRTPGM – Create a program object.
  • MOVOBJ – Move an object to another library.
  • DLTOBJ – Delete an object.

3. Files and Members in IBM i

IBM i uses a unique file system where a file can have multiple members. This differs from traditional operating systems where each file is a standalone entity.

Types of Files:

  • Physical File (PF) – Stores actual data.
  • Logical File (LF) – Acts as an index/view for a physical file.
  • Source Physical File (SRC-PF) – Stores source code.

Members in Files:

A single physical file can have multiple members, which function like separate sections of the file.

For example:

  • A source physical file (QCLSRC) can have multiple members (PGM1, PGM2, etc.), each containing a different program.

Common Commands for Files and Members:

  • WRKF – Work with a file.
  • DSPFD – Display file description.
  • DSPFFD – Display field descriptions.
  • ADDPFM – Add a new member.
  • RMVM – Remove a member.
  • CPYF – Copy data between files.

4. Library List and Object Search Order

IBM i uses a library list to determine which libraries can be accessed and in what order.

Types of Library Lists:

  • System Library List – Contains IBM system libraries.
  • User Library List – Contains user-defined libraries.
  • Current Library – The default library for storing personal objects.

Common Commands for Library Lists:

  • DSPLIBL – Display the current library list.
  • CHGLIBL – Change the library list.
  • ADDLIBLE – Add a library to the list.
  • RMVLIBLE – Remove a library from the list.

5. Security and Authority for Libraries and Objects

IBM i provides authority levels to control access to libraries, objects, and files.

Types of Authority:

  • Owner (*OWNER) – The user who created the object.
  • Read (*USE) – Allows reading but not modifying.
  • Write (*CHANGE) – Allows modification.
  • All (*ALL) – Full control over the object.

Common Commands for Security:

  • WRKAUT – Work with object authority.
  • GRTOBJAUT – Grant authority.
  • RVKOBJAUT – Revoke authority.

Conclusion

IBM i’s structured approach to libraries, objects, and files ensures organized data storage and secure access control. By understanding these core concepts and commands, users can efficiently manage files, programs, and security settings.

0 comments
17 views

Permalink