Display a PTF without knowing the product number

Learn how to display PTF information without having to bother with the product number.

Have you ever been in the situation when an IBM support employee asks you several times, "Do you have PTF SFXXXX

installed?" They ask this without mentioning the product number. Well, I have. Lots of times, and exactly for that reason I've made this command: XDSPPTF. It displays PTF information like when you use the normal DSPPTF command without having to bother about the product number. It saves a lot of typing when you have someone on the other side of the line rattling about all sorts of PTFs. Command exits of a CMD source and a CL source, put in your QCLSRC and QCMDSRC file and compile them with the commands: CRTCLPGM PGM(XDSPPTF) SRCFILE(QCLSRC) and CRTCMD CMD(XDSPPTF) PGM(XDSPPTF) SRCFILE(QCMDSRC)


  XDSPPTF *CMD:

CMD        PROMPT('Display PTF')                  
PARM       KWD(PTFID) TYPE(*CHAR) LEN(7) MIN(1) + 
             FULL(*YES) PROMPT('PTF number')     


XDSPPTF *PGM :

             PGM        PARM(&PTFID) /* Display  PTF */                
             DCL        VAR(&PTFID) TYPE(*CHAR) LEN(7)                 
             DCL        VAR(&OUTVAR) TYPE(*CHAR) LEN(19)               
             DCL        VAR(&PTFINFO) TYPE(*CHAR) LEN(50) +            
                          VALUE('???????*ONLY  ')                      
             DCL        VAR(&ERRCDE) TYPE(*CHAR) LEN(56) +             
                          VALUE(X'00000038')                           
             DCL        VAR(&LICPGM) TYPE(*CHAR) LEN(7)                
             DCL        VAR(&MSGID) TYPE(*CHAR) LEN(7) /* Std err */   
             DCL        VAR(&MSGDTA) TYPE(*CHAR) LEN(100) /* Std err */
             DCL        VAR(&MSGF) TYPE(*CHAR) LEN(10) /* Std err */   
             DCL        VAR(&MSGFLIB) TYPE(*CHAR) LEN(10) /* Std err */
                                                                       
             MONMSG     MSGID(CPF0000) EXEC(GOTO CMDLBL(STDERR1))      
             CHGVAR     VAR(%SST(&PTFINFO 1 7)) VALUE(&PTFID)          
             CALL       PGM(QPZRTVFX) PARM(&OUTVAR X'00000013' +       
                          &PTFINFO 'PTFR0100' &ERRCDE)                 
             CHGVAR     VAR(&LICPGM) VALUE(%SST(&OUTVAR 13 7))         
             CHGVAR &MSGID %SST(&ERRCDE 9 7)                           
             IF         COND(&MSGID *NE '       ') THEN(DO)            
             CHGVAR &MSGDTA %SST(&ERRCDE 17 39)                       
             SNDPGMMSG  MSGID(&MSGID) MSGF(QCPFMSG) MSGDTA(&MSGDTA) + 
             MSGTYPE(*ESCAPE)                                         
             ENDDO                                                    
             ELSE       CMD(DSPPTF LICPGM(&LICPGM) SELECT(&PTFID))    
             GOTO       CMDLBL(EINDE)                                 
                                                                      
 STDERR1:    RCVMSG     MSGTYPE(*DIAG) MSGDTA(&MSGDTA) MSGID(&MSGID) +
                          MSGF(&MSGF) MSGFLIB(&MSGFLIB)               
             IF         (&MSGID *EQ '       ') GOTO STDERR3           
             SNDPGMMSG  MSGID(&MSGID) MSGF(&MSGFLIB/&MSGF) +          
                          MSGDTA(&MSGDTA) MSGTYPE(*DIAG)              
             GOTO       STDERR1 /* Loop back for addl diagnostics */  
 STDERR3:    RCVMSG     MSGTYPE(*EXCP) MSGDTA(&MSGDTA) MSGID(&MSGID) +
                          MSGF(&MSGF) MSGFLIB(&MSGFLIB)               
             SNDPGMMSG  MSGID(&MSGID) MSGF(&MSGFLIB/&MSGF) +          
                          MSGDTA(&MSGDTA) MSGTYPE(*ESCAPE)            
                                                                      
 EINDE:   /**/                                                        
             ENDPGM     

==================================
MORE INFORMATION ON THIS TOPIC
==================================

The Best Web Links: tips, tutorials and more.

Ask your systems management questions--or help out your peers by answering them--in our live discussion forums.

Ask the Experts yourself: Our systems management gurus are waiting to answer your technical questions.

This was first published in March 2002

Dig deeper on PTFs

0 comments

Oldest 

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

SearchEnterpriseLinux

SearchDataCenter

Close