Order PTF Groups, Download them to the IBM i, and Create an Image Catalog

When I first started as an “administrator” on the IBM i (I wasn’t given this title but I basically took on the task because the system intrigued me) downloading PTFs always seemed complicated and confusing to me. I didn’t really understand the difference between the groups, and individual PTFs and what the groups were for. I knew it was needed and I new loading them updated various pieces of the IBM i system but it was new and uncomfortable. I hope in this post to bring some clarity to the process of retrieving them and why they are important.

Now I work for CMA Technology Solutions and we help customers with this all of the time. In fact, several weeks back I upgraded 6 systems to V7R3 and loaded these PTFs in one week.

Here is a link from IBM with many Frequently Asked Questions (FAQs) on PTFs: IBM i PTF FAQs

Steve Pitcher has a great explanation of the different types of PTFs in this article: found here. I pulled his explanation a put it below.

What is a PTF? PTF stands for Program Temporary Fix, which could have been an accurate descriptor 25 years ago, but today the term is very misleading. PTFs include much more than just fixes. In fact, many new and exciting development features of the IBM i operating system are brought to you via PTF, most notably in the new Technology Refresh (TR) concept.

There are three types of PTFs: Individual, Group, and Cumulative.

  1. Individual PTFs are just that. You can download a single PTF, load it, and apply it.
  2. A Group PTF is a collection of PTFs related to a part of the operating system (e.g., security, DB2, hardware) or an integrated application (e.g., IBM HTTP Server, WebSphere Application Server). A Group HIPER is a collection of PTFs that fixes issues that are deemed high-impact; they’re released on a regular, frequent basis.
  3. A Cumulative PTF package (or CUME as it’s called) is a bit of a misnomer as well. Although it contains a large amount of fixes and updates, it doesn’t include all PTFs IBM has for that release and it doesn’t include all the Group PTFs.

    Thanks Steve!

Why Install PTFs? Here are 4 reasons to install PTFs.

  1. Repair security holes. PTFs update security protocols and bring the system current with safe/best practices in the area of security. Many of the security features and enhancements have to be configured in order to work properly. IBM i is one of the most secure and securable systems out there but you have to implement the security best practices for them to be effective.
  2. Address known performance issues. Lets face it, no one is perfect. You code, test, code, test, have others test, you test some more but inevitably there are things you can do or tweak to help things run and perform optimally. PTFs correct reported and known issues.
  3. Add new features. IBM is dedicated to adding new features in between OS releases. We have seen so many new and amazing features come as the result of PTFs and TRs.
  4. Hardware compatibility. New devices are hitting the market everyday. PTFs increase compatibility.

So now that we know more about what they are are and why we should install them, let’s get to the walk-through.

Order PTF Groups

  1. Go to Fix Central (you will need a IBM account and must have current and active support to access this)
  1. You will need to collect your machine type and serial number, enter it, and click Continue.
    • Machine type and serial # can be found here: run WRKHDWPRD from the command line then option 4 – it lists both at the top
    • Another place you can find the serial number by running DSPSYSVAL QSRLNBR
  2. Select the drop down under the cumulative and group PTFs for the version of OS you are running (I am going to select V7R3) and click Continue.
    • If you don’t know what version of the OS you are running, from a command line you can run DSPPTF. It lists the version under the Release of base option.
  1. On this screen you will make your selections for the PTF Groups that you want to download and click Continue.
    • If you want to know what PTF Groups are needed, go to a command line and run WRKPTFGRP. This screen will show you all of the groups installed. Hitting F11 will show you the names for each group.

NOTE: If you want to download all of the groups change show results from 10 to All, then click the select All box at the top to the left of Description.

  1. You will now be at the Download Options screen. Select Download virtual images using FTP, enter your email, (I change the directory and base file names to SF99730 to help me identify these as 7.3 PTFs. This is not required and you can just leave it how it is if you like. This is how IBM names the files when they create them.) and click Continue.
  1. You will then be taken to the Order Summary screen with the details of your order.
    As Noted at the top: Your order has been sent to the FTP server for processing. You will receive an email when the processing system receives the order. When the order is ready you will receive another email with instructions for downloading the fixes.

    NOTE: It will take some time (maybe several hours) for this email to arrive but you should receive it within the hour.

You should receive an initial email letting you know that IBM received your order. It will look like this:

