You are previewing IBM i5/iSeries Primer, Fourth Edition.
O'Reilly logo
IBM i5/iSeries Primer, Fourth Edition

Book Description

This comprehensive, 35-chapter book is the ultimate resource and a "must-have" for every professional working with the i5/iSeries. It is perfect for novice and intermediate programmers as well as for system administrators and operators. In simple, straightforward style, the authors explain core i5/iSeries concepts and show you step by step how to perform a wide variety of essential functions.

The book includes sections on installation, operations, administration, system architecture, programming, the Internet, and troubleshooting. These sections are organized in free-standing style so you don’t have to read the book from cover to cover or even sequentially; you can reference the chapters that interest you most, skip some, and jump back and forth as needed. It even contains a helpful glossary to act as a fast reference for all the terms you need to know.

Completely updated through i5/OS V5, the fourth edition of this best-selling book contains page after page of information covering RPG IV and Java programming, system values, database and SQL, important system security information, the i5/iSeries as an Internet server, and much more. You’ll learn the essential technical concepts you need to get up to speed on all areas of the i5/iSeries, and your increased understanding of the i5/iSeries will boost your productivity.
Even if you have a previous edition of this book, you'll want to get this new edition with all of the V5 update and brand new topics like:
• iSeries Navigator
• Java
• SQL
• iSeries Access
• HTTP Server
• Qshell
• Client/Server and TCP/IP
• Client Access

This book is a learning tool and valuable reference you will use for years to come. As one satisfied reader put it, "If you could own only one i5/iSeries book, this would be it."

With IBM i5/iSeries Primer, Fourth Edition you will:
• Learn how to install an i5 server
• Gain a comprehensive knowledge of i5/iSeries operations
• Understand libraries, objects, library lists, and everything you need to know about files
• Be able to configure a system
• Explore programming basics, including how to use utilities, journaling, and commitment control
• Discover what to do in case of trouble, how to request help from IBM, how to report problems, and how to manage PTFs

