MHtran-2
Take a closer look at this MHtran-2 report by examining the following details of its unique features.

1
01  COB2-YYMMDD.                                                         *****   GENERATED
    02      COB2-YYMMDD-YY                        PIC 99.                *****   GENERATED
    02      COB2-YYMMDD-MM                        PIC 99.                *****   GENERATED
    02      COB2-YYMMDD-DD                        PIC 99.                *****   GENERATED
01  COB2-CURRENT-DATE                                                    *****   GENERATED
    02      COB2-CURRENT-MM                       PIC XX.                *****   GENERATED
    02      FILLER PIC X VALUE '/'.                                      *****   GENERATED
    02      COB2-CURRENT-DD                       PIC XX.                *****   GENERATED
    02      FILLER PIC X VALUE '/'.                                      *****   GENERATED
    02      COB2-CURRENT-YY                       PIC XX.                *****   GENERATED
    ...
    ...
    ...
    MOVE    CURRENT-DATE TO REPT-RUN-DATE.                               *****               DELETED
    ACCEPT  COB2-YYMMDD FROM DATE                                        *****   GENERATED
    MOVE    COB2-YYMMDD-MM TO COB2-CURRENT-MM                            *****   GENERATED
    MOVE    COB2-YYMMDD-DD TO COB2-CURRENT-DD                            *****   GENERATED
    MOVE    COB2-YYMMDD-YY TO COB2-CURRENT-YY                            *****   GENERATED
    MOVE    COB2-CURRENT-DATE TO REPT-RUN-DATE.                          *****   GENERATED
    ...
    ...
    ...

2
    05      DAY-OF-WEEK                           PIC 9   VALUE ZERO.    *****               DELETED
    05      COB2-DAY-OF-WEEK                      PIC 9   VALUE ZERO.    *****   GENERATED

3
    EXAMINE DESCRIPTION REPLACING ALL '?'  BY ' '                        *****               DELETED
    INSPECT DESCRIPTION REPLACING ALL '?'  BY ' '                        *****   GENERATED
    ...
    ...
    ...
    TRANSFORM PH41NRI [PH41IND] CHARACTERS FROM LOW-VALUE TO SPACE       *****               DELETED
    INSPECT PH41NRI [PH41IND] REPLACING ALL LOW-VALUE BY SPACE           *****   GENERATED

4
    WRITE PRINTOUT AFTER POSITIONING DETAIL-CC.                          *****               DELETED
    MOVE DETAIL-CC TO COB2-CC                                            *****   GENERATED
    PERFORM COB2-WRITE-PRINTOUT THRU COB2-WRITE-PRINTOUT-EXIT.           *****   GENERATED
      *
      *
      *
COB2-WRITE-PRINTOUT SECTION.                                             *****   GENERATED
    EVALUATE COB2-CC                                                     *****   GENERATED
      WHEN SPACES                                                        *****   GENERATED
       MOVE 1 TO COB2-CONVERT-POSITION                                   *****   GENERATED
      WHEN ZERO                                                          *****   GENERATED
       MOVE 2 TO COB2-CONVERT-POSITION                                   *****   GENERATED
      WHEN '-'                                                           *****   GENERATED
       MOVE 3 TO COB2-CONVERT-POSITION                                   *****   GENERATED
      WHEN '+'                                                           *****   GENERATED
       MOVE ZERO TO COB2-CONVERT-POSITION                                *****   GENERATED
      WHEN '1'                                                           *****   GENERATED
       MOVE -1 TO COB2-CONVERT-POSITION                                  *****   GENERATED
      WHEN OTHER                                                         *****   GENERATED
       DISPLAY '  UNABLE TO TRANSLATE POSITIONING DATA-NAME.'            *****   GENERATED
    END-EVALUATE                                                         *****   GENERATED
    IF COB2-CONVERT-POSITION NOT =-1                                     *****   GENERATED
      WRITE PRINTOUT AFTER ADVANCING COB2-CONVERT-POSITION               *****   GENERATED
    ELSE                                                                 *****   GENERATED
      WRITE PRINTOUT AFTER ADVANCING PAGE                                *****   GENERATED
    END-IF.                                                              *****   GENERATED
    SKIP1                                                                *****   GENERATED
COB2-WRITE-PRINTOUT-EXIT.                                                *****   GENERATED
    EXIT.                                                                *****   GENERATED

5
01  SRW-WORK-AREA  COPY  SRWJHL.                                         *****               DELETED
                   COPY  SRWJHL REPLACING SRW-COPY-AREA BY SRW-WORK-AREA *****   GENERATED
01  SRW-COPY-AREA.                                                       C

