Mainframe Utility: PRINTIT

Return to Mainframe Utilities Page

Module


/**********************************************************************
/* CLIST: PRINTIT                                                     *
/* AUTHOR: DAVID LEIGH                                                *
/* FUNCTION: THIS CLIST CONTROLS AN CLIST/ISPF DIALOG TO ENABLE       *
/*           PRINTING OF DATASETS TO MULTIPLE LOCATIONS AND IN        *
/*           MULTIPLE FORMATS.  IT MAY BE EXECUTED AS A CLIST OR AS AN*
/*           EDIT MACRO.  A COMPANION CLIST, "$PRINTIT" EXISTS        *
/*           SPECIFICALLY FOR THE DSLIST ENVIRONMENT.                 *
/**********************************************************************
PROC 0 PRNTPFX(SYST.ISPF)      /* POINT TO AN ISPF SET OF LIBRARIES */ +
       PCOPIES(0) /* DEFAULT "OVERRIDE" VALUE FOR EACH CONFIGURATION*/ +
       PDSN()                           /* THE INPUT DATASET IF ANY */ +
       CONFIG()     /* PRINT CONFIGURATION NAME FOR BATCH EXECUTION */ +
       GOTOSEC(REDISPLAY) /* INITIALIZE "VERIFY" SECTION GOTO LABEL */ +
       HLDCLASS(X)                            /* DEFAULT HOLD CLASS */ +
       DFLTCLAS(X)                           /* DEFAULT PRINT CLASS */ +
       DFLTDEST(LOCAL)                 /* DEFAULT PRINT DESTINATION */ +
       DFLTPORT(81)       /* INDICATE =< LRECL FOR PORTRAIT DEFAULT */ +
       BATCHCC(0)       /* INITIALIZE THE BATCH RETURN CODE TO ZERO */ +
       JCLREVEW(N)       /* INITIALIZE THE JCL REVIEW VALUE TO "NO" */ +
       TIMEA('0,15')          /* CPU TIME SETTING FOR JOB CLASS "A" */ +
       TIMEB('5,00')          /* CPU TIME SETTING FOR JOB CLASS "B" */ +
       TIMEC('5,00')          /* CPU TIME SETTING FOR JOB CLASS "C" */ +
       TIMED('5,00')          /* CPU TIME SETTING FOR JOB CLASS "D" */ +
       TIMEV('0,05')          /* CPU TIME SETTING FOR JOB CLASS "V" */ +
       TIME1('1,00')          /* CPU TIME SETTING FOR JOB CLASS "1" */ +
       TIME4('0,15')          /* CPU TIME SETTING FOR JOB CLASS "4" */ +
       TIME5('5,00')          /* CPU TIME SETTING FOR JOB CLASS "5" */ +
       ADMIN('MATT BRINKMAN 402-458-2258') /* CURRENT PRINTIT ADMIN */ +
       ADMINID('P@UMJB')                  /* ADMINISTRATOR'S TSO ID */ +
       BATCH                  /* INDICATE NON-INTERACTIVE EXECUTION */ +
       HELP                   /* DISPLAY HELP INSTEAD OF PROCESSING */ +
       DEBUG            /* SHOW DEBUGGING MESSAGAS DURING EXECUTION */
