BMS macro generation utility program (DFHBMSUP)

The BMS macro generation utility, DFHBMSUP, can re-create the original BMS macro statements from a mapset load module when the macro statements that were assembled to produce the mapset load module are no longer available.

The utility program generates map definition macros that are equivalent to the originals, and thus can be used to recreate symbolic maps if the original source has been lost. However, it is not possible to recover the original field names used. Field names are generated by the utility and you can then edit them.

DFHBMSUP sets a return code indicating success or failure. All input information is defined in the JCL.

DFHBMSUP requires the following inputs:
Input MAPSET
Name defined in the PARM field of the EXEC JCL statement.
Input MAPSET library
Name defined in the DFHRPL DD statement.
DFHBMSUP provides the following outputs:
Output map
Name defined in the BMSOUT DD statement.
Output map library
Name defined in the BMSOUT DD statement.
Note: DFHBMSUP cannot process mapset load modules that were created on CICS/OS/VS 1.7 and earlier releases.

DD statements for DFHBMSUP

The DD statements for the input and output data sets used by DFHBMSUP are as follows:

STEPLIB DD
Defines a partitioned data set (DSORG=PO) containing DFHBMSUP. If DFHBMSUP is in the link list, this statement is not required.
DFHRPL DD
Defines a partitioned data set (DSORG=PO) containing the mapset load module to be processed. The member name is supplied in the PARM field of the EXEC statement.
BMSOUT DD
Defines a sequential data set or a member of a partitioned data set (DSORG=PO) to contain the BMS macro statements generated by the utility.

Return codes from DFHBMSUP

DFHBMSUP sets one of the following return codes:
0
Utility executed successfully.
4
Input mapset could not be located.
8
Output mapset could not be opened.

Example: DD statements required to process a BMS mapset load module

Figure 1 shows the statements required to process a BMS mapset load module, BMSET01, which is in the INPUT.BMSLIB library. Macro statements are generated and written to the MAPOUT member of the OUTPUT.MACLIB library.
Figure 1. DFHBMSUP—generating BMS macro statements.
//********************************
//* RUN THE DFHBMSUP PROGRAM     *
//*    INPUT BMSET01             *
//*    OUTPUT MAPOUT             *
//*                              *
//********************************
//*
//RUNPROG  EXEC PGM=DFHBMSUP,PARM='BMSET01',REGION=2M
//STEPLIB  DD DSN=CICSTS56.CICS.SDFHLOAD,DISP=SHR
//BMSOUT   DD DSN=OUTPUT.MACLIB(MAPOUT),
//         DISP=SHR
//DFHRPL   DD DSN=INPUT.BMSLIB,DISP=SHR
//SYSUDUMP DD SYSOUT=*
//*

Example: DFHBMSUP output

The following macro statements were generated from the mapset load module, BMSET40.

Note that the utility uses the name of the load module being disassembled as the label on the DFHMSD mapset definition macro, so that you can use it to build HTML template data sets which are accessible to the original 3270 applications. If you specify the suffixed version of the load module for a mapset as input to DFHBMSUP and you intend to use the output source to build HTML for the mapset, you may need to edit the DFHMSD label to remove the suffix.

Also note that DFHBMSUP does not know whether STORAGE=AUTO was defined in the original macro statements, so the DFHBMSUP output does not include STORAGE=AUTO on the DFHMSD mapset definition macro. If you require STORAGE=AUTO, edit the DFHMSD macro to include it.

You can edit all the names in the DFHBMSUP output to be more meaningful for your application.

Figure 2. DFHBMSUP output - generated BMS macro statements
* This is an unaligned mapset
*
         TITLE 'BMSET40 Mapset MACRO Definition Listing'
BMSET40  DFHMSD TYPE=DSECT,LANG=ASM,MODE=INOUT
*
BMAP400  DFHMDI SIZE=(1,80),CTRL=(FRSET,FREEKB),COLUMN=1,LINE=1,       *
               MAPATTS=(COLOR,HILIGHT)
         DFHMDF POS=0,LENGTH=4,ATTRB=(ASKIP,BRT),COLOR=PINK,           *
               HILIGHT=REVERSE,INITIAL='BM40'
         DFHMDF POS=5,LENGTH=1,COLOR=BLUE
