How does MHtran-2 work?
MHtran-2 reads the program source code and dynamically processes COPY members and/or CA-Librarian or CA-Panvalet INCLUDE members as needed from their libraries. It analyzes the program and during the first pass builds various tables, including symbol tables. A second pass performs the required changes and produces the converted source code, COPY/INCLUDE members and output listing. A summary record containing information about the module is written to a VSAM Migration Database. In addition to providing the required changes, MHtran-2 can do some other clean-up work on a program. This includes the ability to insert BLOCK CONTAINS ZERO for all files; flagging of console ACCEPT/DISPLAYs or converting them to SYSIN/SYSOUT; and displaying WHEN-COMPILED messages. MHtran-2 can also correct many syntax errors in existing programs, which the old compiler failed to detect. This allows them to be compiled successfully with the new, more stringent compiler.