CONTROL NOMSG NOLIST NOFLUSH NOPROMPT
/**********************************************************************
/* CONTROL CLIST/EDIT MODE PROCESSING                                 *
/**********************************************************************
ERROR DO
          SET MODE = CLIST
          RETURN
      END
ISREDIT MACRO (OPT1 OPT2)
ERROR OFF

/**********************************************************************
/* LOG THE USE                                                        *
/**********************************************************************

/**********************************************************************
/* CONTROL DEBUG PROCESSING                                           *
/**********************************************************************
ISPEXEC CONTROL ERRORS RETURN
IF &DEBUG = DEBUG OR &OPT1 = DEBUG OR &OPT2 = DEBUG THEN +
     CONTROL MSG LIST CONLIST SYMLIST NOFLUSH
ELSE CONTROL NOMSG NOLIST NOFLUSH NOPROMPT
IF &HELP = HELP OR &OPT1 = HELP OR &OPT2 = HELP THEN GOTO HELPSEC

/**********************************************************************
/* ESTABLISH SOME VARIABLES                                           *
/**********************************************************************
ISPEXEC SELECT PGM(USERINFO) PARM(&SYSUID)
/* CALL 'SYS2.USC1.LINKLIB(USERINFO)' '&SYSUID '
ISPEXEC VGET (PACODE PSLOC CCNTR BINNM)
SET PACODE = &STR(&CCNTR)
SET PSLOC  = &STR(&BINNM)
ISPEXEC VPUT (PACODE PSLOC)
SET LP = &STR((
SET RP = &STR())

/***********************************************************************
/*                       OPEN PRINTIT TABLE                            *
/***********************************************************************
ISPEXEC TBOPEN PRINTIT NOWRITE
SET OPENCC = &LASTCC

SELECT (&OPENCC)
    WHEN (8) DO
        ISPEXEC TBCREATE PRINTIT KEYS(PTCONNAM) +
                   NAMES(PTBURST PTCHARS PTCKPTLN PTCKPTPA PTCKPTSE +
                         PTCLASS PTCOMPCT PTCONTRL PTCOPIES PTDATACK +
                         PTDEFALT PTDEST PTDPAGLB PTFCB PTFLASH +
                         PTFORMS PTFRMDEF PTGRPID PTINDEX PTJESDS +
                         PTLINDEX PTLINECT PTMODIFY PTPAGEDF PTPIMSG +
                         PTPRMODE PTPRTY PTSYSARA PTTHRHLD PTTRC PTUCS +
                         PTWRITER PTDESC PTSEL PTSKEL01 PTTAIL01 +
                         PTOPT01 PTSKEL02 PTTAIL02 PTOPT02 PTSKEL03 +
                         PTTAIL03 PTOPT03 PTSKEL04 PTTAIL04 PTOPT04 +
                         PTSKEL05 PTTAIL05 PTOPT05 PTSKEL06 PTTAIL06 +
                         PTOPT06 PTSKEL07 PTTAIL07 PTOPT07 PTSKEL08 +
                         PTTAIL08 PTOPT08 PTSKEL09 PTTAIL09 PTOPT09 +
                         PTSKEL10 PTTAIL10 PTOPT10 PTSKEL11 PTTAIL11 +
                         PTOPT11 PTSKEL12 PTTAIL12 PTOPT12 PTSKEL13 +
                         PTTAIL13 PTOPT13)
        ISPEXEC TBVCLEAR PRINTIT
        SET PTCONNAM = DEFAULT
        SET PTDEST = &STR(&DFLTDEST)
        SET PTCLASS = &STR(&DFLTCLAS)
        SET PTCOPIES = 1
        SET PTDESC = &STR(DEST=&DFLTDEST AND SYSOUT CLASS=&DFLTCLAS)
        SET PTSKEL01 = PRINTIT1
        SET PTTAIL01 = Y
        SET PTOPT01  = N
        SET PTSKEL02 = PRINTIT2
        SET PTTAIL02 = Y
        SET PTOPT02  = N
        SET PTSKEL03 = PRINTIT3
        SET PTTAIL03 = Y
        SET PTOPT03  = N
        SET PTSKEL04 = PRINTPDS
        SET PTTAIL04 = Y
        SET PTOPT04  = N
        SET PTSKEL05 = PRINTIT4
        SET PTTAIL05 = Y
        SET PTOPT05  = N
        ISPEXEC TBADD PRINTIT
        ISPEXEC TBCLOSE  PRINTIT REPLCOPY
        ISPEXEC TBVCLEAR PRINTIT
        ISPEXEC TBOPEN   PRINTIT NOWRITE
    END
    WHEN (12) DO
        ISPEXEC TBSTATS PRINTIT  STATUS2(TABSTAT)
        IF &STR(&TABSTAT) = 1 OR &STR(&TABSTAT) = 2 THEN +
            GOTO OPEN_CONTINUE
        SET ZEDLMSG = &STR(ATTEMPTING TO ACCESS THE PRINTIT ISPF TABLE)
        ISPEXEC CONTROL DISPLAY LOCK
        ISPEXEC DISPLAY MSG(UTLZ001W)
        ISPEXEC TBOPEN PRINTIT NOWRITE
        SET OPENCC = &LASTCC
        DO &I = 1 TO 30 WHILE &OPENCC ¬= 0
            ISPEXEC TBOPEN PRINTIT NOWRITE
            SET OPENCC = &LASTCC
        END
        IF &OPENCC ¬= 0 THEN +
            DO
                SET ZEDLMSG = &STR(UNABLE TO ACCESS PRINTIT ISPF +
                                   TABLE.  PLEASE TRY LATER)
                ISPEXEC SETMSG MSG(UTLZ001)
                EXIT CODE(12)
            END
    END
    WHEN (16 ¦ 20) DO
        SET ZELDMSG = &STR(SEVERE ERROR ATTEMPTING TO ACCESS PRINTIT +
                           ISPF TABLE.   NOTIFY TECH SUPPORT)
        ISPEXEC SETMSG MSG(UTLZ001)
        EXIT CODE(16)
    END
END

/***********************************************************************
/* GET THE DATASET INFORMATION IF THIS IS EXECUTED AS A MACRO          *
/***********************************************************************
OPEN_CONTINUE: +
IF &MODE ¬= CLIST THEN +
    DO
        ISREDIT (LN,CL) = CURSOR
/*      IF &OPT1 ¬= PACKED AND &OPT2 ¬= PACKED THEN +
/*          DO
/*              ISREDIT (PACK) = PACK
/*              IF &PACK = ON THEN +
/*                  DO
/*                      SET ZEDSMSG = &STR(DATA IS PACKED)
/*                      SET ZEDLMSG = &STR(SPECIFY "PRINTIT PACKED" OR +
/*                                         UNPACK THE DATA AND SAVE +
/*                                         THE DATASET FIRST)
/*                      ISPEXEC SETMSG MSG(UTLZ001)
/*                      SET BATCHCC = 12
/*                      GOTO FINISH
/*                  END
/*          END
        IF &CL = 0 THEN +
            DO
                ISREDIT (PDSN) = DATASET
                ISREDIT (MBR) = MEMBER
                IF &STR(&MBR) >    THEN SET PDSN = &STR(&PDSN(&MBR))
            END
        ELSE +
            DO
                ISREDIT (LN,CL) = CURSOR
                ISREDIT (PDSN) = LINE .ZCSR
                SET SYSDVAL = &SUBSTR(&CL:+
                    &LENGTH(&NRSTR(&PDSN)),&NRSTR(&PDSN))
                READDVAL PDSN
                SET X = &LENGTH(&STR(&PDSN))
                SET Y = &SYSINDEX(&STR(&LP&RP),&STR(&PDSN))
                DO WHILE +
                   &SUBSTR(&X:&X,&STR(&PDSN)) = &STR(.) OR +
                   &SUBSTR(&X:&X,&STR(&PDSN)) = &STR(?) OR +
                   &SUBSTR(&X:&X,&STR(&PDSN)) = &STR(") OR +
                   &SUBSTR(&X:&X,&STR(&PDSN)) = &STR(') OR +
                   &SUBSTR(&X:&X,&STR(&PDSN)) = &STR(:) OR +
                   &SUBSTR(&X:&X,&STR(&PDSN)) = &STR(;) OR +
                   &SUBSTR(&X:&X,&STR(&PDSN)) = &STR(&&) OR +
                   &SUBSTR(&X:&X,&STR(&PDSN)) = &STR(~) OR +
                   &SUBSTR(&X:&X,&STR(&PDSN)) = &STR(`) OR +
                   &SUBSTR(&X:&X,&STR(&PDSN)) = &STR(|) OR +
                   &SUBSTR(&X:&X,&STR(&PDSN)) = &STR(%) OR +
                   &SUBSTR(&X:&X,&STR(&PDSN)) = &STR(ª) OR +
                   &SUBSTR(&X:&X,&STR(&PDSN)) = &STR(*) OR +
                   &SUBSTR(&X:&X,&STR(&PDSN)) = &STR(_) OR +
                   &SUBSTR(&X:&X,&STR(&PDSN)) = &STR(-) OR +
                   &SUBSTR(&X:&X,&STR(&PDSN)) = &STR(=) OR +
                   &SUBSTR(&X:&X,&STR(&PDSN)) = &STR(+) OR +
                   &SUBSTR(&X:&X,&STR(&PDSN)) = &STR(!) OR +
                   &SUBSTR(&X:&X,&STR(&PDSN)) = &STR(?) OR +
                   &SUBSTR(&X:&X,&STR(&PDSN)) = &STR(?) OR +
                   &SUBSTR(&X:&X,&STR(&PDSN)) = &STR() OR +
                   &SUBSTR(&X:&X,&STR(&PDSN)) = &STR({) OR +
                   &SUBSTR(&X:&X,&STR(&PDSN)) = &STR(}) OR +
                   &SUBSTR(&X:&X,&STR(&PDSN)) = &STR(/) OR +
                   &SUBSTR(&X:&X,&STR(&PDSN)) = &STR(>) OR +
                   &SUBSTR(&X:&X,&STR(&PDSN)) = &STR(<) OR +
                   &SUBSTR(&X:&X,&STR(&PDSN)) = &STR(&LP) OR +
                   &SUBSTR(&X-1:&X,&STR(&PDSN)) = &STR(&RP&RP) OR +
                   &SUBSTR(&X-1:&X,&STR(&PDSN)) = &STR(&LP&RP) OR +
                   &SUBSTR(&X-1:&X,&STR(&PDSN)) = &STR('&RP) OR +
                   &SUBSTR(&X-1:&X,&STR(&PDSN)) = &STR(&RP&LP) OR +
                  (&SUBSTR(&X:&X,&STR(&PDSN)) = &STR(&RP) AND +
                  (&SYSINDEX(&STR(&LP),&STR(&PDSN)) = 0)
                    SET X = &X - 1
                END
                SET PDSN = &SUBSTR(1:&X,&STR(&PDSN))
                IF &Y > 0 THEN SET PDSN = &STR(&PDSN&LP.0&RP)
            END
    END

/***********************************************************************
/* IF A DATASET EXISTS, ATTEMPT TO GET THE LRECL AND RECFM             *
/***********************************************************************
IF &STR(&PDSN) >    AND &BATCH ¬= BATCH THEN +
    DO
        LISTDSI '&PDSN'
        IF &LASTCC = 0 THEN +
            DO
                SET PCC = &SUBSTR(&LENGTH(&STR(&SYSRECFM)),+
                          &STR(&SYSRECFM))
                IF &PCC ¬= A AND &PCC ¬= M THEN SET PCC =
                ISPEXEC VGET (PTITPORT PTITLAND) PROFILE
                IF &SYSLRECL <= &DFLTPORT THEN SET PTCONNAM = &PTITPORT
                ELSE SET PTCONNAM = &PTITLAND
                ISPEXEC TBGET PRINTIT
                IF &LASTCC = 0 THEN +
                    DO
                        SET PTSEL = S
                        ISPEXEC TBMOD PRINTIT
                    END
            END
    END

/***********************************************************************
/* GO RIGHT TO PRINT IF BATCH PROCESSING                               *
/***********************************************************************
IF &BATCH = BATCH THEN GOTO PRINT_SECTION

/***********************************************************************
/*                      REDISPLAY LIST SCREEN                          *
/***********************************************************************

ISPEXEC VGET PPGMNAME
CONTROL END(ENDO)
IF &STR(&PPGMNAME) =     THEN +
    DO
        SET SYSOUTTRAP = 1000
        ACF
        LIST *
        END
        SET SYSOUTTRAP = 0
        SET SYSDVAL = &STR(&SYSNSUB(1,&SYSOUTLINE1))
        READDVAL X Y N A M E S
        SET PPGMNAME = &STR(&N &A &M &E &S)
    ENDO
CONTROL END(END)
IF &STR(&PDSN) >    THEN +
    SET ZEDLMSG = &STR(TYPE "S" NEXT TO DESIRED PRINT CONFIGURATION+
                      (S) AND PRESS  TO PRINT.)
ELSE +
    SET ZEDLMSG = &STR(ENTER DSN && "S" NEXT TO DESIRED PRINT +
                      CONFIGURATION(S) && PRESS  TO PRINT.)
ISPEXEC SETMSG MSG(UTLZ000)
REDISPLAY: +
SET ZTDMARK = &STR(*** END OF CURRENT PRINT CONFIGURATIONS ***)
ISPEXEC TBDISPL PRINTIT PANEL(PRINTIT)
SET PANELCC = &LASTCC
/*  IF &STR(&PDSN) >    THEN +
/*      SET ZEDLMSG = &STR(TYPE "S" NEXT TO DESIRED PRINT CONFIGURATION+
/*                        (S) AND PRESS  TO PRINT.)
/*  ELSE +
/*      SET ZEDLMSG = &STR(ENTER DSN && "S" NEXT TO DESIRED PRINT +
/*                        CONFIGURATION(S) && PRESS  TO PRINT.)

/**********************************************************************
/* HANDLE MEMBER GROUP HELP FIRST                                     *
/**********************************************************************
IF &STR(&PMBR) = &STR(?) THEN +
    DO
        SET PMBR =
        ISPEXEC SELECT PGM(ISPTUTOR) PARM(UTILH107)
        GOTO REDISPLAY
    END

/**********************************************************************
/* PROCESS LINE COMMANDS NEXT                                         *
/**********************************************************************
IF &ZTDSELS ¬= &STR(0000) THEN +
    DO
        ISPEXEC CONTROL DISPLAY SAVE
        DO WHILE &ZTDSELS ¬= &STR(0000)
            SELECT (&PTSEL)
                /************ ADD A NEW ROW *************/
                WHEN (A) DO
                    IF &STR(&SYSUID) ¬= &STR(&ADMINID) THEN +
                        DO
                            SET ZEDLMSG = &STR(TO ADD A TABLE ROW +
                                               PLEASE CONTACT +
                                               &ADMIN)
                            ISPEXEC SETMSG MSG(UTLZ001W)
                            GOTO NEXT_LINE
                        END
                    ISPEXEC TBVCLEAR PRINTIT
                    SET PTCANCEL = NO
                    SET PTSKEL01 = PRINTIT1
                    SET PTTAIL01 = Y
                    SET PTOPT01  = N
                    SET PTSKEL02 = PRINTIT2
                    SET PTTAIL02 = Y
                    SET PTOPT02  = N
                    SET PTSKEL03 = PRINTIT3
                    SET PTTAIL03 = Y
                    SET PTOPT03  = N
                    SET PTSKEL04 = PRINTIT4
                    SET PTTAIL04 = Y
                    SET PTOPT04  = N
                    SET RETURN =  &STR(ADD_CONTINUE)
                    GOTO CONFIG_LOOP
                    SET PTSEL =
ADD_CONTINUE:       IF &PTCANCEL = NO THEN +
                        DO
                            ISPEXEC TBEND PRINTIT
                            IF &ZTDSELS > 0001 THEN +
                                DO
                                    SET ZEDLMSG = &STR(AN +
                                                       "UPDATE-TYPE" +
                                                       LINE COMMAND +
                                                       PRECLUDED THE +
                                                       PROCESSING OF +
                                                       YOUR SUBSEQUENT +
                                                       LINE COMMANDS)
                                    ISPEXEC SETMSG MSG(UTLZ001)
                                END
                            SET ZTDSELS = &STR(0000)
                            ISPEXEC LIBDEF ISPTABL +
                                    DATASET ID('&PRNTPFX..ISPTLIB')
                            ISPEXEC TBOPEN PRINTIT WRITE
                            SET OPENCC = &LASTCC
                            DO &I = 1 TO 30 WHILE &OPENCC ¬= 0
                                ISPEXEC TBOPEN PRINTIT WRITE
                                SET OPENCC = &LASTCC
                            END
                            IF &OPENCC = 0 THEN +
                                DO
                                    ISPEXEC TBADD PRINTIT ORDER
                                    ISPEXEC TBSORT PRINTIT +
                                            FIELDS(PTCONNAM,C,A)
                                    ISPEXEC TBCLOSE PRINTIT
                                    ISPEXEC TBOPEN PRINTIT NOWRITE
