Mainframe Utility: GETOUTPT

Return to Mainframe Utilities Page

Module


/**********************************************************************
/* UTILITY: GETOUTPT                                                  *
/* AUTHOR: DAVID LEIGH                                                *
/* FUNCTION: THIS CLIST READS THE SDSF HELD QUEUE FOR THE JOB NAME YOU*
/*           SPECIFY AND LOADS ALL THE SYSOUT FOR EACH JOB WITH THAT  *
/*           NAME, INTO A DATASET.                                    *
/**********************************************************************
PROC 1 JOBNAME PERMANENT EDIT BROWSE UTILITY(GETOUTPT)
/*** CHECK THE DEBUG SWITCH ***/
ISPEXEC VGET DBGSWTCH PROFILE
IF &DBGSWTCH = ON THEN +
    CONTROL MSG LIST CONLIST SYMLIST NOFLUSH NOPROMPT ASIS
ELSE +
    CONTROL NOMSG NOLIST NOFLUSH NOPROMPT ASIS


IF &PERMANENT = PERMANENT THEN SET VOLUME =
ELSE SET VOLUME = &STR(VOLUME(WRK$$$))
FREE DD(TEMPDD)
SET LP = &STR((
SET RP = &STR())
SET SYSOUTTRAP = 1000
CONTROL MSG
STATUS &JOBNAME
CONTROL NOMSG
SET SYSOUTTRAP = 0
SET X = &SYSOUTLINE
DO I = 1 TO &X
    SET SYSDVAL = &STR(&SYSNSUB(2,&&SYSOUTLINE&I))
    READDVAL PARM JOBNAME NULL
    IF &PARM = JOB THEN +
        DO
            SET A = &SYSINDEX(&STR(&LP),&STR(&JOBNAME))
            SET B = &SYSINDEX(&STR(&RP),&STR(&JOBNAME))
            SET NODEA = &SUBSTR(1:&A-1,&STR(&JOBNAME))
            SET NODEB = &SUBSTR(&A+1:&B-1,&STR(&JOBNAME))
            SET JOBDSN = &STR(&SYSUID..JES.SYSOUT.&NODEA..&NODEB)
            SET ZEDLMSG = &STR(*** LOADING "&JOBNAME" +
                               INTO "&JOBDSN" ***)
            ISPEXEC CONTROL DISPLAY LOCK
            ISPEXEC DISPLAY PANEL(MSGPANEL)
            DELETE '&JOBDSN'
            ALLOC DD(TEMPDD) DSN('&JOBDSN') +
                             NEW CATALOG &STR(&VOLUME) +
                             UNIT(SYSDA) &VOLUME +
                             SPACE(10,10) CYLINDERS RELEASE DSORG(PS) +
                             RECFM(F B A) LRECL(255) BLKSIZE(23460)
            FREE DD(TEMPDD)
            OUTPUT &JOBNAME PRINT('&JOBDSN') HOLD KEEP
        END
END

IF &EDIT = EDIT THEN ISPEXEC EDIT DATASET('&JOBDSN')
IF &BROWSE = BROWSE THEN ISPEXEC BROWSE DATASET('&JOBDSN')
EXIT
            


Documentation


 GETOUTPT loads batch job output from the SDSF held queue into a dataset.  The
 command syntax is as follows:

 COMMAND ===> tso getoutput jobname {permanent}

 Example:

 COMMAND ===> tso getoutput p@dalxxx

 "jobname" - The name of the job you want extracted from SDSF.  Due to the
 restrictions of the TSO "OUTPUT" command which is used to perform this task,
 you can only use GETOUTPT on your own jobs.  Use the SDSF PRINT ODSN command
 for other situations.

 "permanent" - This is an optional keyword which, if specified, indicates that
 the dataset should be allocated on permanent DASD instead of a work pack.  Work
 pack allocation is the default.

 Each job with the same name will be extracted, but each job will be in a
 separate dataset.  The datasets will have the name format of:

 userid.JES.SYSOUT.jobname.jobnumber

 Each dataset is defined as LRECL=255, RECFM=FBA.
            


Leave a Reply

Your email address will not be published. Required fields are marked *