This guide covers the mechanics of keeping an IBM i partition current: the kinds of fixes IBM ships, how to order cumulative and group PTFs, how to deliver and install them, and how to plan a release upgrade. For the planning side (temporary versus permanent application, delayed PTFs, IPL windows, rollback and a production checklist), read IBM i PTF Management and Maintenance Planning.
PTF Types
IBM delivers fixes in several forms:
- Individual PTFs fix one problem. Their identifiers are seven characters, such as
SI12345orMF12345, where the prefix reflects the product area. - Cumulative PTF packages bundle a large set of fixes for a release. The package is itself identified by a PTF group name that depends on the release.
- PTF groups are named sets of PTFs for one area: the HIPER group, the Db2 for i database group, Java, HTTP Server, Performance Tools, Backup Recovery and Media Services, and others. Each group has a level number that increases as IBM adds fixes. A group identifier always starts with
SF99. - Technology Refreshes deliver new function for a release between major releases, and are delivered as PTFs and groups too.
Group identifiers differ by release. IBM’s own listings give these for the three groups most shops track:
| Group | IBM i 7.4 | IBM i 7.5 |
|---|---|---|
| Cumulative PTF package | SF99740 | SF99750 |
| HIPER group | SF99739 | SF99959 |
| Database (Db2 for i) group | SF99704 | SF99950 |
Do not copy group identifiers from an article, including this one, for another release. Confirm them against IBM’s current Preventive Service Planning (PSP) information for your release, and use WRKPTFGRP to see what is installed.
IBM puts particular weight on the HIPER (High Impact, PERvasive) group: it carries fixes for problems that can cause data loss, outages or security exposure, so check it more often than the cumulative package.
Checking What Is Installed
/* PTF groups installed, with their levels */
WRKPTFGRP
/* One group, at the installed level */
WRKPTFGRP PTFGRP(SF99740) PTFGRPLVL(*INSTALLED)
WRKPTFGRP takes a group name and an optional level (*INSTALLED, *LATEST, *ALL or a number). There is no separate display command for groups.
SQL gives the same information in a form you can save and compare:
SELECT PTF_GROUP_NAME, PTF_GROUP_DESCRIPTION, PTF_GROUP_LEVEL, PTF_GROUP_STATUS
FROM QSYS2.GROUP_PTF_INFO
ORDER BY PTF_GROUP_NAME, PTF_GROUP_LEVEL DESC;
SELECT PTF_IDENTIFIER, PTF_PRODUCT_ID, PTF_LOADED_STATUS, PTF_IPL_ACTION, PTF_IPL_REQUIRED
FROM QSYS2.PTF_INFO
WHERE PTF_PRODUCT_ID = '5770SS1'
ORDER BY PTF_IDENTIFIER DESC
FETCH FIRST 20 ROWS ONLY;
PTF_LOADED_STATUS reports values such as NOT LOADED, LOADED, APPLIED, PERMANENTLY APPLIED, PERMANENTLY REMOVED, DAMAGED and SUPERSEDED. PTF_IPL_ACTION shows what will happen at the next IPL.
Ordering PTFs with SNDPTFORD
SNDPTFORD places an order with IBM over the electronic service connection. PTFID accepts individual PTF identifiers and special values for common packages:
/* Individual PTFs for a specific product */
SNDPTFORD PTFID((SI12345 5770SS1))
/* The current cumulative package, the HIPER group and the Db2 group */
SNDPTFORD PTFID(*CUMPKG *HIPERGRP *DB2GRP)
The other documented special values are *BRSGRP, *JVAGRP, *HTTPGRP, *PFRGRP and *ALLGRP. Useful parameters include:
ORDER(*REQUIRED)also orders the requisite PTFs;ORDER(*PTFID)orders only what you list.DELIVERY(*LINKONLY)uses the electronic service link only;*ANYallows any available method.DLVRYFMT(*SAVF)delivers save files;DLVRYFMT(*IMAGE)delivers optical image files.PTFPART(*CVRLTR)orders cover letters only, which is a good way to read them before committing to an install.REORDER(*NO)skips PTFs that are already loaded or applied.
Read each order’s progress with WRKPTFORD. You can also download PTFs from IBM Fix Central when the partition has no suitable connection.
Installing and Applying
Group and cumulative packages are normally installed through the PTF menu:
GO PTF
/* Option 8: Install program temporary fix package */
Option 8 loads the PTFs and marks them to be applied at the next IPL. Run option 8 only once per IPL: if the media has several volume sets, choose the prompt-for-media setting that loads every volume set in the same run rather than repeating option 8 between volume sets.
For individual PTFs, load them with LODPTF and apply them with APYPTF:
/* Apply temporarily the immediate PTFs now; delayed PTFs wait for an IPL */
APYPTF LICPGM(5770SS1) SELECT(SI12345) APY(*TEMP) DELAYED(*NO)
/* Apply the immediate PTFs now and mark the delayed ones for the next IPL */
APYPTF LICPGM(5770SS1) SELECT(*ALL) APY(*TEMP) DELAYED(*IMMDLY)
/* Make temporarily applied PTFs permanent */
APYPTF LICPGM(5770SS1) SELECT(*ALL) APY(*PERM)
There is no APYGRPPF command. A PTF group is installed as a package through GO PTF option 8, which is what applies every PTF in it. Other APYPTF parameters worth knowing:
APYis*TEMPor*PERM.DELAYEDis*NO,*YESor*IMMDLY.IPLAPYcontrols what is applied at the next unattended IPL;IPLAPY(*NO)cancels earlier requests.APYREQ(*YES)also applies requisite PTFs.
Delivering PTFs and Media with an Image Catalog
Cumulative packages and release media arrive as large image files. An image catalog lets IBM i read them as virtual optical media instead of writing them to DVDs.
/* Create a catalog over a directory that already holds the image files */
CRTIMGCLG IMGCLG(PTFCAT) DIR('/ptfimages') TYPE(*OPT) ADDVRTVOL(*DIR)
/* Show the entries */
WRKIMGCLGE IMGCLG(PTFCAT)
/* Make the catalog ready on a virtual optical device */
LODIMGCLG IMGCLG(PTFCAT) DEV(OPTVRT01) OPTION(*LOAD)
/* When you are finished */
LODIMGCLG IMGCLG(PTFCAT) DEV(OPTVRT01) OPTION(*UNLOAD)
ADDVRTVOL(*DIR) adds every image file in the directory as a catalog entry. The virtual device must exist and be varied on first; create it with CRTDEVOPT using a virtual resource. SNDPTFORD DLVRYFMT(*IMAGE) can deliver straight into a catalog directory.
Planning an OS Upgrade
A release upgrade is a larger change than a PTF cycle, and IBM publishes a detailed, release-specific checklist: Preparing to upgrade or replace IBM i software and the Installing, upgrading, or deleting IBM i and related software guide for your target release. Treat IBM’s checklist as authoritative and use this section as a planning outline.
- Check supportability. Confirm the target release supports your hardware and every licensed program, vendor product and application you run. IBM’s upgrade planning pages and its pre-upgrade verification tool are the place to look.
- Order the media and keys. Order the release media and any required software keys early. Allow several weeks for preparation.
- Bring the current release up to date. Apply a recent cumulative package and the HIPER and database groups first, so the upgrade starts from a known fix level.
- Clean up. Resolve damaged objects and failed products before you start.
GO LICPGMoption 10 lists installed licensed programs. - Save everything. Take a full system save (
SAVSYS,SAVLIB LIB(*ALLUSR),SAVand the other saves in IBM’s checklist) immediately before the upgrade, and confirm that you can restore from it. This save is your recovery point. - Rehearse. Run the upgrade steps on a test partition first, and test your applications there.
- Upgrade in the window. Follow IBM’s installation procedure for your method (automatic installation from image catalog or optical media, or a manual installation). Do not improvise commands for the install step.
- Finish the job. After the upgrade, order and apply the cumulative package and groups for the new release, verify licensed program status, and run your application checks before releasing the system to users.
Check the new release afterwards with the QSYS2 services rather than relying on one command’s output:
SELECT OS_VERSION, OS_RELEASE FROM SYSIBMADM.ENV_SYS_INFO;
Summary
Order cumulative and group PTFs with SNDPTFORD, install packages through GO PTF option 8, use APYPTF for individual PTFs with APY(*TEMP) or APY(*PERM), and read group status with WRKPTFGRP or QSYS2.GROUP_PTF_INFO. Group identifiers change with each release, so verify them against IBM’s PSP information. Plan a release upgrade from IBM’s checklist, rehearse it, and keep a verified full save as your way back.