/***** NOTIFY OF NEW ROWS *****/
SEND '&STR(*** &SYSUID ADDED A ROW TO PRINTIT ***)' U(P@UMJB) LOGON
                                END
                            ELSE +
                                DO
                                    SET ZEDLMSG = &STR(UNABLE TO OPEN +
                                                       THE PRINTIT +
                                                       ISPF TABLE FOR +
                                                       UPDATE.  PLEASE +
                                                       TRY LATER.)
                                    ISPEXEC SETMSG MSG(UTLZ001W)
                                END
                        END
                    ELSE +
                        DO
                            SET ZEDLMSG = &STR("CANCEL" ISSUED, NO +
                                               NEW PRINT CONFIGURATION +
                                               WAS ADDED.)
                            ISPEXEC SETMSG MSG(UTLZ000W)
                        END
                END
                /******** CHANGE A ROW *********/
                WHEN (C) DO
                    IF &STR(&SYSUID) ¬= &STR(&ADMINID) THEN +
                        DO
                            SET ZEDLMSG = &STR(TO CHANGE A TABLE ROW +
                                               PLEASE CONTACT +
                                               &ADMIN)
                            ISPEXEC SETMSG MSG(UTLZ001W)
                            GOTO NEXT_LINE
                        END
                    SET PTCANCEL = NO
                    SET RETURN =  &STR(CHANGE_CONTINUE)
                    GOTO CONFIG_LOOP
CHANGE_CONTINUE:    SET PTSEL =
                    IF &PTCANCEL = NO THEN +
                        DO
                            ISPEXEC TBEND PRINTIT
                            IF &ZTDSELS > 0001 THEN +
                                DO
                                    SET ZEDLMSG = &STR(AN +
                                                       "UPDATE-TYPE" +
                                                       LINE COMMAND +
                                                       PRECLUDED THE +
                                                       PROCESSING OF +
                                                       YOUR SUBSEQUENT +
                                                       LINE COMMANDS)
                                    ISPEXEC SETMSG MSG(UTLZ001)
                                END
                            SET ZTDSELS = &STR(0000)
                            ISPEXEC LIBDEF ISPTABL +
                                    DATASET ID('&PRNTPFX..ISPTLIB')
                            ISPEXEC TBOPEN PRINTIT WRITE
                            SET OPENCC = &LASTCC
                            DO &I = 1 TO 30 WHILE &OPENCC ¬= 0
                                ISPEXEC TBOPEN PRINTIT WRITE
                                SET OPENCC = &LASTCC
                            END
                            IF &OPENCC = 0 THEN +
                                DO
                                    ISPEXEC TBMOD PRINTIT
/***** NOTIFY OF NEW ROWS *****/
SEND '&STR(*** &SYSUID MODDED PRINTIT ROW 2 ***)' U(P@UMJB) LOGON
                                    ISPEXEC TBSORT PRINTIT +
                                            FIELDS(PTCONNAM,C,A)
                                    ISPEXEC TBCLOSE PRINTIT
                                    ISPEXEC TBOPEN PRINTIT NOWRITE
                                END
                            ELSE +
                                DO
                                    SET ZEDLMSG = &STR(UNABLE TO OPEN +
                                                       THE PRINTIT +
                                                       ISPF TABLE FOR +
                                                       UPDATE.  PLEASE +
                                                       TRY LATER.)
                                    ISPEXEC SETMSG MSG(UTLZ001W)
                                END
                        END
                    ELSE +
                        DO
                            SET ZEDLMSG = &STR("CANCEL" ISSUED, NO +
                                               PRINT CONFIGURATION +
                                               WAS CHANGED.)
                            ISPEXEC SETMSG MSG(UTLZ000W)
                        END
                END
                /******** DELETE A ROW *********/
                WHEN (D) DO
                    IF &STR(&SYSUID) ¬= &STR(&ADMINID) THEN +
                        DO
                            SET ZEDLMSG = &STR(TO DELETE A TABLE ROW +
                                               PLEASE CONTACT +
                                               &ADMIN)
                            ISPEXEC SETMSG MSG(UTLZ001W)
                            GOTO NEXT_LINE
                        END
                    ISPEXEC SELECT CMD(%YOUSURE COLUMN(26) ROW(1))
                    IF &LASTCC > 0 THEN GOTO NEXT_LINE
                    SET PTSEL =
                    ISPEXEC TBEND PRINTIT
                    IF &ZTDSELS > 0001 THEN +
                        DO
                            SET ZEDLMSG = &STR(AN "UPDATE-TYPE" LINE +
                                               COMMAND PRECLUDED THE +
                                               PROCESSING OF YOUR +
                                               SUBSEQUENT LINE +
                                               COMMANDS)
                            ISPEXEC SETMSG MSG(UTLZ001)
                        END
                    SET ZTDSELS = &STR(0000)
                    ISPEXEC LIBDEF ISPTABL +
                            DATASET ID('&PRNTPFX..ISPTLIB')
                    ISPEXEC TBOPEN PRINTIT WRITE
                    SET OPENCC = &LASTCC
                    DO &I = 1 TO 30 WHILE &OPENCC ¬= 0
                        ISPEXEC TBOPEN PRINTIT WRITE
                        SET OPENCC = &LASTCC
                    END
                    IF &OPENCC = 0 THEN +
                        DO
                            ISPEXEC TBGET PRINTIT
                            ISPEXEC TBDELETE PRINTIT
                            ISPEXEC TBCLOSE PRINTIT
                            ISPEXEC TBOPEN PRINTIT NOWRITE
                        END
                    ELSE +
                        DO
                            SET ZEDLMSG = &STR(UNABLE TO OPEN THE +
                                               PRINTIT ISPF TABLE +
                                               FOR UPDATE.  PLEASE +
                                               TRY LATER.)
                            ISPEXEC SETMSG MSG(UTLZ001W)
                        END
                END
                /******** CHECK SDSF FOR JOBS IN THIS CLASS ********/
                WHEN (J) DO
                    ISPEXEC TBSKIP PRINTIT NUMBER(0) NOREAD +
                                           POSITION(CRP)
                    ISPEXEC TBVCLEAR PRINTIT
                    SET PTSEL = S
                    ISPEXEC TBTOP PRINTIT
                    ISPEXEC TBSCAN PRINTIT ARGLIST(PTSEL) CONDLIST(EQ)
                    IF &LASTCC = 0 THEN +
                        DO
                            ISPEXEC TBSKIP PRINTIT NUMBER(0) NOREAD +
                                                   POSITION(CRP2)
                            IF &CRP = &CRP2 THEN +
                                DO
                                    SET PTSEL =
                                    ISPEXEC TBMOD PRINTIT
/***** NOTIFY OF NEW ROWS *****/
SEND '&STR(*** &SYSUID MODDED PRINTIT ROW 3 ***)' U(P@UMJB) LOGON
                                END
                        END
                    ISPEXEC TBTOP PRINTIT
                    ISPEXEC TBSKIP PRINTIT NUMBER(&CRP)
                    ISPEXEC SELECT CMD(%PRINTQ &PTCLASS)
                END
                /******** CHECK THE VPS QUEUE FOR VPS PRINTERS ******/
                WHEN (Q) DO
                     ISPEXEC SELECT PGM(VM60ISPF) NEWAPPL(VMCF) +
                         NOCHECK PARM(2)
                END
                WHEN (S) DO
PRINT_SECTION:      SET GOTOSEC = &STR(PRINT)
                    GOTO VERIFY
PRINT:              ISPEXEC VGET PJOBCLAS PROFILE
                    SET TIME = &STR(&&)&STR(TIME&PJOBCLAS)
                    SET TIME = &TIME
                    IF &JCLREVEW = Y THEN +
                        DO
                            DELETE '&SYSUID..TEMP.PRINTIT.JCL'
                            FREE DDNAME(ISPFILE TEMPDD)
                            ALLOCATE DDNAME(TEMPDD) +
                                     DSN('&SYSUID..TEMP.PRINTIT.JCL') +
                                     NEW CATALOG +
                                     UNIT(SYSDA) VOLUME(WRK$$$) +
                                     SPACE(1,1) +
                                     TRACKS RELEASE DSORG(PS) +
                                     RECFM(F B) LRECL(80) BLKSIZE(23440)
                            FREE DDNAME(TEMPDD)
                            ALLOCATE DDNAME(ISPFILE) +
                                     DSN('&SYSUID..TEMP.PRINTIT.JCL') +
                                     OLD
                            ISPEXEC FTOPEN
                            ISPEXEC FTINCL PRINTIT
                            SET SAVECC = &LASTCC
                            ISPEXEC FTCLOSE
                            FREE DDNAME(ISPFILE)
                            IF &SAVECC > 0 THEN +
                                DO
                                    SET ZEDLMSG = &STR(JCL CREATION +
                                                       FAILED WITH A +
                                                       RETURN CODE OF +
                                                       "&SAVECC")
                                    ISPEXEC SETMSG MSG(UTLZ001W)
                                END
                            ELSE +
                                DO
                                    SET ZEDLMSG = &STR(YOU MUST SUBMIT +
                                                       THIS JCL +
                                                       YOURSELF)
                                    ISPEXEC SETMSG MSG(UTLZ001W)
                                    ISPEXEC EDIT +
                                   DATASET('&SYSUID..TEMP.PRINTIT.JCL')
                                END
                        END
                    ELSE +
                        DO
                            ISPEXEC FTOPEN TEMP
                            ISPEXEC FTINCL PRINTIT
                            SET SAVECC = &LASTCC
                            ISPEXEC FTCLOSE
                            IF &SAVECC > 0 THEN +
                                DO
                                    SET ZEDLMSG = &STR(JCL CREATION +
                                                       FAILED WITH A +
                                                       RETURN CODE OF +
                                                       "&SAVECC")
                                    ISPEXEC SETMSG MSG(UTLZ001W)
                                END
                            ELSE +
                                DO
                                    ISPEXEC VGET ZTEMPF
                                    SET ZEDLMSG = &STR(PRINT JOB +
                                                       SUBMITTED)
                                    ISPEXEC SETMSG MSG(UTLZ000)
                                    SUBMIT '&ZTEMPF'
                                END
                        END
                    IF &STR(&ZTDSELS) = &STR(0000) OR +
                       &STR(&ZTDSELS) =            THEN +
                        IF &BATCH = BATCH THEN GOTO FINISH
                        ELSE GOTO CONTINUE
                END
                WHEN (L) DO
                    SET PTSEL =
                    SET PTITLAND = &STR(&PTCONNAM)
                    ISPEXEC VPUT PTITLAND PROFILE
                    SET ZEDLMSG = &STR("LANDSCAPE" PROFILE SET TO +
                                       "&PTCONNAM")
                    ISPEXEC SETMSG MSG(UTLZ000W)
                END
                WHEN (P) DO
                    SET PTSEL =
                    SET PTITPORT = &STR(&PTCONNAM)
                    ISPEXEC VPUT PTITPORT PROFILE
                    SET ZEDLMSG = &STR("PORTRAIT" PROFILE SET TO +
                                       "&PTCONNAM")
                    ISPEXEC SETMSG MSG(UTLZ000W)
                END
                /****** VIEW AN EXISTING PRINT CONFIGURATION *******/
                WHEN (V) DO
                    SET SKELOPT = N
