× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



A little bit of this information is in the PSP SF98039 but it certainly looks like the web pages are for the silos to get information out there "quickly".

For SF98039, here is a little code to parse the download. Yep, it is parsing a report and yep it is hardcoding stuff in the program that might be unreliable and yep it is not well tested and yep it could be improved. But give it a try anyway. Do this first:

SBMJOB CMD(SNDPTFORD PTFID((SF98039))) JOB(GETPSPINFO)

Wait for it to finish. CALL DP9001 (or whatever you called the program) from command line. Check the "detailed messages". Read the code for details.


     H option(*srcstmt:*nodebugio)
       // DP9001 - check the PSP information for missing PTFs
       // Run this command first:
       // SBMJOB CMD(SNDPTFORD PTFID((SF98039))) JOB(GETPSPINFO)
       // wait for it to finish
       // call dp9001 from command line, view detailed messages

     Fqapzcover if   E             DISK    ExtMbr('QSF98039')
     F                                     Rename(QAPZCOVER:RCD)
     F                                     Prefix(ptf_)

     D* Configuration stuff
     D Pgm_Version     c                   const(.00001)
     D Pgm_Status      c                   const('Works for me')

     D* Global variables
     D PTF             s              7a
     D productID       s              7a
     D PTFStatus       s             25a

     D*--------------------------------------------------
     D* Procedure name: parseRecommendation
     D* Purpose:        Parse a line looking for a PTF number
     D* Returns:        PTF Number
     D*--------------------------------------------------
     D parseRecommendation...
     D                 PR             7A

     D*--------------------------------------------------
     D* Procedure name: GetStsWords
     D* Purpose:        Change the status code into words
     D* Returns:        Status as words
     D* Parameter:      statusCode => Loaded Status code
     D*--------------------------------------------------
     D GetStsWords     PR            25A
     D  statusCode                    1A   VALUE

     D*--------------------------------------------------
     D* Procedure name: parseProductID
     D* Purpose:        Parse out the licensed program involved
     D* Returns:        Product ID
     D*--------------------------------------------------
     D parseProductID  PR             7A

     D*--------------------------------------------------
     D* Procedure name: getPTFStatus
     D* Purpose:        Retrieve the PTF status on the system
     D* Returns:        PTF status in words
     D* Parameter:      PTFId => PTF identifier
     D*--------------------------------------------------
     D getPTFStatus    PR            25A
     D  PTFId                         7A   VALUE

     D*--------------------------------------------------
     D* Procedure name: RtvPTFInfo
     D* Purpose:        Retrieve the PTF information
     D* Returns:        ErrCde and Data Structure
     D* Parameter:
     D*--------------------------------------------------
     D RtvPTFInfo      PR                  extpgm('QPZRTVFX')
     D  rcvrVariable                  1    options(*varsize)
     D  rcvrVarLength                10i 0 const
     D  PTFInfo                      50A
     D  FormatName                    8A   const
     D  ErrorCode                          likeDS(ErrCde) options(*nopass)

     D ErrCde          ds
     D  BytPrv                       10i 0
     D  BytAvl                       10i 0
     D  MsgID                         7a
     D  Garbage                       1a
     D  ErrMSgDta                   100a

     D Receiver        ds
     D  BytesReturned                10i 0
     D  BytesAvail                   10i 0
     D  OfstAddnInfo                 10i 0
     D  PID                           7A
     D  PTFId                         7A
     D  RlsLvl                        6A
     D  PrdOpt                        4A
     D  LoadID                        4A
     D  LoadedSts                     1A
     D  CvrLetterSts                  1A
     D  OnOrderSts                    1A
     D  SavfSts                       1A
     D  FilNam                       10A
     D  FilLibNam                    10A
     D  PTFType                       1A
     D  IPLAct                        1A
     D  ActPnd                        1A
     D  ActReq                        1A
     D  PTFRls                        1A
     D  TgtRls                        6A
     D  SupersedePTF                  7A
     D  IPLSide                       1A
     D  MinLevel                      2A
     D  MaxLevel                      2A
     D  FormatInfoAvl                 1A
     D  StsDateTime                  13A
     D  LicGroup                      7A
     D  SupersededBy                  7A
     D  CurrSvrIPLSrc                 1A
     D  SvrIPLRqd                     1A
     D  CrtDateTime                  13A
     D  Reserved                      1A
     D PTFInfo         ds
     D  piPTFID                       7a
     D  piPID                         7a
     D  piRlsLvl                      6a
     D  piCCSID                      10i 0
     D  piClosePTFDBF                 1a
     D  piReserved                   25a


      /free
       // Mainline - read the file created by SNDPTFORD
       read qapzcover;
       dow not %eof(qapzcover);
         if %scan('PROBLEM:' : ptf_qapzcover : 1) > 0;
           productID = parseProductID();
         endif;
         if %scan('RECOMMENDATION:':ptf_qapzcover:1) > 0;
           PTF = parseRecommendation();
           PTFStatus = getPTFStatus(PTF);
           if PTFStatus <> 'Perm applied' and
              PTFStatus <> 'Superseded'   and
              PTFStatus <> 'Applied'      and
              PTFStatus <> 'Perm applied';
             dsply (ptf + ' ' + ProductID + ' ' + PTFStatus);
             productID = *blanks;
           endif;
         ENDIF;
         read qapzcover;
       ENDDO;
       *inlr = *on;
      /end-free

     P*--------------------------------------------------
     P* Procedure name: parseRecommendation
     P* Purpose:        Parse a line looking for a PTF number
     P* Returns:        PTF Number
     P*--------------------------------------------------
     P parseRecommendation...
     P                 B
     D parseRecommendation...
     D                 PI             7A


     D* Local fields
     D retField        S              7A
     D where           s             10i 0

      /FREE
        retField = *blanks;
        where = %scan('PTF':ptf_qapzcover:1);
        if where > 0;
          retField = %subst(ptf_qapzcover:where+4:7);
        endif;
        RETURN retField;

      /END-FREE
     P parseRecommendation...
     P                 E


     P*--------------------------------------------------
     P* Procedure name: getPTFStatus
     P* Purpose:        Retrieve the PTF status on the system
     P* Returns:        PTF status in words
     P* Parameter:      PTFId => PTF identifier
     P*--------------------------------------------------
     P getPTFStatus    B
     D getPTFStatus    PI            25A
     D  PTFId                         7A   VALUE

     D* Local fields
     D retField        S             25A


      /FREE

        bytPrv  = %size(ErrCde);
        piPTFId = PTFId;
        piPID   = '*ONLY';
        RtvPTFInfo(receiver : %size(receiver) : PTFInfo : 'PTFR0100':
                   ErrCde);
        if bytAvl <> 0;
          retField = 'Not Found (need to DL?)';
        Else;
          retField = getStsWords(LoadedSts);
        ENDIF;

        RETURN retField;

      /END-FREE
     P getPTFStatus    E


     P*--------------------------------------------------
     P* Procedure name: GetStsWords
     P* Purpose:        Change the status code into words
     P* Returns:        Status as words
     P* Parameter:      statusCode => Loaded Status code
     P*--------------------------------------------------
     P GetStsWords     B
     D GetStsWords     PI            25A
     D  statusCode                    1A   VALUE


     D* Local fields
     D retField        S             25A

      /FREE

        Select;
          when statusCode = '0';
            retField = 'Never loaded';
          when statusCode = '1';
            retField = 'Loaded';
          when statusCode = '2';
            retField = 'Applied';
          when statusCode = '3';
            retField = 'Perm applied';
          when statusCode = '4';
            retField = 'Perm removed';
          when statusCode = '5';
            retField = 'Damaged';
          when statusCode = '6';
            retField = 'Superseded';
          other;
            retField = 'Unknown status: ' + statusCode;
        ENDSL;
        RETURN retField;

      /END-FREE
     P GetStsWords     E


     P*--------------------------------------------------
     P* Procedure name: parseProductID
     P* Purpose:        Parse out the licensed program involved
     P* Returns:        Product ID
     P*--------------------------------------------------
     P parseProductID  B
     D parseProductID  PI             7A


     D* Local fields
     D retField        S              7A
     D where           s             10i 0

      /FREE
        retField = *blanks;
        where = %scan('=' : ptf_qapzcover:1);
        if where > 0;
          retField = %subst(ptf_qapzcover : where+2 : 7);
        endif;
        RETURN retField;

      /END-FREE
     P parseProductID  E

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.