FLD00001 DFHMDF POS=16,LENGTH=45,ATTRB=(ASKIP,BRT),COLOR=NEUTRAL
         DFHMDF POS=62,LENGTH=1,COLOR=BLUE
FLD00002 DFHMDF POS=78,LENGTH=1,COLOR=YELLOW
BMAP401  DFHMDI SIZE=(9,80),CTRL=(FRSET,FREEKB),COLUMN=1,LINE=2,       *
               MAPATTS=(COLOR,HILIGHT)
         DFHMDF POS=0,LENGTH=1,COLOR=BLUE,INITIAL=' '
         DFHMDF POS=80,LENGTH=1,COLOR=BLUE,INITIAL=' '
         DFHMDF POS=160,LENGTH=1,COLOR=BLUE,INITIAL=' '
         DFHMDF POS=240,LENGTH=1,COLOR=BLUE,INITIAL=' '
         DFHMDF POS=320,LENGTH=1,COLOR=BLUE,INITIAL=' '
         DFHMDF POS=400,LENGTH=1,COLOR=BLUE,INITIAL=' '
         DFHMDF POS=480,LENGTH=1,COLOR=BLUE,INITIAL=' '
         DFHMDF POS=560,LENGTH=1,COLOR=BLUE,INITIAL=' '
         DFHMDF POS=658,LENGTH=39,COLOR=TURQUOISE,                     *
               INITIAL='THIS SHOULD BE IN THE MIDDLE OF LINE 10'
*
BMAP402  DFHMDI SIZE=(1,80),CTRL=(FRSET,FREEKB),COLUMN=1,LINE=11,      *
               MAPATTS=(COLOR,HILIGHT)
         DFHMDF POS=0,LENGTH=1,COLOR=BLUE,INITIAL=' '
BMAP403  DFHMDI SIZE=(1,80),CTRL=(FRSET,FREEKB),COLUMN=1,LINE=11,      *
               MAPATTS=(COLOR,HILIGHT)
         DFHMDF POS=17,LENGTH=41,COLOR=TURQUOISE,                      *
               INITIAL='THIS TEXT SHOULD NOT APPEAR ON THE SCREEN'
*
BMAP404  DFHMDI SIZE=(10,80),CTRL=(FRSET,FREEKB),COLUMN=1,LINE=12,     *
               MAPATTS=(COLOR,HILIGHT)
         DFHMDF POS=18,LENGTH=39,COLOR=TURQUOISE,                      *
               INITIAL='THIS SHOULD BE IN THE MIDDLE OF LINE 12'
         DFHMDF POS=80,LENGTH=1,COLOR=BLUE,INITIAL=' '
         DFHMDF POS=160,LENGTH=1,COLOR=BLUE,INITIAL=' '
         DFHMDF POS=240,LENGTH=1,COLOR=BLUE,INITIAL=' '
         DFHMDF POS=320,LENGTH=1,COLOR=BLUE,INITIAL=' '
         DFHMDF POS=400,LENGTH=1,COLOR=BLUE,INITIAL=' '
         DFHMDF POS=480,LENGTH=1,COLOR=BLUE,INITIAL=' '
         DFHMDF POS=560,LENGTH=1,COLOR=BLUE,INITIAL=' '
         DFHMDF POS=640,LENGTH=1,COLOR=BLUE,INITIAL=' '
         DFHMDF POS=720,LENGTH=1,COLOR=BLUE,INITIAL=' '
*
BMAP405  DFHMDI SIZE=(3,80),CTRL=(FRSET,FREEKB),COLUMN=1,LINE=22,      *
               MAPATTS=(COLOR,HILIGHT)
FLD00003 DFHMDF POS=80,LENGTH=78,COLOR=BLUE
         DFHMDF POS=160,LENGTH=41,COLOR=BLUE,                          *
               INITIAL='PF1=HELP       PF3=EXIT       PF12=RETURN'
         DFHMDF POS=208,LENGTH=30,COLOR=BLUE,                          *
               INITIAL='ENTER=CONTINUE      CLEAR=EXIT'
BMSET40  DFHMSD TYPE=FINAL
         END