VIEW_LOOP:          ISPEXEC DISPLAY PANEL(PRINTIT2)
                    IF &LASTCC < 8 THEN +
                        DO
                            IF &STR(&SKELOPT) = Y THEN +
                                DO
                                    SET SKELOPT = N
VIEW_LOOP_2:                        ISPEXEC DISPLAY PANEL(PRINTIT1)
                                    IF &LASTCC < 8 THEN GOTO VIEW_LOOP_2
                                END
                            GOTO VIEW_LOOP
                        END
                    SET PTSEL =
                    ISPEXEC TBMOD PRINTIT
                END
                WHEN ( ) ISPEXEC TBMOD PRINTIT
                OTHERWISE DO
LINE_COMMANDS:  ISPEXEC TBEND PRNTCMDS
                ISPEXEC TBCREATE PRNTCMDS NOWRITE REPLACE KEYS() +
                                          NAMES(PTCMD PTCMDDES)
                SET PTCMD = &STR(A)
                SET PTCMDDES = +
         &STR(ADD A NEW PRINT CONFIGURATION.                         )
                ISPEXEC TBADD PRNTCMDS
                SET PTCMD = &STR(C)
                SET PTCMDDES = +
         &STR(CHANGE AN EXISTING PRINT CONFIGURATION                )
                ISPEXEC TBADD PRNTCMDS
                SET PTCMD = &STR(D)
                SET PTCMDDES = +
         &STR(DELETE AN EXISTING PRINT CONFIGURATION               )
                ISPEXEC TBADD PRNTCMDS
                SET PTCMD = &STR(J)
                SET PTCMDDES = +
         &STR(CHECK SDSF FOR JOBS USING THIS OUTPUT CLASS          )
                ISPEXEC TBADD PRNTCMDS
                SET PTCMD = &STR(L)
                SET PTCMDDES = +
         &STR(INDICATE WHICH PRINT CONFIGURATION YOU WOULD LIKE TO  )
                ISPEXEC TBADD PRNTCMDS
                SET PTCMD =
                SET PTCMDDES = +
         &STR(USE AS YOUR PERSONAL "LANDSCAPE" DEFAULT PRINT         )
                ISPEXEC TBADD PRNTCMDS
                SET PTCMDDES = +
         &STR(CONFIGURATION.  THE PRESENCE OF THIS DEFAULT WILL      )
                ISPEXEC TBADD PRNTCMDS
                SET PTCMDDES = +
         &STR(AUTOMATICALLY "PRE-SELECT" YOUR DEFAULT PRINT          )
                ISPEXEC TBADD PRNTCMDS
                SET PTCMDDES = +
         &STR(CONFIGURATION FOR DATASETS WHICH HAVE AN "LRECL" WHICH )
                ISPEXEC TBADD PRNTCMDS
                SET PTCMDDES = +
         &STR(IS > &DFLTPORT)
                ISPEXEC TBADD PRNTCMDS
                SET PTCMD = &STR(P)
                SET PTCMDDES = +
         &STR(INDICATE WHICH PRINT CONFIGURATION YOU WOULD LIKE TO  )
                ISPEXEC TBADD PRNTCMDS
                SET PTCMD =
                SET PTCMDDES = +
         &STR(USE AS YOUR PERSONAL "PORTRAIT" DEFAULT PRINT          )
                ISPEXEC TBADD PRNTCMDS
                SET PTCMDDES = +
         &STR(CONFIGURATION.  THE PRESENCE OF THIS DEFAULT WILL      )
                ISPEXEC TBADD PRNTCMDS
                SET PTCMDDES = +
         &STR(AUTOMATICALLY "PRE-SELECT" YOUR DEFAULT PRINT          )
                ISPEXEC TBADD PRNTCMDS
                SET PTCMDDES = +
         &STR(CONFIGURATION FOR DATASETS WHICH HAVE AN "LRECL" WHICH )
                ISPEXEC TBADD PRNTCMDS
                SET PTCMDDES = +
         &STR(IS < OR = &DFLTPORT)
                ISPEXEC TBADD PRNTCMDS
                SET PTCMD = &STR(Q)
                SET PTCMDDES = +
         &STR(CHECK THE VPS QUEUE FOR ALL VPS-CONTROLLED PRINTERS   )
                ISPEXEC TBADD PRNTCMDS
                SET PTCMD = &STR(S)
                SET PTCMDDES = +
         &STR("SELECT" A GIVEN PRINT CONFIGURATION&LP.S&RP AND      )
                ISPEXEC TBADD PRNTCMDS
                SET PTCMD =
                SET PTCMDDES = +
         &STR(ACTUALLY CREATE THE JCL TO PRINT IT.  A "Y" OR "N" IN  )
                ISPEXEC TBADD PRNTCMDS
                SET PTCMDDES = +
         &STR(THE "REVIEW JCL ?" FIELD WILL CONTROL WHETHER THE JOB  )
                ISPEXEC TBADD PRNTCMDS
                SET PTCMDDES = +
         &STR(IS ACTUALLY SUBMITTED AUTOMATICALLY.                   )
                ISPEXEC TBADD PRNTCMDS
                SET PTCMD = &STR(V)
                SET PTCMDDES = +
         &STR("VIEW" A GIVEN PRINT CONFIGURATION TO SEE WHAT ITS    )
                ISPEXEC TBADD PRNTCMDS
                SET PTCMD =
                SET PTCMDDES = +
         &STR(ACTUAL JES SETTINGS ARE, AND TO SEE WHAT PRINTIT JCL   )
                ISPEXEC TBADD PRNTCMDS
                SET PTCMDDES = +
         &STR(IT IS COMPOSED OF.                                     )
                ISPEXEC TBADD PRNTCMDS
                ISPEXEC TBTOP PRNTCMDS
                SET ZWINTTL = &STR(VALID LINE COMMANDS...PF3 TO +
                                   RETURN...PF7/8 TO SCROLL)
                SET ZTDMARK = &STR(*** END OF VALID LINE COMMANDS ***)
                ISPEXEC ADDPOP ROW(6) COLUMN(8)
/*PEXEC CONTROL DISPLAY SAVE /* FIXPOP */
LINE_CMDLOOP:   ISPEXEC TBDISPL PRNTCMDS PANEL(PRNTCMDS)
                IF &LASTCC = 0 THEN GOTO LINE_CMDLOOP
                ISPEXEC REMPOP
/*PEXEC CONTROL DISPLAY RESTORE /* FIXPOP */
                END
            END
NEXT_LINE:  IF &ZTDSELS > &STR(0001) THEN +
                DO
                    ISPEXEC CONTROL DISPLAY RESTORE
                    ISPEXEC TBDISPL PRINTIT
                    ISPEXEC CONTROL DISPLAY SAVE
                END
            ELSE +
                DO
                    SET ZTDSELS = &STR(0000)
                    ISPEXEC CONTROL DISPLAY RESTORE
                    IF &STR(&ZCMD) >     THEN GOTO SCROLL
                END
        END
    END

/***************************************/
/* PROCESS USERS PENDING 'END' COMMAND */
/***************************************/
IF &PANELCC = 8 THEN GOTO FINISH

/**********************************************************************
/* PROCESS PRINT COMMANDS NOT ASSOCIATED WITH ZTDSELS                 *
/**********************************************************************
CONTINUE: +
ISPEXEC TBVCLEAR PRINTIT
SET PTSEL = S
ISPEXEC TBTOP PRINTIT
ISPEXEC TBSCAN PRINTIT ARGLIST(PTSEL) CONDLIST(EQ)
IF &LASTCC = 0 THEN +
    DO
        SET PTSEL =
        ISPEXEC TBMOD PRINTIT
        GOTO PRINT_SECTION
    END

/*****************************/
/* MAINTAIN THE TOP OF TABLE */
/*****************************/
SCROLL: +
IF &STR(&ZCMD) =     THEN +
    DO
        ISPEXEC TBTOP PRINTIT
        ISPEXEC TBSKIP PRINTIT NUMBER(&ZTDTOP)
        ISPEXEC VGET (ZVERB ZSCROLLN)
        IF &ZVERB = &STR(UP) THEN +
            ISPEXEC TBSKIP PRINTIT NUMBER(-&ZSCROLLN)
        IF &ZVERB = &STR(DOWN) THEN +
            ISPEXEC TBSKIP PRINTIT NUMBER(&ZSCROLLN)
    END

GOTO REDISPLAY

/*************************************************/
/* CLOSE THE PRINTIT TABLE (SAVING THE CHANGES) */
/*************************************************/
FINISH: +
ISPEXEC TBEND PRINTIT
ISPEXEC LIBDEF ISPTABL
IF &BATCH = BATCH AND &OPENCC ¬= 0 THEN SET BATCHCC = 12
IF &MODE ¬= CLIST THEN ISREDIT CURSOR = &LN &CL
IF &BATCHCC = 0 THEN +
    DO
        SET ZEDSMSG = &STR(EXITED PRINT UTILITY)
        ISPEXEC SETMSG MSG(UTLZ000)
    END
EXIT CODE(&BATCHCC)

/**********************************************************************
/* PROCESS CHANGES AND ADDS TO THE PRINTIT PRINT CONFIGURATION TABLE. *
/**********************************************************************
CONFIG_LOOP: SET SKELOPT = N
ISPEXEC DISPLAY PANEL(PRINTIT2)
IF &LASTCC > 7 OR &STR(&PTCANCEL) = YES THEN GOTO &RETURN

IF &STR(&SKELOPT) = Y THEN +
    DO
        SET SKELOPT = N
SKEL_LOOP: ISPEXEC DISPLAY PANEL(PRINTIT1)
        IF &LASTCC > 7 THEN GOTO CONFIG_LOOP
        GOTO SKEL_LOOP
    END

SET VALCLASS = &STR(ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789*$)
SELECT_LOOP: SELECT

    WHEN (&STR(&PTCONNAM) = &STR(?)) DO
        ISPEXEC ADDPOP ROW(4) COLUMN(21)
/*PEXEC CONTROL DISPLAY SAVE /* FIXPOP */
        ISPEXEC DISPLAY PANEL(PRINTIT3)
        ISPEXEC REMPOP
