Mainframe Utility: SHOWMAP

Return to Mainframe Utilities Page

Module


/**********************************************************************
/* UTILITY: SHOWMAP                                                   *
/* AUTHOR: DAVID LEIGH                                                *
/* FUNCTION: THIS EDIT MACRO IS EXECUTED WHILE IN A BMS SOURCE MEMBER *
/*           AND INVOKES DON FAVILLES MAPPRINT PROGRAM IN FOREGROUND  *
/*           TO CREATE A FILE OF THE MAP IMAGE.  THE USER IS THEN     *
/*           TAKEN INTO AN EDIT OF THAT FILE.                         *
/**********************************************************************
ISREDIT MACRO
ISPEXEC CONTROL ERRORS RETURN
/**** SET MESSAGE DISPLAY ON/OFF BASED ON THE DEBUG SWITCH ***/
ISPEXEC VGET (DBGSWTCH) PROFILE
IF &DBGSWTCH = &STR(ON) THEN +
    CONTROL MSG LIST CONLIST SYMLIST NOFLUSH
ELSE +
    CONTROL NOMSG NOLIST NOFLUSH NOPROMPT

/**********************************************************************
/* GET THE MEMBER NAME TO USE FOR MAP AND MAPSET                      *
/**********************************************************************
ISREDIT (MEMBER) = MEMBER
ISREDIT (DATASET) = DATASET

/**********************************************************************
/* CLEAN UP OLD FILES                                                 *
/**********************************************************************
SET MAPFILE = &STR(&SYSUID..TEMP.MAPPRINT.&MEMBER)
DELETE '&MAPFILE'

SET MAPSYS = &STR(&SYSUID..TEMP.MAPPRINT.SYSOUD
DELETE '&MAPSYS'

/**********************************************************************
/* FREE DD'S                                                          *
/**********************************************************************
FREE DD(SYSLST BATCNTL SYSIPT)
FREE DD(SYSOUD PRINTFL MAPFL)

/**********************************************************************
/* ALLOCATE NEW FILES                                                 *
/**********************************************************************
ALLOC DD(SYSOUD) DSN('&MAPSYS') +
                 NEW CATALOG +
                 UNIT(SYSDA) VOLUME(WRK001) +
                 SPACE(1,1) TRACKS RELEASE +
                 RECFM(F B A) LRECL(121) BLKSIZE(23474) DSORG(PS)

ALLOC DD(PRINTFL) DSN('&MAPFILE') +
                  NEW CATALOG +
                  UNIT(SYSDA) VOLUME(WRK001) +
                  SPACE(1,1) TRACKS RELEASE +
                  RECFM(F B A) LRECL(133) BLKSIZE(23408) DSORG(PS)

ALLOC DD(MAPFL) DSN('&DATASET(&MEMBER)') +
                SHR KEEP

/**********************************************************************
/* INVOKE THE PROGRAM                                                 *
/**********************************************************************
/*CALL 'P [at] TLD [dot] SLSS [dot] LOAD(MAPPRINT)' '&MEMBER'
ISPEXEC SELECT PGM(MAPPRINT)
SET PGMCC = &LASTCC

FREE DD(SYSOUD PRINTFL MAPFL)

/**********************************************************************
/* EDIT THE SYSPRINT IF A PROBLEM                                     *
/**********************************************************************
IF &PGMCC ¬= 0 THEN +
    DO
        SET ZEDSMSG = &STR(MAPPRINT PGMCC: "&PGMCC")
        SET ZEDLMSG = &STR(THE "MAPPRINT" PROGRAM GOT A RETURN CODE +
                           OF "&PGMCC")
        ISPEXEC SETMSG MSG(UTLZ001)
        ISPEXEC EDIT DATASET('&MAPSYS')
    END

/**********************************************************************
/* EDIT THE MAP FILE OUTPUT                                           *
/**********************************************************************
SET ZEDLMSG = &STR(TYPE "PRINTIT" AND PRESS  TO PRINT THIS FILE)
ISPEXEC SETMSG MSG(UTLZ000)
ISPEXEC EDIT DATASET('&MAPFILE')
EXIT
            


Documentation


 SHOWMAP is an ISPF EDIT MACRO which invokes Don Faville's CICS MAPPRINT program
 for the member you are editing and presents you the results on-line.  So, if
 you're editing some BMS source, and you want to know what the map basically
 looks like but you don't want to go to CICS to see that, just type SHOWMAP on
 the command line and press .

 The MAPPRINT program will then operate against the BMS source member you are
 editing, and when finished, will bring you into an edit session of the report
 generated by the program.  You can print this fairly easily at this point by
 typing PRINTIT and pressing .
            


Leave a Reply

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