Mainframe Utility: MAPREDEF

Return to Mainframe Utilities Page

Module


/**********************************************************************
/* UTILITY:  MAPREDEF                                                 *
/* AUTHOR:  DAVID LEIGH                                               *
/* FUNCTION:  THIS UTILITY CONVERTS "VANILLA" CICS BMS MAP COBOL      *
/*            SYMBOLIC LAYOUTS TO A MORE READABLE REDEFINES.  IT      *
/*            TAKES INPUT OF A PREFIX STRING SUCH AS "MAP-" WHICH IT  *
/*            PREFIXES TO ALL THE DATA NAMES AND THEN SUFFIXES THE    *
/*            ATTRIBUTE, FLAG, AND LENGTH DATANAMES WITH LENG,        *
/*            ATTR AND FLAG.  THE ACTUAL DATA FIELD SUFFIX OF "I" IS  *
/*            REMOVED.  A BLANK COMMENT BOX IS PLACED BEFORE THE      *
/*            DEFINITION AND EACH FIELD HAS AN ASTERISK SEPARATOR     *
/*            LINE IN FRONT OF IT.                                    *
/**********************************************************************
ISREDIT MACRO (PREFIX)
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
/**********************************************************************
/* EDIT THE USER INPUT                                                *
/**********************************************************************
IF &STR(&PREFIX) =     THEN +
    DO
        SET ZEDLMSG = &STR(*** A FIELD NAME PREFIX MUST BE +
                           SPECIFIED ***)
        ISPEXEC SETMSG MSG(UTLZ001)
        EXIT CODE(12)
    END
/**********************************************************************
/* GET RID OF THE "OUTPUT" REDEFINES AND SET SOME VARIABLES           *
/**********************************************************************
SET SEPARATE = &STR(      ********************************************)+
               &STR(*********************)
SET LINEBREK = &STR(      /*******************************************)+
               &STR(*********************)
SET OPENBOXL = &STR(      *                                           )+
               &STR(                    *)
SET LP = &STR((
SET RP = &STR())
ISREDIT FIND LAST ' 01 '
ISREDIT DELETE .ZCSR .ZLAST
/**********************************************************************
/* LOOP THROUGH AND MAKE THE FORMATTING CHANGES                       *
/**********************************************************************
ISREDIT FIND FIRST P' ## ' 1 20
DO WHILE &LASTCC = 0
    ISREDIT (SYSDVAL) = LINE .ZCSR
    READDVAL LEVEL NAME PARM1 PARM2 PARM3
    SET LNAME = &LENGTH(&STR(&NAME))
    IF &STR(&NAME) = FILLER THEN +
        DO
            IF &STR(&PARM1) = PIC THEN +
                DO
                    SET LEVEL = &STR(05)
                    SET L = &SYSINDEX(&STR(&LP),&STR(&PARM2))
                    SET R = &SYSINDEX(&STR(&RP),&STR(&PARM2))
                    IF &SUBSTR(1:2,&STR(&PARM2)) = &STR(S9) THEN +
                        SET SPC =
                    ELSE +
                        SET SPC = &STR( )
                    IF &EVAL(&R-&L) = 2 THEN +
                        SET PICTURE = &STR(PIC )+
                                      &STR(&SPC)+
                                      &SUBSTR(1:&L,&STR(&PARM2))+
                                      &STR(0)+
                                      &SUBSTR(&L+1:&R,&STR(&PARM2))+
                                      &STR(.)
                    ELSE +
                        SET PICTURE = &STR(PIC )+
                                      &STR(&SPC)+
                                      &SUBSTR(1:&R,&STR(&PARM2))+
                                      &STR(.)
                END
            IF &STR(&PARM1) = REDEFINES THEN +
                DO
                    ISREDIT DELETE .ZCSR .ZCSR
                    GOTO GETNEXT
                END
        END
    ELSE +
        DO
            SELECT (&SUBSTR(&LNAME:&LNAME,&STR(&NAME)))
                WHEN (.) DO
                    SET SUFFIX = &STR(-AREA REDEFINES &NAME)
                    SET LNAME = &LNAME - 1
                    SET PICTURE =
                    SET LEVEL = &STR(01)
                END
                WHEN (I) DO
                    SET LEVEL = &STR(05)
                    SET SUFFIX =
                    SET L = &SYSINDEX(&STR(&LP),&STR(&PARM2))
                    SET R = &SYSINDEX(&STR(&RP),&STR(&PARM2))
                    IF &SUBSTR(1:2,&STR(&PARM2)) = &STR(S9) THEN +
                        SET SPC =
                    ELSE +
                        SET SPC = &STR( )
                    IF &EVAL(&R-&L) = 2 THEN +
                        SET PICTURE = &STR(PIC )+
                                      &STR(&SPC)+
                                      &SUBSTR(1:&L,&STR(&PARM2))+
                                      &STR(0)+
                                      &SUBSTR(&L+1:&R,&STR(&PARM2))+
                                      &STR(.)
                    ELSE +
                        SET PICTURE = &STR(PIC )+
                                      &STR(&SPC)+
                                      &SUBSTR(1:&R,&STR(&PARM2))+
                                      &STR(.)
                END
                WHEN (L) DO
                    ISREDIT LINE_BEFORE .ZCSR = (SEPARATE)
                    SET LEVEL = &STR(05)
                    SET SUFFIX = &STR(-LENG)
                    SET PICTURE = &STR(PIC S9(04) COMP.)
                END
                WHEN (A) DO
                    SET LEVEL = &STR(05)
                    SET SUFFIX = &STR(-ATTR REDEFINES)
                    SET PICTURE =
                END
                WHEN (F) DO
                    SET LEVEL = &STR(05)
                    SET SUFFIX = &STR(-FLAG)
                    SET PICTURE = &STR(PIC  X(01).)
                    SET PREVNAME = &STR(XXXXXXXXXX)
                END
            END
            SET NAME = &STR(&PREFIX)+
                       &SUBSTR(1:&LNAME-1,&STR(&NAME))+
                       &STR(&SUFFIX)
        END
    SELECT (&STR(&LEVEL))
        WHEN (01) DO
            SET LEVLOC = 08
            SET NAMLOC = 12
            SET PICLOC = 56
        END
        WHEN (05) DO
            SET LEVLOC = 12
            SET NAMLOC = 16
            SET PICLOC = 56
        END
    END
    ISREDIT LINE .ZCSR = <(LEVLOC,LEVEL) (NAMLOC,NAME) (PICLOC,PICTURE)>
    IF &STR(&PREVNAME) >    AND +
       &STR(&PREVNAME) ¬= &STR(XXXXXXXXXX) THEN +
        DO
            SET PICTURE = &STR(PIC  X(01).)
            SET NAME = &STR(&PREVNAME)
            ISREDIT LINE_AFTER .ZCSR = <(NAMLOC,NAME) (PICLOC,PICTURE)>
            SET PREVNAME =
        END
    IF &STR(&PREVNAME) = &STR(XXXXXXXXXX) THEN +
        SET PREVNAME = &STR(&NAME)
    ISREDIT FIND FIRST P'=' 30 .ZCSR .ZCSR
GETNEXT: +
    ISREDIT FIND NEXT P' ## ' 1 20
END

ISREDIT LINE_BEFORE .ZFIRST = (SEPARATE)
ISREDIT LINE_BEFORE .ZFIRST = (OPENBOXL)
ISREDIT LINE_BEFORE .ZFIRST = (LINEBREK)
ISREDIT CURSOR = 1 1
EXIT
            


Documentation


1
 MAPREDEF is an edit macro.  When editing a BMS COBOL symbolic map layout
 copybook, you can type MAPREDEF xxxxxxx (where "xxxxxxx" is a standard dataname
 prefix you wish to use) and press ENTER and the layout will be converted to
 more readable names.

 Note:  Currently MAPREDEF only works with single map mapsets

 The best way to explain this is to show an example.

 Assume you have the following map layout in a copylib member:

       01  SLST79RI.
           02  FILLER PIC X(12).
           02  SELECTL    COMP  PIC  S9(4).
           02  SELECTF    PICTURE X.
           02  FILLER REDEFINES SELECTF.
             03 SELECTA    PICTURE X.
           02  SELECTI  PIC X(1).
           02  RPTYEARL    COMP  PIC  S9(4).
           02  RPTYEARF    PICTURE X.
           02  FILLER REDEFINES RPTYEARF.
             03 RPTYEARA    PICTURE X.
           02  RPTYEARI  PIC X(4).
           02  FEEPCT2L    COMP  PIC  S9(4).
           02  FEEPCT2F    PICTURE X.
           02  FILLER REDEFINES FEEPCT2F.
             03 FEEPCT2A    PICTURE X.
           02  FEEPCT2I  PIC X(2).
           02  FEECDE2L    COMP  PIC  S9(4).
           02  FEECDE2F    PICTURE X.
           02  FILLER REDEFINES FEECDE2F.
             03 FEECDE2A    PICTURE X.
           02  FEECDE2I  PIC X(2).
           02  INTRAT2L    COMP  PIC  S9(4).
           02  INTRAT2F    PICTURE X.
           02  FILLER REDEFINES INTRAT2F.
             03 INTRAT2A    PICTURE X.
           02  INTRAT2I  PIC X(7).
           02  RPTQTRL    COMP  PIC  S9(4).
           02  RPTQTRF    PICTURE X.
           02  FILLER REDEFINES RPTQTRF.
             03 RPTQTRA    PICTURE X.
           02  RPTQTRI  PIC X(1).
           02  LENDRIDL    COMP  PIC  S9(4).
           02  LENDRIDF    PICTURE X.
           02  FILLER REDEFINES LENDRIDF.
             03 LENDRIDA    PICTURE X.
           02  LENDRIDI  PIC X(6).
           02  INTRAT3L    COMP  PIC  S9(4).
           02  INTRAT3F    PICTURE X.
           02  FILLER REDEFINES INTRAT3F.
             03 INTRAT3A    PICTURE X.
           02  INTRAT3I  PIC X(3).
           02  BILLCD3L    COMP  PIC  S9(4).
           02  BILLCD3F    PICTURE X.
           02  FILLER REDEFINES BILLCD3F.
             03 BILLCD3A    PICTURE X.
           02  BILLCD3I  PIC X(2).
           02  FUNDSRCL    COMP  PIC  S9(4).
           02  FUNDSRCF    PICTURE X.
           02  FILLER REDEFINES FUNDSRCF.
             03 FUNDSRCA    PICTURE X.
           02  FUNDSRCI  PIC X(6).
1
           02  SSN1L    COMP  PIC  S9(4).
           02  SSN1F    PICTURE X.
           02  FILLER REDEFINES SSN1F.
             03 SSN1A    PICTURE X.
           02  SSN1I  PIC X(3).
           02  SSN2L    COMP  PIC  S9(4).
           02  SSN2F    PICTURE X.
           02  FILLER REDEFINES SSN2F.
             03 SSN2A    PICTURE X.
           02  SSN2I  PIC X(2).
           02  SSN3L    COMP  PIC  S9(4).
           02  SSN3F    PICTURE X.
           02  FILLER REDEFINES SSN3F.
             03 SSN3A    PICTURE X.
           02  SSN3I  PIC X(4).
           02  YEAR4L    COMP  PIC  S9(4).
           02  YEAR4F    PICTURE X.
           02  FILLER REDEFINES YEAR4F.
             03 YEAR4A    PICTURE X.
           02  YEAR4I  PIC X(2).
           02  QTR4L    COMP  PIC  S9(4).
           02  QTR4F    PICTURE X.
           02  FILLER REDEFINES QTR4F.
             03 QTR4A    PICTURE X.
           02  QTR4I  PIC X(1).
           02  SPALCA4L    COMP  PIC  S9(4).
           02  SPALCA4F    PICTURE X.
           02  FILLER REDEFINES SPALCA4F.
             03 SPALCA4A    PICTURE X.
           02  SPALCA4I  PIC X(2).
           02  LOANNUML    COMP  PIC  S9(4).
           02  LOANNUMF    PICTURE X.
           02  FILLER REDEFINES LOANNUMF.
             03 LOANNUMA    PICTURE X.
           02  LOANNUMI  PIC X(1).
           02  LONTYP4L    COMP  PIC  S9(4).
           02  LONTYP4F    PICTURE X.
           02  FILLER REDEFINES LONTYP4F.
             03 LONTYP4A    PICTURE X.
           02  LONTYP4I  PIC X(2).
           02  INTRAT4L    COMP  PIC  S9(4).
           02  INTRAT4F    PICTURE X.
           02  FILLER REDEFINES INTRAT4F.
             03 INTRAT4A    PICTURE X.
           02  INTRAT4I  PIC X(3).
           02  BILLCD4L    COMP  PIC  S9(4).
           02  BILLCD4F    PICTURE X.
           02  FILLER REDEFINES BILLCD4F.
             03 BILLCD4A    PICTURE X.
           02  BILLCD4I  PIC X(2).
           02  SECT1L    COMP  PIC  S9(4).
           02  SECT1F    PICTURE X.
           02  FILLER REDEFINES SECT1F.
             03 SECT1A    PICTURE X.
           02  SECT1I  PIC X(1).
           02  SECT2L    COMP  PIC  S9(4).
           02  SECT2F    PICTURE X.
           02  FILLER REDEFINES SECT2F.
             03 SECT2A    PICTURE X.
           02  SECT2I  PIC X(1).
           02  SECT3L    COMP  PIC  S9(4).
           02  SECT3F    PICTURE X.
           02  FILLER REDEFINES SECT3F.
             03 SECT3A    PICTURE X.
           02  SECT3I  PIC X(1).
1
           02  SECT4L    COMP  PIC  S9(4).
           02  SECT4F    PICTURE X.
           02  FILLER REDEFINES SECT4F.
             03 SECT4A    PICTURE X.
           02  SECT4I  PIC X(1).
           02  SECT5L    COMP  PIC  S9(4).
           02  SECT5F    PICTURE X.
           02  FILLER REDEFINES SECT5F.
             03 SECT5A    PICTURE X.
           02  SECT5I  PIC X(1).
           02  LINIT15L    COMP  PIC  S9(4).
           02  LINIT15F    PICTURE X.
           02  FILLER REDEFINES LINIT15F.
             03 LINIT15A    PICTURE X.
           02  LINIT15I  PIC X(2).
           02  LINIT25L    COMP  PIC  S9(4).
           02  LINIT25F    PICTURE X.
           02  FILLER REDEFINES LINIT25F.
             03 LINIT25A    PICTURE X.
           02  LINIT25I  PIC X(2).
           02  LINIT35L    COMP  PIC  S9(4).
           02  LINIT35F    PICTURE X.
           02  FILLER REDEFINES LINIT35F.
             03 LINIT35A    PICTURE X.
           02  LINIT35I  PIC X(2).
           02  LINIT45L    COMP  PIC  S9(4).
           02  LINIT45F    PICTURE X.
           02  FILLER REDEFINES LINIT45F.
             03 LINIT45A    PICTURE X.
           02  LINIT45I  PIC X(2).
           02  LINIT55L    COMP  PIC  S9(4).
           02  LINIT55F    PICTURE X.
           02  FILLER REDEFINES LINIT55F.
             03 LINIT55A    PICTURE X.
           02  LINIT55I  PIC X(2).
           02  LINIT65L    COMP  PIC  S9(4).
           02  LINIT65F    PICTURE X.
           02  FILLER REDEFINES LINIT65F.
             03 LINIT65A    PICTURE X.
           02  LINIT65I  PIC X(2).
           02  LINIT75L    COMP  PIC  S9(4).
           02  LINIT75F    PICTURE X.
           02  FILLER REDEFINES LINIT75F.
             03 LINIT75A    PICTURE X.
           02  LINIT75I  PIC X(2).
           02  LINIT85L    COMP  PIC  S9(4).
           02  LINIT85F    PICTURE X.
           02  FILLER REDEFINES LINIT85F.
             03 LINIT85A    PICTURE X.
           02  LINIT85I  PIC X(2).
           02  LINIT95L    COMP  PIC  S9(4).
           02  LINIT95F    PICTURE X.
           02  FILLER REDEFINES LINIT95F.
             03 LINIT95A    PICTURE X.
           02  LINIT95I  PIC X(2).
           02  LINIT16L    COMP  PIC  S9(4).
           02  LINIT16F    PICTURE X.
           02  FILLER REDEFINES LINIT16F.
             03 LINIT16A    PICTURE X.
           02  LINIT16I  PIC X(2).
           02  LINIT26L    COMP  PIC  S9(4).
           02  LINIT26F    PICTURE X.
           02  FILLER REDEFINES LINIT26F.
             03 LINIT26A    PICTURE X.
           02  LINIT26I  PIC X(2).
1
           02  LINIT36L    COMP  PIC  S9(4).
           02  LINIT36F    PICTURE X.
           02  FILLER REDEFINES LINIT36F.
             03 LINIT36A    PICTURE X.
           02  LINIT36I  PIC X(2).
           02  LINIT46L    COMP  PIC  S9(4).
           02  LINIT46F    PICTURE X.
           02  FILLER REDEFINES LINIT46F.
             03 LINIT46A    PICTURE X.
           02  LINIT46I  PIC X(2).
           02  LINIT56L    COMP  PIC  S9(4).
           02  LINIT56F    PICTURE X.
           02  FILLER REDEFINES LINIT56F.
             03 LINIT56A    PICTURE X.
           02  LINIT56I  PIC X(2).
           02  LINIT66L    COMP  PIC  S9(4).
           02  LINIT66F    PICTURE X.
           02  FILLER REDEFINES LINIT66F.
             03 LINIT66A    PICTURE X.
           02  LINIT66I  PIC X(2).
           02  LINIT76L    COMP  PIC  S9(4).
           02  LINIT76F    PICTURE X.
           02  FILLER REDEFINES LINIT76F.
             03 LINIT76A    PICTURE X.
           02  LINIT76I  PIC X(2).
           02  LINIT86L    COMP  PIC  S9(4).
           02  LINIT86F    PICTURE X.
           02  FILLER REDEFINES LINIT86F.
             03 LINIT86A    PICTURE X.
           02  LINIT86I  PIC X(2).
           02  LINIT96L    COMP  PIC  S9(4).
           02  LINIT96F    PICTURE X.
           02  FILLER REDEFINES LINIT96F.
             03 LINIT96A    PICTURE X.
           02  LINIT96I  PIC X(2).
           02  PFKEYSL    COMP  PIC  S9(4).
           02  PFKEYSF    PICTURE X.
           02  FILLER REDEFINES PFKEYSF.
             03 PFKEYSA    PICTURE X.
           02  PFKEYSI  PIC X(70).
           02  MAPMSGL    COMP  PIC  S9(4).
           02  MAPMSGF    PICTURE X.
           02  FILLER REDEFINES MAPMSGF.
             03 MAPMSGA    PICTURE X.
           02  MAPMSGI  PIC X(4).
       01  SLST79RO REDEFINES SLST79RI.
           02  FILLER PIC X(12).
           02  FILLER PICTURE X(3).
           02  SELECTO  PIC X(1).
           02  FILLER PICTURE X(3).
           02  RPTYEARO  PIC X(4).
           02  FILLER PICTURE X(3).
           02  FEEPCT2O  PIC X(2).
           02  FILLER PICTURE X(3).
           02  FEECDE2O  PIC X(2).
           02  FILLER PICTURE X(3).
           02  INTRAT2O  PIC X(7).
           02  FILLER PICTURE X(3).
           02  RPTQTRO  PIC X(1).
           02  FILLER PICTURE X(3).
           02  LENDRIDO  PIC X(6).
1
           02  FILLER PICTURE X(3).
           02  INTRAT3O  PIC X(3).
           02  FILLER PICTURE X(3).
           02  BILLCD3O  PIC X(2).
           02  FILLER PICTURE X(3).
           02  FUNDSRCO  PIC X(6).
           02  FILLER PICTURE X(3).
           02  SSN1O  PIC X(3).
           02  FILLER PICTURE X(3).
           02  SSN2O  PIC X(2).
           02  FILLER PICTURE X(3).
           02  SSN3O  PIC X(4).
           02  FILLER PICTURE X(3).
           02  YEAR4O  PIC X(2).
           02  FILLER PICTURE X(3).
           02  QTR4O  PIC X(1).
           02  FILLER PICTURE X(3).
           02  SPALCA4O  PIC X(2).
           02  FILLER PICTURE X(3).
           02  LOANNUMO  PIC X(1).
           02  FILLER PICTURE X(3).
           02  LONTYP4O  PIC X(2).
           02  FILLER PICTURE X(3).
           02  INTRAT4O  PIC X(3).
           02  FILLER PICTURE X(3).
           02  BILLCD4O  PIC X(2).
           02  FILLER PICTURE X(3).
           02  SECT1O  PIC X(1).
           02  FILLER PICTURE X(3).
           02  SECT2O  PIC X(1).
           02  FILLER PICTURE X(3).
           02  SECT3O  PIC X(1).
           02  FILLER PICTURE X(3).
           02  SECT4O  PIC X(1).
           02  FILLER PICTURE X(3).
           02  SECT5O  PIC X(1).
           02  FILLER PICTURE X(3).
           02  LINIT15O  PIC X(2).
           02  FILLER PICTURE X(3).
           02  LINIT25O  PIC X(2).
           02  FILLER PICTURE X(3).
           02  LINIT35O  PIC X(2).
           02  FILLER PICTURE X(3).
           02  LINIT45O  PIC X(2).
           02  FILLER PICTURE X(3).
           02  LINIT55O  PIC X(2).
           02  FILLER PICTURE X(3).
           02  LINIT65O  PIC X(2).
           02  FILLER PICTURE X(3).
           02  LINIT75O  PIC X(2).
           02  FILLER PICTURE X(3).
           02  LINIT85O  PIC X(2).
           02  FILLER PICTURE X(3).
           02  LINIT95O  PIC X(2).
           02  FILLER PICTURE X(3).
           02  LINIT16O  PIC X(2).
           02  FILLER PICTURE X(3).
           02  LINIT26O  PIC X(2).
           02  FILLER PICTURE X(3).
           02  LINIT36O  PIC X(2).
1
           02  FILLER PICTURE X(3).
           02  LINIT46O  PIC X(2).
           02  FILLER PICTURE X(3).
           02  LINIT56O  PIC X(2).
           02  FILLER PICTURE X(3).
           02  LINIT66O  PIC X(2).
           02  FILLER PICTURE X(3).
           02  LINIT76O  PIC X(2).
           02  FILLER PICTURE X(3).
           02  LINIT86O  PIC X(2).
           02  FILLER PICTURE X(3).
           02  LINIT96O  PIC X(2).
           02  FILLER PICTURE X(3).
           02  PFKEYSO  PIC X(70).
           02  FILLER PICTURE X(3).
           02  MAPMSGO  PIC X(4).
1
 Now you type the following on the command line:

     COMMAND ===> mapredef map-

 Your map layout is converted to the following:

      /****************************************************************
      *                                                               *
      *****************************************************************
       01  MAP-SLST79R-AREA REDEFINES SLST79RI.
           05  FILLER                                  PIC  X(12).
      *****************************************************************
           05  MAP-SELECT-LENG                         PIC S9(04) COMP.
           05  MAP-SELECT-FLAG                         PIC  X(01).
           05  MAP-SELECT-ATTR REDEFINES
               MAP-SELECT-FLAG                         PIC  X(01).
           05  MAP-SELECT                              PIC  X(01).
      *****************************************************************
           05  MAP-RPTYEAR-LENG                        PIC S9(04) COMP.
           05  MAP-RPTYEAR-FLAG                        PIC  X(01).
           05  MAP-RPTYEAR-ATTR REDEFINES
               MAP-RPTYEAR-FLAG                        PIC  X(01).
           05  MAP-RPTYEAR                             PIC  X(04).
      *****************************************************************
           05  MAP-FEEPCT2-LENG                        PIC S9(04) COMP.
           05  MAP-FEEPCT2-FLAG                        PIC  X(01).
           05  MAP-FEEPCT2-ATTR REDEFINES
               MAP-FEEPCT2-FLAG                        PIC  X(01).
           05  MAP-FEEPCT2                             PIC  X(02).
      *****************************************************************
           05  MAP-FEECDE2-LENG                        PIC S9(04) COMP.
           05  MAP-FEECDE2-FLAG                        PIC  X(01).
           05  MAP-FEECDE2-ATTR REDEFINES
               MAP-FEECDE2-FLAG                        PIC  X(01).
           05  MAP-FEECDE2                             PIC  X(02).
      *****************************************************************
           05  MAP-INTRAT2-LENG                        PIC S9(04) COMP.
           05  MAP-INTRAT2-FLAG                        PIC  X(01).
           05  MAP-INTRAT2-ATTR REDEFINES
               MAP-INTRAT2-FLAG                        PIC  X(01).
           05  MAP-INTRAT2                             PIC  X(07).
      *****************************************************************
           05  MAP-RPTQTR-LENG                         PIC S9(04) COMP.
           05  MAP-RPTQTR-FLAG                         PIC  X(01).
           05  MAP-RPTQTR-ATTR REDEFINES
               MAP-RPTQTR-FLAG                         PIC  X(01).
           05  MAP-RPTQTR                              PIC  X(01).
      *****************************************************************
           05  MAP-LENDRID-LENG                        PIC S9(04) COMP.
           05  MAP-LENDRID-FLAG                        PIC  X(01).
           05  MAP-LENDRID-ATTR REDEFINES
               MAP-LENDRID-FLAG                        PIC  X(01).
           05  MAP-LENDRID                             PIC  X(06).
      *****************************************************************
           05  MAP-INTRAT3-LENG                        PIC S9(04) COMP.
           05  MAP-INTRAT3-FLAG                        PIC  X(01).
           05  MAP-INTRAT3-ATTR REDEFINES
               MAP-INTRAT3-FLAG                        PIC  X(01).
           05  MAP-INTRAT3                             PIC  X(03).
1
      *****************************************************************
           05  MAP-BILLCD3-LENG                        PIC S9(04) COMP.
           05  MAP-BILLCD3-FLAG                        PIC  X(01).
           05  MAP-BILLCD3-ATTR REDEFINES
               MAP-BILLCD3-FLAG                        PIC  X(01).
           05  MAP-BILLCD3                             PIC  X(02).
      *****************************************************************
           05  MAP-FUNDSRC-LENG                        PIC S9(04) COMP.
           05  MAP-FUNDSRC-FLAG                        PIC  X(01).
           05  MAP-FUNDSRC-ATTR REDEFINES
               MAP-FUNDSRC-FLAG                        PIC  X(01).
           05  MAP-FUNDSRC                             PIC  X(06).
      *****************************************************************
           05  MAP-SSN1-LENG                           PIC S9(04) COMP.
           05  MAP-SSN1-FLAG                           PIC  X(01).
           05  MAP-SSN1-ATTR REDEFINES
               MAP-SSN1-FLAG                           PIC  X(01).
           05  MAP-SSN1                                PIC  X(03).
      *****************************************************************
           05  MAP-SSN2-LENG                           PIC S9(04) COMP.
           05  MAP-SSN2-FLAG                           PIC  X(01).
           05  MAP-SSN2-ATTR REDEFINES
               MAP-SSN2-FLAG                           PIC  X(01).
           05  MAP-SSN2                                PIC  X(02).
      *****************************************************************
           05  MAP-SSN3-LENG                           PIC S9(04) COMP.
           05  MAP-SSN3-FLAG                           PIC  X(01).
           05  MAP-SSN3-ATTR REDEFINES
               MAP-SSN3-FLAG                           PIC  X(01).
           05  MAP-SSN3                                PIC  X(04).
      *****************************************************************
           05  MAP-YEAR4-LENG                          PIC S9(04) COMP.
           05  MAP-YEAR4-FLAG                          PIC  X(01).
           05  MAP-YEAR4-ATTR REDEFINES
               MAP-YEAR4-FLAG                          PIC  X(01).
           05  MAP-YEAR4                               PIC  X(02).
      *****************************************************************
           05  MAP-QTR4-LENG                           PIC S9(04) COMP.
           05  MAP-QTR4-FLAG                           PIC  X(01).
           05  MAP-QTR4-ATTR REDEFINES
               MAP-QTR4-FLAG                           PIC  X(01).
           05  MAP-QTR4                                PIC  X(01).
      *****************************************************************
           05  MAP-SPALCA4-LENG                        PIC S9(04) COMP.
           05  MAP-SPALCA4-FLAG                        PIC  X(01).
           05  MAP-SPALCA4-ATTR REDEFINES
               MAP-SPALCA4-FLAG                        PIC  X(01).
           05  MAP-SPALCA4                             PIC  X(02).
      *****************************************************************
           05  MAP-LOANNUM-LENG                        PIC S9(04) COMP.
           05  MAP-LOANNUM-FLAG                        PIC  X(01).
           05  MAP-LOANNUM-ATTR REDEFINES
               MAP-LOANNUM-FLAG                        PIC  X(01).
           05  MAP-LOANNUM                             PIC  X(01).
      *****************************************************************
           05  MAP-LONTYP4-LENG                        PIC S9(04) COMP.
           05  MAP-LONTYP4-FLAG                        PIC  X(01).
           05  MAP-LONTYP4-ATTR REDEFINES
               MAP-LONTYP4-FLAG                        PIC  X(01).
           05  MAP-LONTYP4                             PIC  X(02).
1
      *****************************************************************
           05  MAP-INTRAT4-LENG                        PIC S9(04) COMP.
           05  MAP-INTRAT4-FLAG                        PIC  X(01).
           05  MAP-INTRAT4-ATTR REDEFINES
               MAP-INTRAT4-FLAG                        PIC  X(01).
           05  MAP-INTRAT4                             PIC  X(03).
      *****************************************************************
           05  MAP-BILLCD4-LENG                        PIC S9(04) COMP.
           05  MAP-BILLCD4-FLAG                        PIC  X(01).
           05  MAP-BILLCD4-ATTR REDEFINES
               MAP-BILLCD4-FLAG                        PIC  X(01).
           05  MAP-BILLCD4                             PIC  X(02).
      *****************************************************************
           05  MAP-SECT1-LENG                          PIC S9(04) COMP.
           05  MAP-SECT1-FLAG                          PIC  X(01).
           05  MAP-SECT1-ATTR REDEFINES
               MAP-SECT1-FLAG                          PIC  X(01).
           05  MAP-SECT1                               PIC  X(01).
      *****************************************************************
           05  MAP-SECT2-LENG                          PIC S9(04) COMP.
           05  MAP-SECT2-FLAG                          PIC  X(01).
           05  MAP-SECT2-ATTR REDEFINES
               MAP-SECT2-FLAG                          PIC  X(01).
           05  MAP-SECT2                               PIC  X(01).
      *****************************************************************
           05  MAP-SECT3-LENG                          PIC S9(04) COMP.
           05  MAP-SECT3-FLAG                          PIC  X(01).
           05  MAP-SECT3-ATTR REDEFINES
               MAP-SECT3-FLAG                          PIC  X(01).
           05  MAP-SECT3                               PIC  X(01).
      *****************************************************************
           05  MAP-SECT4-LENG                          PIC S9(04) COMP.
           05  MAP-SECT4-FLAG                          PIC  X(01).
           05  MAP-SECT4-ATTR REDEFINES
               MAP-SECT4-FLAG                          PIC  X(01).
           05  MAP-SECT4                               PIC  X(01).
      *****************************************************************
           05  MAP-SECT5-LENG                          PIC S9(04) COMP.
           05  MAP-SECT5-FLAG                          PIC  X(01).
           05  MAP-SECT5-ATTR REDEFINES
               MAP-SECT5-FLAG                          PIC  X(01).
           05  MAP-SECT5                               PIC  X(01).
      *****************************************************************
           05  MAP-LINIT15-LENG                        PIC S9(04) COMP.
           05  MAP-LINIT15-FLAG                        PIC  X(01).
           05  MAP-LINIT15-ATTR REDEFINES
               MAP-LINIT15-FLAG                        PIC  X(01).
           05  MAP-LINIT15                             PIC  X(02).
      *****************************************************************
           05  MAP-LINIT25-LENG                        PIC S9(04) COMP.
           05  MAP-LINIT25-FLAG                        PIC  X(01).
           05  MAP-LINIT25-ATTR REDEFINES
               MAP-LINIT25-FLAG                        PIC  X(01).
           05  MAP-LINIT25                             PIC  X(02).
      *****************************************************************
           05  MAP-LINIT35-LENG                        PIC S9(04) COMP.
           05  MAP-LINIT35-FLAG                        PIC  X(01).
           05  MAP-LINIT35-ATTR REDEFINES
               MAP-LINIT35-FLAG                        PIC  X(01).
           05  MAP-LINIT35                             PIC  X(02).
1
      *****************************************************************
           05  MAP-LINIT45-LENG                        PIC S9(04) COMP.
           05  MAP-LINIT45-FLAG                        PIC  X(01).
           05  MAP-LINIT45-ATTR REDEFINES
               MAP-LINIT45-FLAG                        PIC  X(01).
           05  MAP-LINIT45                             PIC  X(02).
      *****************************************************************
           05  MAP-LINIT55-LENG                        PIC S9(04) COMP.
           05  MAP-LINIT55-FLAG                        PIC  X(01).
           05  MAP-LINIT55-ATTR REDEFINES
               MAP-LINIT55-FLAG                        PIC  X(01).
           05  MAP-LINIT55                             PIC  X(02).
      *****************************************************************
           05  MAP-LINIT65-LENG                        PIC S9(04) COMP.
           05  MAP-LINIT65-FLAG                        PIC  X(01).
           05  MAP-LINIT65-ATTR REDEFINES
               MAP-LINIT65-FLAG                        PIC  X(01).
           05  MAP-LINIT65                             PIC  X(02).
      *****************************************************************
           05  MAP-LINIT75-LENG                        PIC S9(04) COMP.
           05  MAP-LINIT75-FLAG                        PIC  X(01).
           05  MAP-LINIT75-ATTR REDEFINES
               MAP-LINIT75-FLAG                        PIC  X(01).
           05  MAP-LINIT75                             PIC  X(02).
      *****************************************************************
           05  MAP-LINIT85-LENG                        PIC S9(04) COMP.
           05  MAP-LINIT85-FLAG                        PIC  X(01).
           05  MAP-LINIT85-ATTR REDEFINES
               MAP-LINIT85-FLAG                        PIC  X(01).
           05  MAP-LINIT85                             PIC  X(02).
      *****************************************************************
           05  MAP-LINIT95-LENG                        PIC S9(04) COMP.
           05  MAP-LINIT95-FLAG                        PIC  X(01).
           05  MAP-LINIT95-ATTR REDEFINES
               MAP-LINIT95-FLAG                        PIC  X(01).
           05  MAP-LINIT95                             PIC  X(02).
      *****************************************************************
           05  MAP-LINIT16-LENG                        PIC S9(04) COMP.
           05  MAP-LINIT16-FLAG                        PIC  X(01).
           05  MAP-LINIT16-ATTR REDEFINES
               MAP-LINIT16-FLAG                        PIC  X(01).
           05  MAP-LINIT16                             PIC  X(02).
      *****************************************************************
           05  MAP-LINIT26-LENG                        PIC S9(04) COMP.
           05  MAP-LINIT26-FLAG                        PIC  X(01).
           05  MAP-LINIT26-ATTR REDEFINES
               MAP-LINIT26-FLAG                        PIC  X(01).
           05  MAP-LINIT26                             PIC  X(02).
      *****************************************************************
           05  MAP-LINIT36-LENG                        PIC S9(04) COMP.
           05  MAP-LINIT36-FLAG                        PIC  X(01).
           05  MAP-LINIT36-ATTR REDEFINES
               MAP-LINIT36-FLAG                        PIC  X(01).
           05  MAP-LINIT36                             PIC  X(02).
      *****************************************************************
           05  MAP-LINIT46-LENG                        PIC S9(04) COMP.
           05  MAP-LINIT46-FLAG                        PIC  X(01).
           05  MAP-LINIT46-ATTR REDEFINES
               MAP-LINIT46-FLAG                        PIC  X(01).
           05  MAP-LINIT46                             PIC  X(02).
1
      *****************************************************************
           05  MAP-LINIT56-LENG                        PIC S9(04) COMP.
           05  MAP-LINIT56-FLAG                        PIC  X(01).
           05  MAP-LINIT56-ATTR REDEFINES
               MAP-LINIT56-FLAG                        PIC  X(01).
           05  MAP-LINIT56                             PIC  X(02).
      *****************************************************************
           05  MAP-LINIT66-LENG                        PIC S9(04) COMP.
           05  MAP-LINIT66-FLAG                        PIC  X(01).
           05  MAP-LINIT66-ATTR REDEFINES
               MAP-LINIT66-FLAG                        PIC  X(01).
           05  MAP-LINIT66                             PIC  X(02).
      *****************************************************************
           05  MAP-LINIT76-LENG                        PIC S9(04) COMP.
           05  MAP-LINIT76-FLAG                        PIC  X(01).
           05  MAP-LINIT76-ATTR REDEFINES
               MAP-LINIT76-FLAG                        PIC  X(01).
           05  MAP-LINIT76                             PIC  X(02).
      *****************************************************************
           05  MAP-LINIT86-LENG                        PIC S9(04) COMP.
           05  MAP-LINIT86-FLAG                        PIC  X(01).
           05  MAP-LINIT86-ATTR REDEFINES
               MAP-LINIT86-FLAG                        PIC  X(01).
           05  MAP-LINIT86                             PIC  X(02).
      *****************************************************************
           05  MAP-LINIT96-LENG                        PIC S9(04) COMP.
           05  MAP-LINIT96-FLAG                        PIC  X(01).
           05  MAP-LINIT96-ATTR REDEFINES
               MAP-LINIT96-FLAG                        PIC  X(01).
           05  MAP-LINIT96                             PIC  X(02).
      *****************************************************************
           05  MAP-PFKEYS-LENG                         PIC S9(04) COMP.
           05  MAP-PFKEYS-FLAG                         PIC  X(01).
           05  MAP-PFKEYS-ATTR REDEFINES
               MAP-PFKEYS-FLAG                         PIC  X(01).
           05  MAP-PFKEYS                              PIC  X(70).
      *****************************************************************
           05  MAP-MAPMSG-LENG                         PIC S9(04) COMP.
           05  MAP-MAPMSG-FLAG                         PIC  X(01).
           05  MAP-MAPMSG-ATTR REDEFINES
               MAP-MAPMSG-FLAG                         PIC  X(01).
           05  MAP-MAPMSG                              PIC  X(04).

 Now you can do more changes on the 7 character field name, but much of the
 change has been done for you.  You may want to look at the ECHANGE edit macro,
 assigned to a PF key, to aid in the remaining conversion.
            


Leave a Reply

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