/*PEXEC CONTROL DISPLAY RESTORE /* FIXPOP */
        SET PTCONNAM =
        GOTO SELECT_LOOP
    END
    WHEN (&STR(&PTBURST) > &STR()     AND +
          &STR(&PTBURST) ¬= &STR(Y)   AND +
          &STR(&PTBURST) ¬= &STR(N)   AND +
          &STR(&PTBURST) ¬= &STR(YES) AND +
          &STR(&PTBURST) ¬= &STR(NO)) DO
        IF &STR(&PTBURST) = &STR(?) THEN +
            SET ZWINTTL = &STR(BURST)
        ELSE +
            SET ZWINTTL = &STR(INVALID "BURST" VALUE)
        ISPEXEC ADDPOP ROW(6) COLUMN(5)
/*PEXEC CONTROL DISPLAY SAVE /* FIXPOP */
        ISPEXEC DISPLAY PANEL(PRINTIT4)
        ISPEXEC REMPOP
/*PEXEC CONTROL DISPLAY RESTORE /* FIXPOP */
        SET PTBURST =
        GOTO SELECT_LOOP
    END
    WHEN (&STR(&PTCHARS) = &STR(?)) DO
        IF &STR(&PTCHARS) = &STR(?) THEN +
            SET ZWINTTL = &STR(CHARS)
        ELSE +
            SET ZWINTTL = &STR(INVALID "CHARS" VALUE)
        ISPEXEC ADDPOP ROW(7) COLUMN(5)
/*PEXEC CONTROL DISPLAY SAVE /* FIXPOP */
        ISPEXEC DISPLAY PANEL(PRINTIT5)
        ISPEXEC REMPOP
/*PEXEC CONTROL DISPLAY RESTORE /* FIXPOP */
        SET PTCHARS =
        GOTO SELECT_LOOP
    END
    WHEN (&STR(&PTCKPTLN) > &STR() AND +
         (&PTCKPTLN < 0 OR +
          &PTCKPTLN > 32767)) DO
        IF &STR(&PTCKPTLN) = &STR(?) THEN +
            SET ZWINTTL = &STR(CKPTLINE)
        ELSE +
            SET ZWINTTL = &STR(INVALID "CKPTLINE" VALUE)
        ISPEXEC ADDPOP ROW(8) COLUMN(8)
/*PEXEC CONTROL DISPLAY SAVE /* FIXPOP */
        ISPEXEC DISPLAY PANEL(PRINTIT6)
        ISPEXEC REMPOP
/*PEXEC CONTROL DISPLAY RESTORE /* FIXPOP */
        SET PTCKPTLN =
        GOTO SELECT_LOOP
    END
    WHEN (&STR(&PTCKPTPA) > &STR() AND +
         (&PTCKPTPA < 1 OR +
          &PTCKPTPA > 32767)) DO
        IF &STR(&PTCKPTPA) = &STR(?) THEN +
            SET ZWINTTL = &STR(CKPTPAGE)
        ELSE +
            SET ZWINTTL = &STR(INVALID "CKPTPAGE" VALUE)
        ISPEXEC ADDPOP ROW(9) COLUMN(8)
/*PEXEC CONTROL DISPLAY SAVE /* FIXPOP */
        ISPEXEC DISPLAY PANEL(PRINTIT7)
        ISPEXEC REMPOP
/*PEXEC CONTROL DISPLAY RESTORE /* FIXPOP */
        SET PTCKPTPA =
        GOTO SELECT_LOOP
    END
    WHEN (&STR(&PTCKPTSE) > &STR() AND +
         (&PTCKPTSE < 1 OR +
          &PTCKPTSE > 32767)) DO
        IF &STR(&PTCKPTSE) = &STR(?) THEN +
            SET ZWINTTL = &STR(CKPTSEC)
        ELSE +
            SET ZWINTTL = &STR(INVALID "CKPTSEC" VALUE)
        ISPEXEC ADDPOP ROW(10) COLUMN(7)
/*PEXEC CONTROL DISPLAY SAVE /* FIXPOP */
        ISPEXEC DISPLAY PANEL(PRINTIT8)
        ISPEXEC REMPOP
/*PEXEC CONTROL DISPLAY RESTORE /* FIXPOP */
        SET PTCKPTSE =
        GOTO SELECT_LOOP
    END
    WHEN (&SYSINDEX(&STR(&PTCLASS),&STR(&VALCLASS)) = 0) DO
        IF &STR(&PTCLASS) = &STR(?) THEN +
            SET ZWINTTL = &STR(CLASS)
        ELSE +
            IF &STR(&PTCLASS) =     THEN +
                SET ZWINTTL = &STR("CLASS" REQUIRED - DEFAULT SET)
            ELSE +
                SET ZWINTTL = &STR(INVALID "CLASS" VALUE)
        ISPEXEC ADDPOP ROW(11) COLUMN(5)
/*PEXEC CONTROL DISPLAY SAVE /* FIXPOP */
        ISPEXEC DISPLAY PANEL(PRINTIT9)
        ISPEXEC REMPOP
/*PEXEC CONTROL DISPLAY RESTORE /* FIXPOP */
        SET PTCLASS = &STR(&DFLTCLAS)
        GOTO SELECT_LOOP
    END
    WHEN (&STR(&PTCOMPCT) = &STR(?)) DO
        IF &STR(&PTCOMPCT) = &STR(?) THEN +
            SET ZWINTTL = &STR(COMPACT)
        ELSE +
            SET ZWINTTL = &STR(INVALID "COMPACT" VALUE)
        ISPEXEC ADDPOP ROW(12) COLUMN(7)
/*PEXEC CONTROL DISPLAY SAVE /* FIXPOP */
        ISPEXEC DISPLAY PANEL(PRINTITA)
        ISPEXEC REMPOP
/*PEXEC CONTROL DISPLAY RESTORE /* FIXPOP */
        SET PTCOMPCT =
        GOTO SELECT_LOOP
    END
    WHEN (&STR(&PTCONTRL) > &STR() AND +
         (&STR(&PTCONTRL) ¬= &STR(PROGRAM) OR +
          &STR(&PTCONTRL) ¬= &STR(SINGLE) OR +
          &STR(&PTCONTRL) ¬= &STR(DOUBLE) OR +
          &STR(&PTCONTRL) ¬= &STR(TRIBLE))) DO
        IF &STR(&PTCONTRL) = &STR(?) THEN +
            SET ZWINTTL = &STR(CONTROL)
        ELSE +
            SET ZWINTTL = &STR(INVALID "CONTROL" VALUE)
        ISPEXEC ADDPOP ROW(2) COLUMN(7)
/*PEXEC CONTROL DISPLAY SAVE /* FIXPOP */
        ISPEXEC DISPLAY PANEL(PRINTITB)
        ISPEXEC REMPOP
/*PEXEC CONTROL DISPLAY RESTORE /* FIXPOP */
        SET PTCONTRL =
        GOTO SELECT_LOOP
    END
    WHEN (&STR(&PTCOPIES) = &STR(?) OR &STR(&PTCOPIES) = &STR( )) DO
        IF &STR(&PTCOPIES) = &STR(?) THEN +
            SET ZWINTTL = &STR(COPIES)
        ELSE +
            IF &STR(&PTCOPIES) =     THEN +
                SET ZWINTTL = &STR("COPIES" REQUIRED - DEFAULT SET)
            ELSE +
                SET ZWINTTL = &STR(INVALID "COPIES" VALUE)
        ISPEXEC ADDPOP ROW(3) COLUMN(6)
/*PEXEC CONTROL DISPLAY SAVE /* FIXPOP */
        ISPEXEC DISPLAY PANEL(PRINTITC)
        ISPEXEC REMPOP
/*PEXEC CONTROL DISPLAY RESTORE /* FIXPOP */
        SET PTCOPIES = 1
        GOTO SELECT_LOOP
    END
    WHEN (&STR(&PTDATACK) > &STR() AND +
         (&STR(&PTDATACK) ¬= &STR(BLOCK) AND +
          &STR(&PTDATACK) ¬= &STR(UNBLOCK) AND +
          &STR(&PTDATACK) ¬= &STR(BLKCHAR) AND +
          &STR(&PTDATACK) ¬= &STR(BLKPOS))) DO
        IF &STR(&PTDATACK) = &STR(?) THEN +
            SET ZWINTTL = &STR(DATACK)
        ELSE +
            SET ZWINTTL = &STR(INVALID "DATACK" VALUE)
        ISPEXEC ADDPOP ROW(5) COLUMN(6)
/*PEXEC CONTROL DISPLAY SAVE /* FIXPOP */
        ISPEXEC DISPLAY PANEL(PRINTITD)
        ISPEXEC REMPOP
/*PEXEC CONTROL DISPLAY RESTORE /* FIXPOP */
        SET PTDATACK =
        GOTO SELECT_LOOP
    END
    WHEN (&STR(&PTDEFALT) > &STR() AND +
         (&STR(&PTDEFALT) ¬= &STR(Y) AND +
          &STR(&PTDEFALT) ¬= &STR(YES) AND +
          &STR(&PTDEFALT) ¬= &STR(NO) AND +
          &STR(&PTDEFALT) ¬= &STR(N))) DO
        IF &STR(&PTDEFALT) = &STR(?) THEN +
            SET ZWINTTL = &STR(DEFAULT)
        ELSE +
            SET ZWINTTL = &STR(INVALID "DEFAULT" VALUE)
        ISPEXEC ADDPOP ROW(7) COLUMN(7)
/*PEXEC CONTROL DISPLAY SAVE /* FIXPOP */
        ISPEXEC DISPLAY PANEL(PRINTITE)
        ISPEXEC REMPOP
/*PEXEC CONTROL DISPLAY RESTORE /* FIXPOP */
        SET PTDEFALT =
        GOTO SELECT_LOOP
    END
    WHEN (&STR(&PTDEST) = &STR(?) OR &STR(&PTDEST) = &STR()) DO
        IF &STR(&PTDEST) = &STR(?) THEN +
            SET ZWINTTL = &STR(DEST)
        ELSE +
            IF &STR(&PTDEST) =     THEN +
                SET ZWINTTL = &STR("DEST" REQUIRED - DEFAULT SET)
            ELSE +
                SET ZWINTTL = &STR(INVALID "DEST" VALUE)
        ISPEXEC ADDPOP        COLUMN(4)
/*PEXEC CONTROL DISPLAY SAVE /* FIXPOP */
        ISPEXEC DISPLAY PANEL(PRINTITF)
        ISPEXEC REMPOP
