Troubleshooting
Problem
This document provides a sample SQL for comparing PTFs between systems.
Resolving The Problem
To determine whether all PTFs are on one system, on the operating system command line for each system type the following:
Note: This command can be limited to one or more specific products rather than all products by replacing the LICPGM parameter value *ALL with a specific product name; for example, 5769999 or 5722SS1. In addition, the wanted output depends on the SQL statement used. In the following example, the compare is against only a specific LPP and PTFs on the system. There is no further qualification to show if the PTFs are superseded, Temporarily Applied, Permanently Applied, Not Applied, and so on. Further criteria must be specified.
DSPPTF LICPGM(*ALL) OUTPUT(*OUTFILE) OUTFILE(LIB/OUTFILE)
Press the Enter key.
In this case, System A named the output file ptfa. System b named the output file ptfb. Move both files to the same system.
Find an SQL interface such as STRSQL or System i Navigator. Run SQL scripts, and run the following statement:
This query produces the following output that shows all PTFs on System A that are not on System B:
A reverse of the statement as follows shows all PTFs on System B that are not on System A:
The same procedure can also be done with Query/400 as the following screens show. To start Query/400, on the operating system command-line type the following and press the Enter key:
WRKQRY
From the following screen, flag the same options with 1 as shown, and press the Enter key.
Press F9 to specify an extra file selection. Type both files as shown:
To change the type of join, type 3 as shown:
Complete the following screen as shown:
Note: This command can be limited to one or more specific products rather than all products by replacing the LICPGM parameter value *ALL with a specific product name; for example, 5769999 or 5722SS1. In addition, the wanted output depends on the SQL statement used. In the following example, the compare is against only a specific LPP and PTFs on the system. There is no further qualification to show if the PTFs are superseded, Temporarily Applied, Permanently Applied, Not Applied, and so on. Further criteria must be specified.
DSPPTF LICPGM(*ALL) OUTPUT(*OUTFILE) OUTFILE(LIB/OUTFILE)
Press the Enter key.
In this case, System A named the output file ptfa. System b named the output file ptfb. Move both files to the same system.
Find an SQL interface such as STRSQL or System i Navigator. Run SQL scripts, and run the following statement:
select a.SCPPID, a.SCPTFID
from lib/ptfa a exception join lib/ptfb b
on a.scptfid = b.scptfid
This query produces the following output that shows all PTFs on System A that are not on System B:
LIC PGM |
PTF |
5722999 |
MF27652 |
5722999 |
MF27621 |
5722999 |
MF27597 |
5722999 |
MF27559 |
5722999 |
MF27513 |
5722999 |
MF27455 |
5722999 |
MF27452 |
5722999 |
MF27432 |
5722999 |
MF27349 |
5722999 |
MF27344 |
A reverse of the statement as follows shows all PTFs on System B that are not on System A:
select a.SCPPID, a.SCPTFID
from lib/ptfb a exception join lib/ptfa b
on a.scptfid = b.scptfid
The same procedure can also be done with Query/400 as the following screens show. To start Query/400, on the operating system command-line type the following and press the Enter key:
WRKQRY
Work with Queries |
From the following screen, flag the same options with 1 as shown, and press the Enter key.
Define the Query |
Press F9 to specify an extra file selection. Type both files as shown:
Specify File Selections |
To change the type of join, type 3 as shown:
Specify Type of Join |
Complete the following screen as shown:
Specify How to Join Files |
Select and Sequence Fields |
At this point, you can save or run the query report.
Note: If System i Navigator is available, use of Management Central is also an option to compare PTFs between systems.
[{"Type":"MASTER","Line of Business":{"code":"LOB57","label":"Power"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SWG60","label":"IBM i"},"Platform":[{"code":"PF012","label":"IBM i"}],"Version":"7.1.0"}]
Historical Number
25790327
Was this topic helpful?
Document Information
Modified date:
18 December 2019
UID
nas8N1017110