6
LINKAGE SECTION.
01  BLL-CELLS.                                                           *****               DELETED
    03         FILLER                             PIC  S9 [8] COMP.      *****               DELETED
    03         MAP410                             PIC  S9 [8] COMP.      *****               DELETED
    03         PHREC                              PIC  S9 [8] COMP.      *****               DELETED
    ...
    ...
    ...
               EXEC CICS GETMAIN SET [MAP410] LENGTH [MPLEN]             *****               DELETED
               EXEC CICS GETMAIN SET [ADDRESS OF PHDS410] LENGTH [MPLEN] *****   GENERATED
    ...
    ...
    ...
    SERVICE RELOAD PHREC.                                                *****               DELETED

7
    IF TRAN-IND GREATER THEN TRAN-MAX                                    *****               DELETED
    IF TRAN-IND GREATER THAN TRAN-MAX                                    *****   GENERATED
    ...
    ...
    ...
    IF SRWSR-ADJ-DATE-COST-RET > THAN ZEROS                              *****               DELETED
    IF SRWSR-ADJ-DATE-COST-RET >      ZEROS                              *****   GENERATED
    ...
    ...
    ...
    SORT SORT-FILE ON ASCENDING KEY IS      SORT-MAIN-KEY                *****               DELETED
    SORT SORT-FILE ON ASCENDING KEY         SORT-MAIN-KEY                *****   GENERATED

8a
    READY USAGE-MODE IS EXCLUSIVE UPDATE.

8b
    MOVE USAGE-MODE TO SAVE-USAGE-MODE.                                  *****               DELETED
    MOVE COB2-USAGE-MODE TO SAVE-USAGE-MODE.                             *****   GENERATED

9
++INCLUDE MISCWORK
01  MISC-WORK-AREAS.                                                     P
    05    STORE-VSAM-RETURN-CODE                  PIC X [2] VALUE SPACE. P
    05    ABORTCODE                               PIC 9 [4] VALUE 4092.  P

10
    ON 1                                                                 *****               DELETED
    ADD 1 TO COB2-ON-COUNT-001                                           *****   GENERATED
    IF COB2-ON-COUNT-001              = 1                                *****   GENERATED
Features facilitating precise translation
When you make MHtran-2 part of your COBOL migration process, you're taking advantage of the latest in migration technology.


CURRENT-DATE, one of the most common constructs, is not valid in VS COBOL II. Adjusting this command manually requires a multi-step process; MHtran-2 reformats syntax to the new ACCEPT FROM DATE (or CICS ASKTIME) automatically — in just one step. (Back to top of page.)


There are over 100 additional reserved words in VS COBOL II. DAY-OF-WEEK, for example, was used in this program as a field name. With MHtran-2, user-coded names that are now among the new VS COBOL II reserved words are prefixed to make them non-reserved words. You can select the prefix. (Back to top of page.)


MHtran-2 analyzes verbs and automatically translates them to their appropriate VS COBOL II equivalent. In this example, TRANSFORM and EXAMINE were changed to the new INSPECT syntax. (Back to top of page.)


Translating this command is straightforward in cases where the positioning quantity is specified. In this example, however, a variable must be interrogated to determine the positioning amount. The generated code then determines the case and executes the appropriate format of WRITE AFTER ADVANCING. (Back to top of page.)


MHtran-2 automatically translates LANGLVL (1) COPY format to VS COBOL II syntax. (Back to top of page.)


MHtran-2 replaces the construct of BLL-n with ADDRESS of dataname-n. The translator also provides for cases where multiple BLLs were required for a given dataname. (Back to top of page.)


Unlike its predecessor, the VS COBOL II compiler requires strict adherence to syntax rules. MHtran-2 corrects many syntax errors in old programs, allowing them to be compiled successfully. (Back to top of page.)


IDMS uses over 30 of the words that are newly reserved in VS COBOL II. When the IDMS option is set, MHtran-2 will not translate IDMS reserved words, allowing them to operate as before. For example: (a) shows the handling of a new reserved word during the translation of an IDMS program; (b) illustrates the handling of the same word during a non-IDMS translation. (Back to top of page.)


MHtran-2 handles CA-Panvalet and CA-Librarian included text as simply as it does COPYs. The included text is logically merged with the program for translation, then translated and output separately to the appropriate library. (Back to top of page.)


Since the ON condition is not supported by VS COBOL II, MHtran-2 sets up a counter for each ON conditional, increments it, and then tests it with an IF statement. (Back to top of page.)

This is just a sampling. Contact us for more information on the other powerful features of MHtran-2.

Back to the MHtran-2 product page.

About PRINCE Software prods and Services News and Highlights Partners Contact Us © PRINCE Software, Inc.
A Division of Corporate Technologies, LLC