/*PEXEC CONTROL DISPLAY RESTORE /* FIXPOP */
        SET PTDEST = &STR(&DFLTDEST)
        GOTO SELECT_LOOP
    END
    WHEN (&STR(&PTDPAGLB) > &STR() AND +
         (&STR(&PTDPAGLB) ¬= &STR(Y) AND +
          &STR(&PTDPAGLB) ¬= &STR(YES) AND +
          &STR(&PTDPAGLB) ¬= &STR(NO) AND +
          &STR(&PTDPAGLB) ¬= &STR(N))) DO
        IF &STR(&PTPAGLB) = &STR(?) THEN +
            SET ZWINTTL = &STR(DPAGELBL)
        ELSE +
            SET ZWINTTL = &STR(INVALID "DPAGELBL" VALUE)
        ISPEXEC ADDPOP ROW(9) COLUMN(8)
/*PEXEC CONTROL DISPLAY SAVE /* FIXPOP */
        ISPEXEC DISPLAY PANEL(PRINTITG)
        ISPEXEC REMPOP
/*PEXEC CONTROL DISPLAY RESTORE /* FIXPOP */
        SET PTDPAGLB =
        GOTO SELECT_LOOP
    END
    WHEN (&STR(&PTFCB) = &STR(?)) DO
        IF &STR(&PTFCB) = &STR(?) THEN +
            SET ZWINTTL = &STR(FCB)
        ELSE +
            SET ZWINTTL = &STR(INVALID "FCB" VALUE)
        ISPEXEC ADDPOP ROW(11) COLUMN(3)
/*PEXEC CONTROL DISPLAY SAVE /* FIXPOP */
        ISPEXEC DISPLAY PANEL(PRINTITH)
        ISPEXEC REMPOP
/*PEXEC CONTROL DISPLAY RESTORE /* FIXPOP */
        SET PTFCB =
        GOTO SELECT_LOOP
    END
    WHEN (&STR(&PTFLASH) = &STR(?)) DO
        IF &STR(&PTFLASH) = &STR(?) THEN +
            SET ZWINTTL = &STR(FLASH)
        ELSE +
            SET ZWINTTL = &STR(INVALID "FLASH" VALUE)
        ISPEXEC ADDPOP ROW(8) COLUMN(5)
/*PEXEC CONTROL DISPLAY SAVE /* FIXPOP */
        ISPEXEC DISPLAY PANEL(PRINTITI)
        ISPEXEC REMPOP
/*PEXEC CONTROL DISPLAY RESTORE /* FIXPOP */
        SET PTFLASH =
        GOTO SELECT_LOOP
    END
    WHEN (&STR(&PTFRMDEF) = &STR(?)) DO
        IF &STR(&PTFRMDEF) = &STR(?) THEN +
            SET ZWINTTL = &STR(FORMDEF)
        ELSE +
            SET ZWINTTL = &STR(INVALID "FORMDEF" VALUE)
        ISPEXEC ADDPOP ROW(14) COLUMN(7)
/*PEXEC CONTROL DISPLAY SAVE /* FIXPOP */
        ISPEXEC DISPLAY PANEL(PRINTITJ)
        ISPEXEC REMPOP
/*PEXEC CONTROL DISPLAY RESTORE /* FIXPOP */
        SET PTFRMDEF =
        GOTO SELECT_LOOP
    END
    WHEN (&STR(&PTFORMS) = &STR(?)) DO
        IF &STR(&PTFORMS) = &STR(?) THEN +
            SET ZWINTTL = &STR(FORMS)
        ELSE +
            SET ZWINTTL = &STR(INVALID "FORMS" VALUE)
        ISPEXEC ADDPOP ROW(6) COLUMN(37)
/*PEXEC CONTROL DISPLAY SAVE /* FIXPOP */
        ISPEXEC DISPLAY PANEL(PRINTITK)
        ISPEXEC REMPOP
/*PEXEC CONTROL DISPLAY RESTORE /* FIXPOP */
        SET PTFORMS =
        GOTO SELECT_LOOP
    END
    WHEN (&STR(&PTGRPID) = &STR(?)) DO
        IF &STR(&PTGRPID) = &STR(?) THEN +
            SET ZWINTTL = &STR(GROUPID)
        ELSE +
            SET ZWINTTL = &STR(INVALID "GROUPID" VALUE)
        ISPEXEC ADDPOP ROW(7) COLUMN(37)
/*PEXEC CONTROL DISPLAY SAVE /* FIXPOP */
        ISPEXEC DISPLAY PANEL(PRINTITL)
        ISPEXEC REMPOP
/*PEXEC CONTROL DISPLAY RESTORE /* FIXPOP */
        SET PTGRPID =
        GOTO SELECT_LOOP
    END
    WHEN (&STR(&PTINDEX) > &STR() AND +
         (&PTINDEX < 1 OR +
          &PTINDEX > 31)) DO
        IF &STR(&PTINDEX) = &STR(?) THEN +
            SET ZWINTTL = &STR(INDEX)
        ELSE +
            SET ZWINTTL = &STR(INVALID "INDEX" VALUE)
        ISPEXEC ADDPOP ROW(8) COLUMN(37)
/*PEXEC CONTROL DISPLAY SAVE /* FIXPOP */
        ISPEXEC DISPLAY PANEL(PRINTITM)
        ISPEXEC REMPOP
/*PEXEC CONTROL DISPLAY RESTORE /* FIXPOP */
        SET PTINDEX =
        GOTO SELECT_LOOP
    END
    WHEN (&STR(&PTJESDS) > &STR() AND +
         (&STR(&PTJESDS) ¬= &STR(Y) AND +
          &STR(&PTJESDS) ¬= &STR(YES) AND +
          &STR(&PTJESDS) ¬= &STR(NO) AND +
          &STR(&PTJESDS) ¬= &STR(N))) DO
        IF &STR(&PTJESDS) = &STR(?) THEN +
            SET ZWINTTL = &STR(JESDS)
        ELSE +
            SET ZWINTTL = &STR(INVALID "JESDS" VALUE)
        ISPEXEC ADDPOP ROW(9) COLUMN(37)
/*PEXEC CONTROL DISPLAY SAVE /* FIXPOP */
        ISPEXEC DISPLAY PANEL(PRINTITN)
        ISPEXEC REMPOP
/*PEXEC CONTROL DISPLAY RESTORE /* FIXPOP */
        SET PTJESDS =
        GOTO SELECT_LOOP
    END
    WHEN (&STR(&PTLINDEX) > &STR() AND +
         (&PTLINDEX < 1 OR +
          &PTLINDEX > 31)) DO
        IF &STR(&PTLINDEX) = &STR(?) THEN +
            SET ZWINTTL = &STR(LINDEX)
        ELSE +
            SET ZWINTTL = &STR(INVALID "LINDEX" VALUE)
        ISPEXEC ADDPOP ROW(10) COLUMN(37)
/*PEXEC CONTROL DISPLAY SAVE /* FIXPOP */
        ISPEXEC DISPLAY PANEL(PRINTITO)
        ISPEXEC REMPOP
/*PEXEC CONTROL DISPLAY RESTORE /* FIXPOP */
        SET PTLINDEX =
        GOTO SELECT_LOOP
    END
    WHEN (&STR(&PTLINECT) > &STR() AND +
         (&PTLINECT < 0 OR +
          &PTLINECT > 255)) DO
        IF &STR(&PTLINECT) = &STR(?) THEN +
            SET ZWINTTL = &STR(LINECT)
        ELSE +
            SET ZWINTTL = &STR(INVALID "LINECT" VALUE)
        ISPEXEC ADDPOP ROW(11) COLUMN(37)
/*PEXEC CONTROL DISPLAY SAVE /* FIXPOP */
        ISPEXEC DISPLAY PANEL(PRINTITP)
        ISPEXEC REMPOP
/*PEXEC CONTROL DISPLAY RESTORE /* FIXPOP */
        SET PTLINECT =
        GOTO SELECT_LOOP
    END
    WHEN (&STR(&PTMODIFY) = &STR(?)) DO
        IF &STR(&PTMODIFY) = &STR(?) THEN +
            SET ZWINTTL = &STR(MODIFY)
        ELSE +
            SET ZWINTTL = &STR(INVALID "MODIFY" VALUE)
        ISPEXEC ADDPOP ROW(12) COLUMN(15)
/*PEXEC CONTROL DISPLAY SAVE /* FIXPOP */
        ISPEXEC DISPLAY PANEL(PRINTITQ)
        ISPEXEC REMPOP
/*PEXEC CONTROL DISPLAY RESTORE /* FIXPOP */
        SET PTMODIFY =
        GOTO SELECT_LOOP
    END
    WHEN (&STR(&PTPAGEDF) = &STR(?)) DO
        IF &STR(&PTPAGEDF) = &STR(?) THEN +
            SET ZWINTTL = &STR(PAGEDEF)
        ELSE +
            SET ZWINTTL = &STR(INVALID "PAGEDEF" VALUE)
        ISPEXEC ADDPOP ROW(13) COLUMN(37)
/*PEXEC CONTROL DISPLAY SAVE /* FIXPOP */
        ISPEXEC DISPLAY PANEL(PRINTITR)
        ISPEXEC REMPOP
/*PEXEC CONTROL DISPLAY RESTORE /* FIXPOP */
        SET PTPAGEDF =
        GOTO SELECT_LOOP
    END
    WHEN (&STR(&PTPIMSG) = &STR(?)) DO
        IF &STR(&PTPIMSG) = &STR(?) THEN +
            SET ZWINTTL = &STR(PIMSG)
        ELSE +
            SET ZWINTTL = &STR(INVALID "PIMSG" VALUE)
        ISPEXEC ADDPOP ROW(-1)  COLUMN(37)
/*PEXEC CONTROL DISPLAY SAVE /* FIXPOP */
        ISPEXEC DISPLAY PANEL(PRINTITS)
        ISPEXEC REMPOP
/*PEXEC CONTROL DISPLAY RESTORE /* FIXPOP */
        SET PTPIMSG =
        GOTO SELECT_LOOP
    END
    WHEN (&STR(&PTPRMODE) = &STR(?)) DO
        IF &STR(&PTPRMODE) = &STR(?) THEN +
            SET ZWINTTL = &STR(PRMODE)
        ELSE +
            SET ZWINTTL = &STR(INVALID "PRMODE" VALUE)
        ISPEXEC ADDPOP ROW(2) COLUMN(37)
/*PEXEC CONTROL DISPLAY SAVE /* FIXPOP */
        ISPEXEC DISPLAY PANEL(PRINTITT)
        ISPEXEC REMPOP