Download PTF Groups using CL on the IBM i

Let me first start by addressing the question, “Why would I want to use CL to download the PTF Groups?” In my opinion, it advantageous for several reasons. First, once you create this structure it is there and ready for the next time. NOTE: PTFs should be installed several times a year. Second, the PTF Groups are downloaded directly to the system where they will be installed. Saving you time and effort. Third, you can submit the job and let it run instead of running interactively where it ties up your session and will get disconnected causing you to have to start over.

  1. I received the email with the instructions to download the PTF Groups. This is what it looks like.
  1. Create the directory on the IFS to store the files: CRTDIR ‘/SF99730’
  2. We are going to create 3 files; two txt files and one CLLE. NOTE: I am going to use RDi (IBM Rational Developer for i) to work with these files
    • TXT: FTPINPT – the file that stores the text from the email you received from IBM
    • TXT: FTPLOG – the results on the FTP connection
    • CLLE: GETPTF – the CLLE program to execute the process

This is what the source file will look like in both RDi and STRPDM:

  1. First I created the FTPINPT text file and added the text from the email
  1. Create the FTPLOG text file which will be blank
  1. Create the GETPTF CLLE program with the following code:
  1. Save and compile the CLLE program
  2. Run the CL program from the command line using SBMJOB CMD(CALL PGM(CMAPTF/GETPTF)) You can define what subsystem you want the job to run under so that you don’t block users for running their jobs. In this example I submitted my job to QBATCH since this is a test system.
  3. You can go to the subsystem that you submitted the job to and see how it is running. Also, you can go to the FTPLOG txt file and view it to see where it is in the process.
    NOTE: This will take time to complete since these are large files

Create the Image Catalog

  1. Once the download completes we will create the image catalog with the following command: CRTIMGCLG IMGCLG(SF99730) DIR(‘/SF99730’) CRTDIR(*NO)
  2. After it is created we need to add the entries. In this case we have 8 .bin files to add
    ADDIMGCLGE IMGCLG(SF99730) FROMFILE(‘SF99730_1.bin’) TOFILE(‘SF99730_1.bin’) IMGCLGIDX(*AVAIL)
    ADDIMGCLGE IMGCLG(SF99730) FROMFILE(‘SF99730_2.bin’) TOFILE(‘SF99730_2.bin’) IMGCLGIDX(*AVAIL)
    ADDIMGCLGE IMGCLG(SF99730) FROMFILE(‘SF99730_3.bin’) TOFILE(‘SF99730_3.bin’) IMGCLGIDX(*AVAIL)
    ADDIMGCLGE IMGCLG(SF99730) FROMFILE(‘SF99730_4.bin’) TOFILE(‘SF99730_4.bin’) IMGCLGIDX(*AVAIL)
    ADDIMGCLGE IMGCLG(SF99730) FROMFILE(‘SF99730_5.bin’) TOFILE(‘SF99730_5.bin’) IMGCLGIDX(*AVAIL)
    ADDIMGCLGE IMGCLG(SF99730) FROMFILE(‘SF99730_6.bin’) TOFILE(‘SF99730_6.bin’) IMGCLGIDX(*AVAIL)
    ADDIMGCLGE IMGCLG(SF99730) FROMFILE(‘SF99730_7.bin’) TOFILE(‘SF99730_7.bin’) IMGCLGIDX(*AVAIL)
    ADDIMGCLGE IMGCLG(SF99730) FROMFILE(‘SF99730_8.bin’) TOFILE(‘SF99730_8.bin’) IMGCLGIDX(*AVAIL)

  3. Load the image catalog to a virtual optical. In my case I am using OPTVRT01: LODIMGCLG IMGCLG(SF99730) OPTION(*LOAD) DEV(OPTVRT01)
  4. Now we want to verify the image catalog and sort it’s contents: VFYIMGCLG IMGCLG(SF99730) TYPE(PTF) SORT(YES)
    NOTE: You want it to come back with this message: Image catalog SF99730, type *PTF verified.
  5. The PTF Groups are ready to install. You will need to put your system in restricted state and use GO PTF option 8 to install them. Below is a screen shot of what option 8 would look like filled out.

PTF Groups Ordered, Downloaded, and Installed.

If you have any questions or comments please add them to this post or email me here. Thanks for reading!