Table of Contents

  1. Copyright
  2. Preface to the Fourth Edition
  3. Introduction
    1. Installation
    2. Operations
    3. Administration
    4. System Architecture
    5. Programming
    6. The Internet
    7. Troubleshooting
    8. Glossary
  4. 1. Installation
    1. 1. Getting Up and Running
      1. Planning Physical Space
        1. The Computer Room
        2. Computer Room Requirements
        3. Flooring
        4. Leave It to the Specialist
        5. Laying Out the Computer Room
      2. IBM’s Part of the Deal
        1. Hardware Installation
        2. Software Installation
        3. Peripheral Installation
      3. You Take Over
        1. Do Not Connect Other Devices
        2. Setting Up Security
        3. Setting Up Device Descriptions
        4. Setting Up User Profiles
        5. Setting Up Subsystem Descriptions
      4. Make the System Available
        1. Allowing Sign-On
  5. 2. Operations
    1. 2. Powering Up and Down
      1. Unattended IPL
      2. Attended IPL
      3. The Start-Up Program
        1. Marking a Program as the Start-Up Program
        2. Changing IBM’s Start-Up Program
      4. Ending Subsystems
        1. Announcing Power Down
        2. The ENDSBS Command
      5. Power Down the System
        1. The PWRDWNSYS Command
      6. Automatic Power Schedule
        1. Setting Up the Schedule
    2. 3. Controlling the System
      1. The System Console
      2. The Hardware Management Console
        1. QSYSOPR
        2. The User Profile
        3. The Message Queue
        4. Displaying QSYSOPR Messages
        5. Answering QSYSOPR Messages
      3. Getting Help
      4. Checking System Activity
        1. Commands to Work with Jobs
      5. Display Jobs
      6. Job Logs
      7. The System Log, QHST
    3. 4. Subsystems
      1. Running QBASE
        1. Advantages
        2. Disadvantages
        3. Changing to Multiple Subsystems
      2. Running Multiple Subsystems
        1. QCTL
        2. QINTER
        3. QBATCH
      3. Maintaining Your Own Subsystems
        1. Creating a Subsystem
        2. Workstation Entries
        3. Job Queue Entries
        4. Changing the Start-Up Program
    4. 5. Working with Printed Output
      1. About Output Queues
        1. What Is in Your Output Queue?
        2. Holding and Releasing Output Queues
      2. Commands to Control Printed Output
        1. Redirecting to a Specific Printer
        2. Displaying a Report
        3. Changing a Report
        4. Deleting a Report
        5. Holding and Releasing Spooled Files
        6. Printing Part of a Report
        7. Restarting a Report
      3. Controlling Printer Writers
        1. Starting and Ending Writers
      4. Holding and Releasing Writers
        1. Changing Writers
        2. Replying to Printer Messages
        3. Displaying Messages Automatically
    5. 6. Backup and Recovery
      1. Initializing
        1. Initializing Tapes
      2. Backing Up
        1. Saving Libraries
        2. Saving Access Paths
        3. Saving Individual Objects
        4. Saving Changed Objects
        5. Saving While Active
        6. Saving Documents and Folders
        7. Saving Objects in the Integrated File System
        8. Saving the System
        9. Saving Configuration Objects
        10. Saving Security Data
      3. Restoring
        1. Restoring Libraries
        2. Restoring Individual Objects
        3. Restoring Documents and Folders
        4. Restoring Objects to the Integrated File System
        5. Restoring Configuration Objects
      4. Disaster Recovery Planning
      5. Using Save Files
        1. Using Save Files
    6. 7. Operational Assistant
      1. Accessing OA
        1. Starting Up OA
        2. OA Menus
        3. ASSIST: The Main Menu
        4. BACKUP: Backup Tasks
        5. CLEANUP: Cleanup Tasks
        6. CMNCFG: Communications Configuration Tasks
        7. DEVICESTS: Device Status Menu
        8. DISKTASKS: Disk Space Tasks
        9. INFO: Information Assistant Options
        10. MANAGESYS: The System Management Menu
        11. POWER: Power On/Off Tasks
        12. RUNBCKUP: Run Backup
        13. SETUP: Customize Your System, Users, and Devices
        14. SETUPBCKUP: Set Up Backup
        15. TECHHELP: Technical Support Tasks
        16. USERHELP: Documentation and Problem Handling
    7. 8. User Messages
      1. Sending Messages
        1. The SNDMSG Command
        2. Sending to Multiple Users
        3. Sending Messages to Special Users
        4. Sending Inquiry Messages
      2. Displaying Messages
        1. The DSPMSG Command
        2. Function Keys in DSPMSG Panel
      3. Sending Break Messages
        1. The SNDBRKMSG Command
        2. Handling Break Messages
    8. 9. Commands and System Help
      1. OS/400 Command Name Structure
        1. A Few Examples
      2. Finding a Command
        1. The SLTCMD Command
        2. Command Menus
      3. Command Parameters
      4. Customizing IBM Commands
        1. The Simple Approach
        2. The Learned Approach
      5. The Command Prompter
        1. Invoking the Command Prompter
        2. Command Parameters
        3. Changing Parameter Values
        4. Requesting Help
        5. Function Keys
      6. System Help
        1. The Support Menu
        2. The Search Index
  6. 3. Administration
    1. 10. iSeries Navigator
      1. Installing
        1. Installing iSeries Access on the iSeries Server
        2. Installing iSeries Access on a Windows Client
        3. Setting Up a New Connection
        4. Standard Features
        5. Standard Actions
        6. Basic Operations
          1. Messages
          2. Printer Output
          3. Printers
          4. Jobs
        7. Work Management
        8. Configuration and Services
        9. Network Tasks
        10. Security
        11. Users and Groups
        12. Databases
        13. File System
        14. Backups
      2. Summary
    2. 11. System Values
      1. System Value References
      2. Managing System Values
        1. Listing System Values
        2. Displaying System Values
        3. Changing System Values
      3. Date Time and Editing System Values
        1. System Date
        2. System Time
        3. Editing System Values
      4. Security System Values
        1. Security Level
        2. Default Public Authority upon Creation
        3. Idle Display Stations
        4. Password Management
        5. Sign-on Control
      5. Library List System Values
        1. System Portion
        2. User Portion
      6. System Control System Values
        1. Some Unchangeable System Values
        2. Device-Related System Values
      7. Power Up and Down System Values
        1. Interactive Job System Values
    3. 12. iSeries Access on i5
      1. Where Do I Get iSeries Access?
      2. iSeries Access Basics
      3. Configuring iSeries Access
        1. Appearance
        2. Hot Spots
        3. Keyboard Setup
        4. Pop-up Keypad
      4. iSeries Access File Transfer
      5. iSeries Asccess Macros
      6. Summary
    4. 13. Elements of Security and Configuration
      1. Authorities
        1. Private Authorities
        2. Public Authorities
        3. Special Authorities
        4. Security Levels
        5. Changing Security Levels
      2. User Profiles
        1. Naming User Profiles
        2. Maintaining User Profiles
      3. Group Profiles and Authorization Lists
        1. Group Profiles
      4. Device Descriptions
        1. Naming Device Descriptions
        2. Maintaining Device Descriptions
        3. Listing Device Descriptions
      5. Job Descriptions
        1. Benefits of Job Descriptions
        2. Naming Job Descriptions
        3. Maintaining Job Descriptions
      6. Output Queues
        1. Naming Output Queues
        2. Maintaining Output Queues
        3. Assigning Output Queues to Users
      7. Security Tools
    5. 14. Printing
      1. Output Queues
        1. Output Queues You Can Use
        2. Where to Keep These Output Queues
        3. Output Queue Security
        4. Securing Output Queues
      2. Printers
        1. Automatic Online (ONLINE)
        2. Message Queue (MSGQ)
        3. Printer Error Messages (PRTERRMSG)
      3. Assigning a Printer to a User
      4. Workstations
        1. Output Queue (OUTQ) and Printer Device (PRTDEV)
        2. Printer File (PRTFILE)
      5. Where Output Goes
    6. 15. Journaling and Commitment Control
      1. Journals and Journal Receivers
        1. Journaling Physical Files
        2. Journaling Other Objects
        3. Journaling the Integrated File System
        4. Journaling Using SNDJRNE
        5. Maintaining Journal Receivers
        6. Journaling for Recovery
          1. Forward Recovery
          2. Backward Recovery
      2. Commitment Control
        1. Prerequisites for Commitment Control
        2. The COMMIT and ROLLBACK Operations
    7. 16. Maintenance
      1. IBM or Third Party?
      2. Maintenance Agreements
      3. IPLing Regularly
      4. Performing an Unattended IPL
      5. Reclaiming Storage
        1. Reclaim Storage (RCLSTG)
        2. Reclaim Documents (RCLDLO)
      6. DASD Saving Techniques
        1. Monitoring Available Space
        2. Recovering Disk Space
    8. 17. Manuals
      1. Printed Manuals
      2. Online Manuals
      3. Some Important Manuals
        1. Programming Manuals
        2. Operations and Administration Manuals
    9. 18. Upgrading to a New Release
      1. Preparation
        1. Order the New Release
        2. Read IBM’s Documentation
        3. Take Inventory of CD-ROMs or Tapes Received
        4. Get Cumulative PTF Media for New Release
        5. Estimate Downtime
        6. Schedule Downtime
        7. Get Those Home Phone Numbers
        8. Initialize Lots of Tapes
      2. Execution
        1. Backing Up
        2. Saving Configuration and System Values
        3. Print Subsystem Descriptions
        4. Have IBM’s Documentation Ready
        5. Get a Dedicated System
        6. Apply PTFs Permanently
        7. Start Upgrade
        8. Load Any Cumulative PTF Tapes
        9. Apply PTFs Temporarily
        10. Verify Configuration, System Values, and Subsystems
        11. Reapply Changes to System Objects
        12. Make the System Available
  7. 4. System Architecture
    1. 19. Libraries, Objects, and Library Lists
      1. Single-Level Storage
      2. Libraries
      3. Objects
      4. Other System Storage
      5. IBM Libraries
        1. QSYS
        2. QUSRSYS
        3. QHLPSYS
        4. QGPL
        5. Product Libraries
        6. Special Environments
      6. User Libraries
        1. Working with Libraries
        2. Creating Libraries
        3. Displaying Libraries
      7. Working with Objects
        1. Deleting Libraries
        2. QTEMP
          1. The Privacy Act
          2. Automatic Delete
          3. Using QTEMP
          4. QTEMP and SBMJOB
      8. Objects
        1. Authorization List (*AUTL)
        2. Command (*CMD)
        3. Controller Description (*CTLD)
        4. Device Description (*DEVD)
        5. Data Area (*DTAARA)
        6. Data Queue (*DTAQ)
        7. File (*FILE)
        8. Job Description (*JOBD)
        9. Job Queue (*JOBQ)
        10. Journal and Journal Receiver (*JRN & *JRNRCV)
        11. Library (*LIB)
        12. Line Description (*LIND)
        13. Menu (*MENU)
        14. Message File (*MSGF)
        15. Message Queue (*MSGQ)
        16. Module (*MODULE)
        17. Output Queue (*OUTQ)
        18. Program (*PGM)
        19. Panel Group (*PNLGRP)
        20. Subsystem Description (*SBSD)
        21. Service Program (*SRVPGM)
        22. User Profile (*USRPRF)
      9. Library Lists
        1. Structure
        2. The System Portion
        3. The User Portion
        4. Changing the Library List
        5. Using the Library List
    2. 20. Database and Device Files
      1. Classification of Files
      2. Physical Files
        1. Record Formats
        2. File Members
        3. Database Files
      3. Source Files
      4. Simple Logical Files
        1. Creating a Simple Logical File
        2. Adding and Removing Members
        3. Using Simple Logical Files
      5. Join Logical Files
        1. Record Structure in Join Logicals
        2. Updating Data
      6. Display and Printer Files
        1. Common Features
        2. Display Files
        3. Printer Files
      7. Sharing Files
      8. Overriding Files
        1. Override File Commands (OVRXXXF)
        2. Scope of the Override
        3. Accumulating Overrides
        4. A Few Gotchas to Watch Out For
        5. Some OVRDBF Uses
    3. 21. Understanding the S/36 Environment
      1. Libraries and Objects
      2. Names
      3. S/36E Structure
      4. Entering the Environment
        1. The STRS36 Command
        2. The STRS36PRC Command
        3. S/36E at Sign-On
      5. Leaving the Environment
      6. Maintaining the Environment
        1. The CHGS36 Command
        2. Changing Devices
        3. Changing Environment Values
      7. Operation Control Language
        1. SSP Procedures
        2. #STRTUP1 and #STRTUP2
        3. New Procedure (FLIB)
        4. New OCL Statements
        5. Mixing OCL and CL in Procedures
        6. New Substitution Expressions
      8. RPG II
        1. Files with Several Record Types
        2. New Operation Codes
  8. 5. Programming
    1. 22. Data Description Specifications
      1. Coding DDS
      2. The A-Specs
      3. Complexity of DDS
      4. Physical Files
      5. A Simple Example
        1. Defining by Reference
      6. Simple Logical Files
        1. Defining Another Key
        2. Selecting and Omitting Records
      7. Join Logical Files
      8. An Example of a Join File
        1. Joining Three Files
      9. Multiformat Logical Files
        1. General Overview
        2. A Simple Example
        3. Using the Multiformat Logical
        4. Using a Format Selector Program
      10. Display Files
        1. Record Formats
        2. Function Keys
        3. Do Not Forget PRINT and BLINK
        4. Displaying Variables and Constants
        5. Input Validation Basics
        6. Using the Display File
        7. Displaying Error Messages
        8. CUA Standards
      11. Printer Files
        1. General Overview
        2. Sample Report
        3. Using the Printer File
    2. 23. Control Language
      1. Commands and Parameters
        1. When to Use CL
        2. Parts of a CL Program
        3. CL Variables
        4. Giving Values to Variables
      2. Control Commands
        1. IF and ELSE Commands
        2. DOWHILE, DOUNTIL, and DOFOR Command
        3. LEAVE and ITERATE Commands
        4. GOTO Command
        5. CALL Command
        6. ENDPGM and RETURN
      3. Dealing with Errors
        1. *ESCAPE Messages
        2. The MONMSG Command
        3. Global MONMSG Command
      4. Retrieving Data
        1. Data Areas
        2. System Values
        3. Other Information
      5. Using Files
        1. The DCLF Command
        2. Other Commands
    3. 24. RPG IV
      1. Overview
        1. RPG Specifications
        2. The Structure of an RPG Module
        3. Fixed Format
        4. RPG Names
        5. Indicators
        6. The RPG Cycle
      2. The C-Specs
        1. Anatomy of a C-Spec
        2. Extended Factor 2
        3. Free-Format Calculations
        4. File I/O Operations
        5. Structured Operations
    4. 25. SQL on i5 and iSeries
      1. SQL Basics for Beginners
        1. SELECT Statement
        2. Field List
        3. FROM Clause
        4. WHERE Clause
        5. ORDER BY Clause
        6. Column Functions
        7. Summary Functions
        8. GROUP BY Clause
        9. HAVING Clause
        10. INSERT Statement
        11. UPDATE Statement
        12. DELETE Statement
      2. Schemas, Collections, Libraries, and Databases
        1. Catalogs
        2. Tables
        3. Views
        4. Aliases and Multimember Processing
      3. Getting Started with STRSQL
        1. Redirecting the Output from SELECT
      4. Getting Started with the SQL Scripting Tool
        1. Configuring the SQL Script Environment
        2. Running Multiple SQL Scripts
        3. Saving and Loading SQL Scripts
      5. Optimizing SQL
        1. Using Debug to Optimize SQL Statements
        2. A Bit about Indexes
        3. Index Overhead
        4. Binary Radix Tree versus Encoded Vector Indexes
        5. Create Index Syntax
        6. Index Search Order
        7. Combining Smaller Indexes
      6. Using QM Query
        1. Use QM Query to Perform Any SQL Statement
        2. Passing Character Literals within Parameters to QM Query
        3. Passing Character Literals from CL Programs to QM Query
        4. Passing Multiple Parameters to a QM Query
      7. RUNSQLSTM
      8. Summary
    5. 26. JAVA on i5 and iSeries
      1. What Is Java?
      2. Why Use Java on i5?
      3. Where to Get Java
      4. Java Basics
      5. Compiling Java
      6. Running Java
      7. Java Variables
      8. Passing Arguments to Java
      9. Arithmetic in Java
      10. Adding Logic to Java
      11. Exception Handling in Java
      12. Instantiation
      13. Java Methods
      14. Inheritance
      15. Summary
    6. 27. Qshell
      1. Installation of Qshell
      2. Running Qshell
        1. Conversational Qshell
        2. Nonconversational Qshell
      3. Qshell Scripting
      4. Utilities
    7. 28. Sorting Data
      1. Using Physical File Keys
      2. Using a Logical File
        1. Specifying Sequence
        2. Including and Omitting Records
        3. CRTLF Options and Performance
        4. Using the Logical File
      3. Using OPNQRYF
        1. Sorting Records
        2. Selecting and Omitting Records
        3. QRYSLT in CL Programs
        4. Using OPNQRYF
      4. Using FMTDTA
        1. Drawbacks of FMTDTA
        2. An Example of Use
    8. 29. IBM Utilities
      1. PDM
        1. PDM’s Main Menu
        2. Working with Libraries
        3. Working with Objects
        4. Working with File Members
        5. Changing Defaults
      2. SEU
        1. A Sample SEU Session
        2. Coding RPG IV Source in SEU
        3. SEU Line Commands
        4. Top-Line Commands
        5. Function Keys
      3. SDA
        1. Starting Up SDA
        2. Working with Fields
        3. Finishing Up
  9. 6. The Internet
    1. 30. Putting the i5 on the Net
      1. Terminology
      2. Internet Connection
      3. Transmission Control Protocol/Internet Protocol
      4. Internet Security
      5. i5 Security
      6. Implementing a Firewall
      7. All Connected and No Place to Go
      8. Net.Data
      9. CGIDEV2
      10. Web Sites to Visit
    2. 31. Programming with the HTTP Server
      1. HTTP Server
      2. Which HTTP Server?
      3. Installing the HTTP Server
      4. Creating a New Server Instance
      5. Using an HTTP Server
      6. Configuring an HTTP Server
      7. Building a Simple Web Page
      8. Calling iSeries Programs from a Browser
      9. What Is a CGI Program?
      10. Where Do I Start?
      11. How Do I Write the RPG Code?
      12. Small Steps in Web Development
  10. 7. Troubleshooting
    1. 32. Basic Troubleshooting
      1. Severe Trouble
        1. Power Failure
        2. The System Freezes Up
        3. Other Severe Trouble
      2. Mild Trouble
        1. A Display Station Does Not Work
        2. A Printer Does Not Work
        3. A Tape Drive Doesn’t Work
    2. 33. Using ECS
      1. Managing ECS
        1. Changing Your Own Identification
        2. Voice Phone Numbers for IBMLink
        3. Voice Phone Numbers for Reporting Problems
        4. Changing IBMLink Connection Number
        5. Changing the Problem-Reporting Connection Number
      2. Uses of ECS
        1. To Call IBM
        2. Other Uses
    3. 34. Reporting Problems
      1. The ANZPRB Command
      2. Working with Problem Logs
        1. The WRKPRB Command
        2. Deleting Old Problem Logs
    4. 35. PTF Management
      1. Reporting a Problem
        1. Individual and Cumulative PTFs
      2. HIPER PTFs
        1. Cover Letters
      3. Requesting PTFs
        1. Determine the PTF Number
      4. Installing PTFs
        1. Cumulative PTF Packages
        2. Individual PTFs
      5. Displaying PTFs
      6. Applying PTFs Permanently
      7. Removing PTFs
  11. Glossary