× 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.



   I've done that in the past, using the scheduler. Every second Thursday,
   I'd order the HIPER's, and order the cumulative every quarter.
   The tapes/CD's showed up the following Monday
   -- 

   Paul Nelson
   Arbor Solutions, Inc.
   708-670-6978  Cell
   pnelson@xxxxxxxxxx
   -----midrange-l-bounces@xxxxxxxxxxxx wrote: -----

     To: "'Midrange Systems Technical Discussion'" <midrange-l@xxxxxxxxxxxx>
     From: "Jeff Crosby" <jlcrosby@xxxxxxxxxxxxxxxx>
     Sent by: midrange-l-bounces@xxxxxxxxxxxx
     Date: 07/19/2006 10:36AM
     Subject: RE: SNDPTFORD w/no prompt for contact info

     > One easy way to do that is to submit it in batch
     >
     > SBMJOB CMD(SNDPTFORD PTFID((SI12343)))
     >
     > Or if you are running in v5r4 or v5r3 you could use the new Control
     > PTF Order QESCPTFO
     >
     >http://publib.boulder.ibm.com/infocenter/iseries/v5r3/index.js
     > p?topic=/apis/qescptfo.htm

     The reason I was asking is I wrote a command and CL to order the c u m
     e,
     PSP, all group PTFs, or any combination thereof, and didn't want to get
     bothered repeatedly for that info.  I just had the CL submit itself to
     batch.

     Here's the command:

     /* CPP=ORDPTFPKG */

       CMD        PROMPT('Order PSP, Cum, or Group PTFs')

       PARM       KWD(QRYCUM) +
                  TYPE(*CHAR) +
                  LEN(1) +
                  RSTD(*YES) +
                  DFT(*NO) +
                  SPCVAL((*YES Y) (*NO N)) +
                  PROMPT('Query the latest cum PTF?')

       PARM       KWD(GETPSP) +
                  TYPE(*CHAR) +
                  LEN(1) +
                  RSTD(*YES) +
                  DFT(*NO) +
                  SPCVAL((*YES Y) (*NO N)) +
                  PROMPT('Get the PSP information?')

       PARM       KWD(GETCUM) +
                  TYPE(*CHAR) +
                  LEN(1) +
                  RSTD(*YES) +
                  DFT(*NO) +
                  SPCVAL((*YES Y) (*NO N)) +
                  PROMPT('Get the latest cum PTF?')

       PARM       KWD(GETHIPER) +
                  TYPE(*CHAR) +
                  LEN(1) +
                  RSTD(*YES) +
                  DFT(*NO) +
                  SPCVAL((*YES Y) (*NO N)) +
                  PROMPT('Get the latest HIPER Group?')

       PARM       KWD(GETDB2) +
                  TYPE(*CHAR) +
                  LEN(1) +
                  RSTD(*YES) +
                  DFT(*NO) +
                  SPCVAL((*YES Y) (*NO N)) +
                  PROMPT('Get the latest DB2 Group?')

       PARM       KWD(GETBRS) +
                  TYPE(*CHAR) +
                  LEN(1) +
                  RSTD(*YES) +
                  DFT(*NO) +
                  SPCVAL((*YES Y) (*NO N)) +
                  PROMPT('Get the latest BRS Group?')

       PARM       KWD(GETJVA) +
                  TYPE(*CHAR) +
                  LEN(1) +
                  RSTD(*YES) +
                  DFT(*NO) +
                  SPCVAL((*YES Y) (*NO N)) +
                  PROMPT('Get the latest JVA Group?')

       PARM       KWD(GETHTTP) +
                  TYPE(*CHAR) +
                  LEN(1) +
                  RSTD(*YES) +
                  DFT(*NO) +
                  SPCVAL((*YES Y) (*NO N)) +
                  PROMPT('Get the latest HTTP Group?')

       PARM       KWD(GETPFR) +
                  TYPE(*CHAR) +
                  LEN(1) +
                  RSTD(*YES) +
                  DFT(*NO) +
                  SPCVAL((*YES Y) (*NO N)) +
                  PROMPT('Get the latest PFR Group?')

       PARM       KWD(GETTCP) +
                  TYPE(*CHAR) +
                  LEN(1) +
                  RSTD(*YES) +
                  DFT(*NO) +
                  SPCVAL((*YES Y) (*NO N)) +
                  PROMPT('Get recommended TCP/IP fixes?')

     Here's the CL:

     /* Order latest c u m e, PSP, or group PTFs */

         PGM        PARM(&QRYCUM &GETPSP &GETCUM &GETHIPER &GETDB2 &GETBRS +
                    &GETJVA &GETHTTP &GETPFR &GETTCP)

     /* PARMS */

         DCL        VAR(&QRYCUM)  +
                    TYPE(*CHAR) +
                    LEN(1)/* Inquire as to what is the latest cum PTF? */
         DCL        VAR(&GETPSP)  +
                    TYPE(*CHAR) +
                    LEN(1)/* Get Preventative Service Planning (PSP) info? */
         DCL        VAR(&GETCUM)  +
                    TYPE(*CHAR) +
                    LEN(1)/* Get latest cum PTF? */
         DCL        VAR(&GETHIPER)  +
                    TYPE(*CHAR) +
                    LEN(1)/* Get latest HIPER group? */
         DCL        VAR(&GETDB2)  +
                    TYPE(*CHAR) +
                    LEN(1)/* Get latest DB2 group? */
         DCL        VAR(&GETBRS)  +
                    TYPE(*CHAR) +
                    LEN(1)/* Get latest BRS group? */
         DCL        VAR(&GETJVA)  +
                    TYPE(*CHAR) +
                    LEN(1)/* Get latest JVA group? */
         DCL        VAR(&GETHTTP)  +
                    TYPE(*CHAR) +
                    LEN(1)/* Get latest HTTP group? */
         DCL        VAR(&GETPFR)  +
                    TYPE(*CHAR) +
                    LEN(1)/* Get latest PFR group? */
         DCL        VAR(&GETTCP)  +
                    TYPE(*CHAR) +
                    LEN(1)/* Get latest recommended TCP/IP fixes? */

     /* WORK VARIABLES */

         DCL        VAR(&QRYPFX)  +
                    TYPE(*CHAR) +
                    LEN(4) +
                   VALUE('SF97')/* Prefix for inquiring what is the latest +
                    cum PTF */
         DCL        VAR(&PSPPFX)  +
                    TYPE(*CHAR) +
                    LEN(4) +
                    VALUE('SF98')/* Prefix for PSP info PTF */

         DCL        VAR(&VRMRAW)  +
                    TYPE(*CHAR) +
                    LEN(9)/* As retrieved from data area */
         DCL        VAR(&VRMINF)  +
                    TYPE(*CHAR) +
                    LEN(3)/* After stripping letters V, R, and M */

         DCL        VAR(&QRYPTF)  +
                    TYPE(*CHAR) +
                    LEN(10)/* Latest query cum actual PTF number */
         DCL        VAR(&PSPPTF)  +
                    TYPE(*CHAR) +
                    LEN(10)/* PSP actual PTF number */

         DCL        VAR(&ACTORDPTF)  +
                    TYPE(*CHAR) +
                    LEN(10)/* Actual PTF currently ordering */

         DCL        VAR(&MSGDTA)  +
                    TYPE(*CHAR) +
                    LEN(512)/* Message data */
         DCL        VAR(&TYPE1) +
                    TYPE(*CHAR) +
                    LEN(1)
         DCL        VAR(&JOB) +
                    TYPE(*CHAR) +
                    LEN(10)
         DCL        VAR(&SBMMSGQ) +
                    TYPE(*CHAR) +
                    LEN(10)
         DCL        VAR(&SBMMSGQLIB) +
                    TYPE(*CHAR) +
                    LEN(10)

     /* GET JOB ATTRIBUTES */

         RTVJOBA    JOB(&JOB) +
                    TYPE(&TYPE1) +
                    SBMMSGQ(&SBMMSGQ) +
                    SBMMSGQLIB(&SBMMSGQLIB)

     /* SET UP MESSAGE QUEUE NAME */

         IF         COND(&TYPE1 *EQ '1') +
                    THEN(DO)
           CHGVAR     VAR(&SBMMSGQ) +
                      VALUE(&JOB)
           CHGVAR     VAR(&SBMMSGQLIB) +
                      VALUE('*LIBL')
         ENDDO

     /***********************/
     /* INTERACTIVE PORTION */
     /***********************/

         IF         COND(&TYPE1 *EQ '1') +
                    THEN(DO)

           SBMJOB     CMD(CALL PGM(ORDPTFPKG) PARM(&QRYCUM &GETPSP &GETCUM +
                      &GETHIPER &GETDB2 &GETBRS &GETJVA &GETHTTP &GETPFR +
                      &GETTCP)) +
                      JOB(ORDPTFPKG)

           SNDPGMMSG  MSGID(CPF9897) +
                      MSGF(QCPFMSG) +
                      MSGDTA('Requested PTF packages order has been +
                      submitted.')
           RETURN
         ENDDO

     /*****************/
     /* BATCH PORTION */
     /*****************/

     /* GET THE VERSION, RELEASE, AND MODIFICATION LEVEL */

         RTVOBJD    OBJ(QSYS/QCMD)  +
                    OBJTYPE(*PGM) +
                    SYSLVL(&VRMRAW)/* Returned as VnnRnnMnn.  (V02R03M01) */
         CHGVAR     VAR(&VRMINF) +
                    VALUE(%SST(&VRMRAW 3 1) *CAT %SST(&VRMRAW 6 1) *CAT +
                    %SST(&VRMRAW 9 1))

     /* SET UP THE ACTUAL PTF NUMBERS */

         CHGVAR     VAR(&QRYPTF) +
                    VALUE(&QRYPFX *TCAT &VRMINF)
         CHGVAR     VAR(&PSPPTF) +
                    VALUE(&PSPPFX *TCAT &VRMINF)

     /* QUERY LATEST C U M */

         IF         COND(&QRYCUM *EQ 'Y') +
                    THEN(DO)
           CHGVAR     &MSGDTA +
                      VALUE('Querying the latest cumulative PTF,' *BCAT +
                      &QRYPTF)
           CHGVAR     VAR(&ACTORDPTF) +
                      VALUE(&QRYPTF)
           CALLSUBR   SUBR(ORDPTF)
         ENDDO

     /* PSP INFO C U M */

         IF         COND(&GETPSP *EQ 'Y') +
                    THEN(DO)
           CHGVAR     VAR(&MSGDTA) +
                      VALUE('Ordering the latest Preventative Service
     Planning +
                      (PSP) PTF,' *BCAT &PSPPTF)
           CHGVAR     VAR(&ACTORDPTF) +
                      VALUE(&PSPPTF)
           CALLSUBR   SUBR(ORDPTF)
         ENDDO

     /* LATEST C U M */

         IF         COND(&GETCUM *EQ 'Y') +
                    THEN(DO)
           CHGVAR     VAR(&MSGDTA) +
                      VALUE('Ordering the latest cumulative PTF')
           CHGVAR     VAR(&ACTORDPTF) +
                      VALUE('*CUMPKG')
           CALLSUBR   SUBR(ORDPTF)
         ENDDO

     /* HIPER GROUP */

         IF         COND(&GETHIPER *EQ 'Y') +
                    THEN(DO)
           CHGVAR     VAR(&MSGDTA) +
                      VALUE('Ordering the HIPER group')
           CHGVAR     VAR(&ACTORDPTF) +
                      VALUE('*HIPERGRP')
           CALLSUBR   SUBR(ORDPTF)
         ENDDO

     /* DB2 GROUP */

         IF         COND(&GETDB2 *EQ 'Y') +
                    THEN(DO)
           CHGVAR     VAR(&MSGDTA) +
                      VALUE('Ordering the DB2 group')
           CHGVAR     VAR(&ACTORDPTF) +
                      VALUE('*DB2GRP')
           CALLSUBR   SUBR(ORDPTF)
         ENDDO

     /* BRS GROUP */

         IF         COND(&GETBRS *EQ 'Y') +
                    THEN(DO)
           CHGVAR     VAR(&MSGDTA) +
                      VALUE('Ordering the BRS group')
           CHGVAR     VAR(&ACTORDPTF) +
                      VALUE('*BRSGRP')
           CALLSUBR   SUBR(ORDPTF)
         ENDDO

     /* JAVA GROUP */

         IF         COND(&GETJVA *EQ 'Y') +
                    THEN(DO)
           CHGVAR     VAR(&MSGDTA) +
                      VALUE('Ordering the JVA group')
           CHGVAR     VAR(&ACTORDPTF) +
                      VALUE('*JVAGRP')
           CALLSUBR   SUBR(ORDPTF)
         ENDDO

     /* HTTP GROUP */

         IF         COND(&GETHTTP *EQ 'Y') +
                    THEN(DO)
           CHGVAR     VAR(&MSGDTA) +
                      VALUE('Ordering the HTTP group')
           CHGVAR     VAR(&ACTORDPTF) +
                      VALUE('*HTTPGRP')
           CALLSUBR   SUBR(ORDPTF)
         ENDDO

     /* PFR GROUP */

         IF         COND(&GETPFR *EQ 'Y') +
                    THEN(DO)
           CHGVAR     VAR(&MSGDTA) +
                      VALUE('Ordering the PFR (performance) group')
           CHGVAR     VAR(&ACTORDPTF) +
                      VALUE('*PFRGRP')
           CALLSUBR   SUBR(ORDPTF)
         ENDDO

     /* TCP/IP RECOMMENDED FIXES */

         IF         COND(&GETTCP *EQ 'Y') +
                    THEN(DO)
           CHGVAR     VAR(&MSGDTA) +
                      VALUE('Ordering the recommended TCP/IP fixes')
           CHGVAR     VAR(&ACTORDPTF) +
                      VALUE('SF99315')
           CALLSUBR   SUBR(ORDPTF)
         ENDDO

     /* Send a completion message */

         SNDPGMMSG  MSGID(CPF9897) +
                    MSGF(QCPFMSG) +
                    MSGDTA('All requested PTF groups/packages have been +
                    ordered') +
                    TOMSGQ(&SBMMSGQLIB/&SBMMSGQ)

     /*******************************/
     /* Subroutine to order the PTF */
     /*******************************/

         SUBR       SUBR(ORDPTF)

           SNDPGMMSG  MSGID(CPF9897) +
                      MSGF(QCPFMSG) +
                      MSGDTA(&MSGDTA) +
                      TOMSGQ(&SBMMSGQLIB/&SBMMSGQ QSYSOPR)
           SNDPTFORD  PTFID((&ACTORDPTF)) +
                      DELIVERY(*ANY)

         ENDSUBR

         ENDPGM

     If it's usefule to anyone, go ahead and use it.

     --
     Jeff Crosby
     Dilgard Frozen Foods, Inc.
     P.O. Box 13369
     Ft. Wayne, IN 46868-3369
     260-422-7531

     The opinions expressed are my own and not necessarily the opinion of my
     company.  Unless I say so.

     --
     This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
     list
     To post a message email: MIDRANGE-L@xxxxxxxxxxxx
     To subscribe, unsubscribe, or change list options,
     visit: http://lists.midrange.com/mailman/listinfo/midrange-l
     or email: MIDRANGE-L-request@xxxxxxxxxxxx
     Before posting, please take a moment to review the archives
     at http://archive.midrange.com/midrange-l.

As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.