/*PEXEC CONTROL DISPLAY RESTORE /* FIXPOP */
        SET PTPRMODE =
        GOTO SELECT_LOOP
    END
    WHEN (&STR(&PTPRTY) > &STR() AND +
         (&PTPRTY < 0 OR +
          &PTPRTY > 255)) DO
        IF &STR(&PTPRTY) = &STR(?) THEN +
            SET ZWINTTL = &STR(PRTY)
        ELSE +
            SET ZWINTTL = &STR(INVALID "PRTY" VALUE)
        ISPEXEC ADDPOP ROW(7) COLUMN(37)
/*PEXEC CONTROL DISPLAY SAVE /* FIXPOP */
        ISPEXEC DISPLAY PANEL(PRINTITU)
        ISPEXEC REMPOP
/*PEXEC CONTROL DISPLAY RESTORE /* FIXPOP */
        SET PTPRTY =
        GOTO SELECT_LOOP
    END
    WHEN (&STR(&PTSYSARA) = &STR(?)) DO
        IF &STR(&PTSYSARA) = &STR(?) THEN +
            SET ZWINTTL = &STR(SYSAREA)
        ELSE +
            SET ZWINTTL = &STR(INVALID "SYSAREA" VALUE)
        ISPEXEC ADDPOP ROW(6) COLUMN(37)
/*PEXEC CONTROL DISPLAY SAVE /* FIXPOP */
        ISPEXEC DISPLAY PANEL(PRINTITV)
        ISPEXEC REMPOP
/*PEXEC CONTROL DISPLAY RESTORE /* FIXPOP */
        SET PTSYSARA =
        GOTO SELECT_LOOP
    END
    WHEN (&STR(&PTTHRHLD) > &STR() AND +
         (&PTTHRHLD < 0 OR +
          &PTTHRHLD > 99999999)) DO
        IF &STR(&PTTHRHLD) = &STR(?) THEN +
            SET ZWINTTL = &STR(THRESHLD)
        ELSE +
            SET ZWINTTL = &STR(INVALID "THRESHLD" VALUE)
        ISPEXEC ADDPOP ROW(9) COLUMN(37)
/*PEXEC CONTROL DISPLAY SAVE /* FIXPOP */
        ISPEXEC DISPLAY PANEL(PRINTITW)
        ISPEXEC REMPOP
/*PEXEC CONTROL DISPLAY RESTORE /* FIXPOP */
        SET PTTHRHLD =
        GOTO SELECT_LOOP
    END
    WHEN (&STR(&PTTRC) = &STR(?)) DO
        IF &STR(&PTTRC) = &STR(?) THEN +
            SET ZWINTTL = &STR(TRC)
        ELSE +
            SET ZWINTTL = &STR(INVALID "TRC" VALUE)
        ISPEXEC ADDPOP ROW(7) COLUMN(37)
/*PEXEC CONTROL DISPLAY SAVE /* FIXPOP */
        ISPEXEC DISPLAY PANEL(PRINTITX)
        ISPEXEC REMPOP
/*PEXEC CONTROL DISPLAY RESTORE /* FIXPOP */
        SET PTTRC =
        GOTO SELECT_LOOP
    END
    WHEN (&STR(&PTUCS) = &STR(?)) DO
        IF &STR(&PTUCS) = &STR(?) THEN +
            SET ZWINTTL = &STR(UCS)
        ELSE +
            SET ZWINTTL = &STR(INVALID "UCS" VALUE)
        ISPEXEC ADDPOP ROW(10) COLUMN(37)
/*PEXEC CONTROL DISPLAY SAVE /* FIXPOP */
        ISPEXEC DISPLAY PANEL(PRINTITY)
        ISPEXEC REMPOP
/*PEXEC CONTROL DISPLAY RESTORE /* FIXPOP */
        SET PTUCS =
        GOTO SELECT_LOOP
    END
    WHEN (&STR(&PTWRITER) = &STR(?)) DO
        IF &STR(&PTWRITER) = &STR(?) THEN +
            SET ZWINTTL = &STR(WRITER)
        ELSE +
            SET ZWINTTL = &STR(INVALID "WRITER" VALUE)
        ISPEXEC ADDPOP ROW(13) COLUMN(37)
/*PEXEC CONTROL DISPLAY SAVE /* FIXPOP */
        ISPEXEC DISPLAY PANEL(PRINTITZ)
        ISPEXEC REMPOP
/*PEXEC CONTROL DISPLAY RESTORE /* FIXPOP */
        SET PTWRITER =
        GOTO SELECT_LOOP
    END
END
GOTO CONFIG_LOOP

