Mainframe Utility: CSPDB2XR

Return to Mainframe Utilities Page

Module


/**********************************************************************
/* UTILITY: CSPDB2XR                                                  *
/* AUTHOR: DAVID LEIGH                                                *
/* FUNCTION: THIS UTILITY INVOKES A BATCH JOB WHICH EXTRACTS ALL CSP  *
/*           RECORDS IN THE ENDEVOR-CONTROLLED MSLS INTO EXPORT       *
/*           FORMAT.  AN EDIT MACRO (CSPDB2MA) IS THEN INVOKED TO     *
/*           FORMAT THE INFORMATION INTO A CROSS REFERENCE REPORT OF  *
/*           CSP RECORD NAMES TO DB2 RECORD NAMES AND PUTS THE RESULTS*
/*           INTO THE DOCUMENT LIBRARY TO BE VIEWED ON-LINE.          *
/**********************************************************************
PROC 0 DOCLIB('DUSC1.STR.DOCLIB') +
       PASSFIL1('&SYSUID..TEMP.CSPDB2XR.PASSFIL1') +
       PASSFIL2('&SYSUID..TEMP.CSPDB2XR.PASSFIL2') +
       GDAFILE('DUSC1.STR.CNTLLIB(GDA)') +
       MEMBER('CSPDB2XR') +
       ROMSL('TEDVDEVL TEDVQUAL MEDVMODO PEDVPROD') +
       EDIT +
       FORMAT +
       HELP

/*** CHECK THE DEBUG SWITCH ***/                                              02
ISPEXEC VGET DBGSWTCH PROFILE                                                 02
IF &DBGSWTCH = ON THEN +                                                      02
    CONTROL MSG LIST CONLIST SYMLIST NOFLUSH PROMPT ASIS                00000702
ELSE +                                                                        02
    CONTROL NOMSG NOLIST NOFLUSH PROMPT ASIS                            00000902
ISPEXEC CONTROL ERRORS RETURN
IF &HELP = HELP THEN GOTO HELPSEC

/**********************************************************************
/* IF BEING INVOKED WITH THE FORMAT PARAMETER, JUST EDIT THE DATASET  *
/**********************************************************************
IF &FORMAT = FORMAT THEN +
    DO
        SET PASSFIL2 = &STR(&PASSFIL2)
        ISPEXEC EDIT DATASET('&PASSFIL2') MACRO(CSPDB2MA)
        EXIT
    END


/**********************************************************************
/* ESTABLISH SOME PROCESSING VARIABLES                                *
/**********************************************************************
/* INITIALIZE SEVERAL VARIABLES WHICH WILL BE USED LATER IN THE       *
/* PROCESSING.                                                        *
/**********************************************************************
OPEN_CONTINUE: +
CALL 'SYS2.USC1.LINKLIB(USERINFO)' '&SYSUID '
SET JCLDSN = &STR(&SYSUID..TEMP.CSPDB2XR)
SET EXITCC = 0
SET PASSFIL1 = &STR(&PASSFIL1)
SET PASSFIL2 = &STR(&PASSFIL2)
SET LP = &STR((
SET RP = &STR()

/**********************************************************************
/* CREATE THE JCL                                                     *
/**********************************************************************
SET ZEDLMSG = &STR(*** CREATING JCL TO GENERATE CSP/DB2 XREF REPORT ***)
ISPEXEC CONTROL DISPLAY LOCK
ISPEXEC DISPLAY MSG(UTLZ001)

DELETE '&JCLDSN'

FREE DDNAME(ISPFILE)

ALLOCATE DDNAME(ISPFILE) DSN('&JCLDSN') +
                         NEW CATALOG +
                         UNIT(SYSDA) VOLUME(WRK$$$) +
                         SPACE(2,2) TRACKS RELEASE +
                         RECFM(F B) LRECL(80) BLKSIZE(23440) DSORG(PS)

ISPEXEC FTOPEN
ISPEXEC FTINCL CSPDB2XR
ISPEXEC FTCLOSE

FREE DD(ISPFILE)

IF &EDIT = EDIT THEN +
    DO
        SET ZEDLMSG = &STR(NOTE: YOU MUST SUBMIT +
                           THIS JCL YOURSELF.  IT +
                           WILL NOT RUN AUTOMATICALLY.)
        ISPEXEC SETMSG MSG(UTLZ001)
        ISPEXEC EDIT DATASET('&JCLDSN')
        SET EXITCC = 0
        GOTO FINISH

    END

SUBMIT '&JCLDSN'
SET ZEDLMSG = &STR(*** CSPDB2XR JOB SUBMITTED ***)
ISPEXEC SETMSG MSG(UTLZ000)

/**********************************************************************
/* CLOSE UP SHOP                                                      *
/**********************************************************************
FINISH: +
EXIT CODE(&EXITCC)

/**********************************************************************
/* DISPLAY ANY "HELP" WHICH IS AVAILABLE FOR THIS UTILITY             *
/**********************************************************************
HELPSEC: +
ISPEXEC SELECT PGM(ISPTUTOR) PARM(HELPSHEL)
SET ZEDLMSG = &STR(*** HELP DISPLAYED FOR CSPDB2XR UTILITY +
                   *** NO PROCESSING PERFORMED ***)
ISPEXEC SETMSG MSG(UTLZ000)
EXIT
            


Documentation


 CSPDB2XR creates and submits a batch job which generates a cross reference
 report of CSP records stored in the Endevor-controlled MSLs and the DB2 tables
 or views they are built on, along with the CSP prologue.  This report is then
 placed in the UNISTAR DOCLIB for viewing on-line directly or through the
 documentation facility.

Syntax:

 COMMAND ===> tso cspdb2xr

 Optional Parameters:

 DOCLIB('doclib.name.goes.here')
 The default is DUSC1.STR.DOCLIB.  This must be a PDS name of an existing PDS
 with no member name.

 MEMBER('mbrname')
 The default is CSPDB2XR.  The member will be created if it does not exist, and
 overwritten if it does.

 ROMSL('mslname1 mslname2 .....')
 The default MSL concatenation used consists of DD names defined in the JCL
 skeleton for the Endevor-controlled MSLs for the UNISTAR project.  Those DDs
 are:  TEDVDEVL TEDVQUAL MEDVMODO and PEDVPROD in that order.

 EDIT
 This parameter indicates that the JCL which CSPDB2XR creates is NOT to be
 submitted automatically, but that the user is to be taken into an edit on the
 JCL.  The user is then free to make or not make any changes.  The user must
 then submit the JCL themselves.  Without the EDIT parameter, the job will be
 submitted automatically.
            


Leave a Reply

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