/**********************************************************************
/* PERFORM THE DATASET VERIFICATION. 1ST, CHECK FOR RELATIVE GDG GENS.*
/**********************************************************************
VERIFY: +
SET GEN =
SET A = &SYSINDEX(&STR(&LP),&STR(&PDSN))
SET B = &SYSINDEX(&STR(&RP),&STR(&PDSN))
IF &A > 0 AND &B > 0 THEN SET GEN = &SUBSTR(&A+1:&B-1,&STR(&PDSN))
IF (&STR(&GEN) >   AND +
   (&SYSINDEX(&STR(+),&STR(&GEN)) = 1 OR +
    &SYSINDEX(&STR(-),&STR(&GEN)) = 1 OR +
    &SYSINDEX(&STR(0),&STR(&GEN)) = 1 OR +
    &SYSINDEX(&STR(1),&STR(&GEN)) = 1 OR +
    &SYSINDEX(&STR(2),&STR(&GEN)) = 1 OR +
    &SYSINDEX(&STR(3),&STR(&GEN)) = 1 OR +
    &SYSINDEX(&STR(4),&STR(&GEN)) = 1 OR +
    &SYSINDEX(&STR(5),&STR(&GEN)) = 1 OR +
    &SYSINDEX(&STR(6),&STR(&GEN)) = 1 OR +
    &SYSINDEX(&STR(7),&STR(&GEN)) = 1 OR +
    &SYSINDEX(&STR(8),&STR(&GEN)) = 1 OR +
    &SYSINDEX(&STR(9),&STR(&GEN)) = 1)) THEN +
    DO
        SET ZEDLMSG = &STR(*** RESOLVING RELATIVE GDG GENERATION ***)
        ISPEXEC CONTROL DISPLAY LOCK
        ISPEXEC DISPLAY MSG(UTLZ000W)
        SET GDGDSN = &SUBSTR(1:&A-1,&STR(&PDSN))
        IF &LENGTH(&STR(&GEN)) > 1 THEN +
            IF &SUBSTR(1:1,&STR(&GEN)) = &STR(+) AND +
               &SUBSTR(2:2,&STR(&GEN)) > 0 THEN +
                IF &BATCH = BATCH THEN +
                    DO
                        SET BATCHCC = 16
                        GOTO FINISH
                    END
                ELSE +
                    DO
                        SET ZEDLMSG = &STR("+1" AND HIGHER RELATIVE +
                                           GDG GENERATIONS CANNOT BE +
                                           USED)
                        ISPEXEC SETMSG MSG(UTLZ001W)
                        SET PTDSN         =
                        SET PTRECFM       =
                        SET PTLRECL       =
                        SET PTBLKSIZ      =
                        GOTO REDISPLAY
                    END
            ELSE +
                IF &SUBSTR(1:1,&STR(&GEN)) = &STR(+) OR +
                   &SUBSTR(1:1,&STR(&GEN)) = &STR(-) THEN +
                    SET GEN = &STR(MINUS&SUBSTR(2:&LENGTH(&STR(&GEN)),+
                              &STR(&GEN)))
                ELSE SET GEN = MINUS&GEN
            SET &&GEN =
            %GDGGEN DSN(&GDGDSN)
            IF &LASTCC = 0 THEN +
                ISPEXEC VGET &GEN SHARED
            SET GEN = &STR(&&)&STR(&GEN)
            IF &STR(&GEN) >    THEN +
                SET PDSN = &STR(&GEN)
            ELSE +
                IF &BATCH = BATCH THEN +
                    DO
                        SET BATCHCC = 20
                        GOTO FINISH
                    END
                ELSE +
                    DO
                        SET ZEDLMSG = &STR(COULD NOT RESOLVE THE +
                                           RELATIVE GDG GENERATION)
                        ISPEXEC SETMSG MSG(UTLZ001W)
                        GOTO REDISPLAY
                    END
    END

/**********************************************************************
/* GET THE NECESSARY DCB INFORMATION                                  *
/**********************************************************************
IF &SYSINDEX(&STR(*),&STR(&PMBR)) = 0 AND +
   &SYSINDEX(&STR(X'),&STR(&PMBR)) = 0 AND +
   &SYSINDEX(&STR(,),&STR(&PMBR)) = 0 AND +
   &SYSINDEX(&STR(:),&STR(&PMBR)) = 0 AND +
   &SYSINDEX(&STR(/),&STR(&PMBR)) = 0 AND +
   &STR(&PMBR) >     THEN +
    DO
        SET SYSDVAL = &STR(&PMBR)
        READDVAL X1 X2
        IF &STR(&X2) =      THEN +
            DO
                SET PDSN = &STR(&PDSN(&PMBR))
                SET PMBR =
            END
    END

SET PTDSTYPE =

LISTDSI '&PDSN'
IF &LASTCC > 4 THEN +
    DO
        SET ZEDLMSG = &STR(PROBLEM WITH DATASET: &SYSDSN('&PDSN'))
        ISPEXEC SETMSG MSG(UTLZ001W)
        SET PTDSN         =
        SET PTRECFM       =
        SET PTLRECL       =
        SET PTBLKSIZ      =
        IF &BATCH = BATCH THEN +
            DO
                SET BATCHCC = 28
                GOTO FINISH
            END
        GOTO REDISPLAY
    END
ELSE +
    DO
        IF &SUBSTR(1:2,&STR(&SYSDSORG)) = PO THEN +
            SET PTDSTYPE = PDS
        SET PTDSN         = &STR(&PDSN)
        SET PTRECFM       = &STR(&SYSRECFM)
        SET PTLRECL       = &STR(&SYSLRECL)
        SET PTBLKSIZ      = &STR(&SYSBLKSIZE)
        IF &STR(&PCC) >    THEN +
          IF &SUBSTR(&LENGTH(&STR(&PTRECFM)),&STR(&PTRECFM)) ¬= A AND +
             &SUBSTR(&LENGTH(&STR(&PTRECFM)),&STR(&PTRECFM)) ¬= M THEN +
              SET PTRECFM = &STR(&PTRECFM&PCC)
          ELSE +
              SET PTRECFM = &SUBSTR(1:&LENGTH(&STR(&PTRECFM))-1,+
                            &STR(&PTRECFM))+
                            &STR(&PCC)
        ELSE +
          IF &SUBSTR(&LENGTH(&STR(&PTRECFM)),&STR(&PTRECFM)) = A OR +
             &SUBSTR(&LENGTH(&STR(&PTRECFM)),&STR(&PTRECFM)) = M THEN +
              IF &BATCH ¬= &BATCH THEN +
                  SET PTRECFM = &SUBSTR(1:&LENGTH(&STR(&PTRECFM))-1,+
                                &STR(&PTRECFM))
        IF &BATCH = BATCH THEN +
            DO
                IF &STR(&CONFIG) =    THEN +
                    DO
                        ISPEXEC TBVCLEAR PRINTIT
                        ISPEXEC VGET (PTITPORT PTITLAND) PROFILE
                        IF &STR(&PTITPORT) >   AND +
                           &SYSLRECL <= &DFLTPORT THEN +
                            SET PTCONNAM = &STR(&PTITPORT)
                        IF &STR(&PTITLAND) >   AND +
                           &SYSLRECL  > &DFLTPORT THEN +
                            SET PTCONNAM = &STR(&PTITLAND)
                        IF &PTCONNAM =    THEN SET PTCONNAM = DEFAULT
                    END
                ELSE SET PTCONNAM = &STR(&CONFIG)
                ISPEXEC TBGET PRINTIT
                IF &LASTCC = 0 THEN +
                    DO
                        SET PTSEL = S
                        ISPEXEC TBMOD PRINTIT
                    END
            END
    END

IF &BATCH = BATCH THEN +
    IF &STR(&PTDSN) >     THEN +
        DO
            SET GOTOSEC = &STR(FINISH)
            GOTO PRINT
        END
    ELSE +
        DO
            SET BATCHCC = 24
            GOTO FINISH
        END
ELSE +
    GOTO &STR(&GOTOSEC)

/**********************************************************************
/* DISPLAY THE HELP TUTORIAL                                          *
/**********************************************************************
HELPSEC: +
ISPEXEC SELECT PGM(ISPTUTOR) PARM(UTILH106)
SET ZEDLMSG = &STR(*** HELP DISPLAYED FOR PRINTIT UTILITY +
                   *** NO PROCESSING PERFORMED ***)
ISPEXEC SETMSG MSG(UTLZ000)
EXIT
            


Documentation


 The PRINTIT utility is used to print sequential datasets or PDS members
 (PANVALET support is not implemented yet).  It has been designed to work as a
 CLIST or as an EDIT MACRO.

 There is also a CLIST named $PRINTIT (with an alias of $P) which calls PRINTIT.
 $PRINTIT is designed to work with ISPF DSLIST screens (e.g.  like ISPF option
 3.4) such that you can type $PRINTIT next to a dataset name on a DSLIST screen
 and $PRINTIT calls PRINTIT, passing the name of the dataset to be printed.

 As a CLIST, PRINTIT can be invoked by typing TSO PRINTIT.  You are presented
 with a screen where you can type the name of the dataset to be printed, and
 select what "print configuration" you wish to use.

 To print a dataset, simply place an "S" next to the desired print configuration
 and press .  If you wish to see the JCL which is created and submit it
 yourself (or not submit it), place a "Y" in the "Review JCL ?" field.  If you
 wish to use the JOBPARM ROOM parameter for delivery specification, you may do
 so on the main panel.  You may also override the number of copies associated
 with a given print configuration by specifying a non-zero number in the COPIES
 field on the main panel

 A "print configuration" is simply a name to call a given combination of OUTPUT
 CARD parameters.  They may specify that the printed output is to be printed
 with two pages on each side in landscape orientation for example.  In the
 Fidelity environment, they may also specify where the printed output is to be
 delivered by using different MSGCLASS parameters.

 Some print configurations exist in the table today, and any user may add,
 change, or delete from this list (though you would want to change and delete
 items very carefully as someone else may need them).

 Print configurations can be added by placing an "A" next to one of the existing
 rows in the table.  An existing configuration can be changed by placing a "C"
 next to the row to be changed.  In either case, the user is presented with a
 screen where the desired print configuration can be created.  A 1-8 character
 name and short description must be specified for each configuration.  You
 should make it meaningful for other users to understand.  Placing a "?" in any
 of the fields on the configuration screen will provide a pop-up help screen to
 explain it.

 As mentioned before, PRINTIT can be invoked as an EDIT MACRO as well.  To do
 this, simply type PRINTIT on the command line while editing a file, and the
 name of the dataset which you are editing will pre-populate the dataset name in
 the PRINTIT main panel.  Then select a print configuration as you would
 normally and press .

 It is important to note that if the dataset you are editing is a "physical
 sequential" dataset as opposed to a PDS member, the batch job which is trying
 to print the dataset will require you to exit the dataset before it can run.
 You will get system-generated "enqueue" messages to this effect.  It is also
 important to note, that when editing a PDS member, the version which is most
 recently saved on DASD is the version which PRINTIT will actually print.
 Consequently, you may want save the member you are editing before calling
 PRINTIT.
1
 PRINTIT may be invoked as an edit macro in another fashion.  If you type
 PRINTIT on the command line while editing a dataset and then place your cursor
 on the beginning of a dataset name IN THE BODY OF THE TEXT, PRINTIT will
 attempt to parse the dataset name out of the text and pre-populate the dataset
 name field on the PRINTIT main panel.  By setting a PF key to PRINTIT, printing
 both the dataset being edited and datasets referred to in the text can be
 accomplished quite easily.

 PRINTIT has another facility which allows you to specify a print configuration
 as your personal "default".  Placing the "L" line command next to a print
 configuration establishes that print configuration as your default "landscape"
 orientation configuration.  Placing the "P" line command next to a print
 configuration establishes that print configuration as your default "portrait"
 orientation configuration.  The "P" and "L" may be placed on the same
 configuration if you wish.

 When you invoke PRINTIT as an EDIT MACRO or using $PRINTIT with a dataset name,
 the dataset which pre-populates the dataset name field is interrogated to
 determine its LRECL.  If the LRECL is greater than 80, the landscape default is
 set, otherwise, the portrait default is set.  You will notice that an "S" has
 been placed next to the appropriate default print setting when the PRINTIT main
 panel appears.  You then need only press  to submit the print job.  If
 you do not wish to use the default, you can "blank" it out.  If you call
 PRINTIT as a CLIST, and no dataset name is passed, then no default will be set.

 Support for custom JCL ISPF file tailoring skeletons has just been added to the
 PRINTIT utility (1/30/91).  The PRINTIT JCL has been broken down into four
 different individual skeletons: PRINTIT1 (contains the JOB card), PRINTIT2
 (contains the JOBPARM card), PRINTIT3 (contains the OUTPUT JCL statement),
 PRINTPDS (contains the PDS multi-member print support step), and PRINTIT4
 (contains the job step to do the actual printing).  By default, these skeletons
 are specified to be "file tailored" in that order.

 Using the new "Extended JCL Skeleton" screen, you may now specify up to 13
 different ISPF skeletons to file tailor for a given print configuration.  You
 may or may not chose to use PRINTIT1-4 or any part of them, or in that
 contiguous order.

 For instance several configurations have already been added which use skeletons
 in the order PRINTIT1, PRINTIT2, PRINTIT3, xxxxxxxx, PRINTPDS, PRINTIT4,
 zzzzzzzz.  In these configurations "xxxxxxxx" is a "printer setup" step for
 some small XEROX laser printers which accept in-stream font specification.
 "zzzzzzzz" is the default font "reset" step for that printer.  The use of these
 13 skeletons is limited only by your imagination (and the MVS operating
 system).

 As of 2/1/91 PRINTIT supports multiple member PDS printing.  This is
 accomplished via calling the PDS utility to create a list of members to print
 based on a "member group" specification, and the PRINTDS utility to "print" the
 selected members.  "Member groups", in "PDS utility" terminology, are a way of
 specifying a subset of members within a PDS (or all members), using some
 special "wild card"-type characters.  ISPF "help" panels will be added soon
 which specify the syntax needed.  Until that time, the following lists
 information regarging valid "member group" syntax:

 Member names may be entered in either character or hexadecimal mode for any
 subcommand which processes member names.
1
 Character member names may be from one to eight bytes long with no imbedded
 blanks, commas, parentheses, colons or slashes.

 Hexadecimal member names may contain from one to sixteen hexadecimal digits
 delimited by x' and '.  X'd7c4e2f9' and PDS9 are entirely equivalent; also,
 x'333' and x'0333' are equivalent.

 A member name range, member name pattern or member name combination forms what
 is termed a member group.  Note that a member list (that is, a parenthesized
 list containing member and member group specifications separated by commas) may
 also be used.

 Following are examples using the MEMBERS subcommand to define and display a
 member group:

 Member Group             Members in the Group
 ------------             --------------------
 aa                       AA
 (aa,bb)                  AA and BB
 (aa,bb/)                 AA and any member names containing BB
 :                        all members -- X'00' through X'FF'
 aa:                      members from AA... through X'FF'
 :bb                      members from X'00' through BB...
 aa:bb                    members between AA... and BB... inclusive
 (abc,d:)                 member ABC and those from D... through X'FF'
 aa/                      member names containing AA anywhere
 /bb                      member names containing BB anywhere
 aa/bb                    member names containing AA and BB
 (aa/,bb/)                member names containing AA or BB
 aa*                      members with names AA...
 *bb                      member names containing BB anywhere
 aa*bb                    member with names AA... and BB elsewhere
 (aa*,bb/)                members with names AA... or with BB anywhere

 Any of the valid specifications listed above outside of parentheses may be
 combined inside of parentheses with each specification separated by a comma
 (",").  You may have as many specifications separated by commas between the
 parentheses as you can fit.  Each comma acts as an "OR" in processing the
 logic.

 By default, each page of a member being printed using multi-member capabilities
 will have a "title" at the top of it.  If the dataset is printed with ANSI or
 "machine" control characters (either by your specifying it, or by the RECFM of
 the PDS) the titles will be suppressed.  If you wish to suppress the titles
 yourself on a non-control character dataset, you must "review" the JCL and add
 the PRINTDS keyword NOTITLE.  To do so, find the string "PRINTDS" and add a
 line after it containing simply "NOTITLE +".  The "+" is important as it acts
 as a continuation character for the PRINTDS command.