Dismiss
InnovationQ will be updated on Sunday, Oct. 22, from 10am ET - noon. You may experience brief service interruptions during that time.
Browse Prior Art Database

COBOL Translator Method

IP.com Disclosure Number: IPCOM000085586D
Original Publication Date: 1976-Apr-01
Included in the Prior Art Database: 2005-Mar-02
Document File: 2 page(s) / 15K

Publishing Venue

IBM

Related People

Dunaief, WI: AUTHOR [+2]

Abstract

Described is a method and architecture for orderly migrations of COBOL programs. Specific implementation typically may solve the problems of detecting all ISAM-related usage in a COBOL program, converting these to equivalent DL/1 usage, preserving the remaining program logic, and providing a thorough "audit trail" of the translation. Much of such an implementation would be reusable to implement other migrations of COBOL programs.

This text was extracted from a PDF file.
This is the abbreviated version, containing approximately 50% of the total text.

Page 1 of 2

COBOL Translator Method

Described is a method and architecture for orderly migrations of COBOL programs. Specific implementation typically may solve the problems of detecting all ISAM-related usage in a COBOL program, converting these to equivalent DL/1 usage, preserving the remaining program logic, and providing a thorough "audit trail" of the translation. Much of such an implementation would be reusable to implement other migrations of COBOL programs.

The COBOL translator method reads a COBOL source program as input, changes ISAM-related usage to equivalent DL/1 usage, and produces a modified source program as an "audit" listing as output. The translator method may typically be implemented in IBM System/360 Assembler Language. The translator method comprises four major routines: recognition, support, output and translation.

The translation routine is particular to ISAM to DL/1 translation, while the first three are generally applicable to any of a variety of COBOL-source program migrations. All four routines manipulate source data in a single contiguous area of "core" (read-write) that contains: 1) the COBOL statement being processed, and 2) the table of information about each ISAM file whose usage is being converted to DL/1 usage.

In the general processing, as provided by the translation method, the recognition routine reads input cards, isolates each successive COBOL word, stores that word in the COBOL statement area, and matches the word with one of the several words permitted by a tabular description of COBOL language. The routine then updates the current "context" to determine the next set of permissible matches. This process continues until the tabular description indicates that ISAM-related usage has occurred, or that end-of-statement has been reached. ISAM-related usage invokes the translation routine which, depending on the specific usage, may add or access information in the table, and/or add, delete or change information in the COBOL statement.

The end-of-statement condition invokes the output routine, which maps the resulting words in the statement into cards and associated lines. The support routines are used by the other routines to find entries in the table, delete or insert material in storage, preserve the contiguity of storage after a deletion or insertion, and adjust "address registers" to reflect the shifts of storage contents.

The translation of ISAM to DL/1 requires two passes over the COBOL-source program: the first pass builds the table of file usage information, and the second produces the translated program based upon this information. Both passes recognize the COBOL-source program in the same way. Translation routine processing generally distinguishes "pass 1" from "pass 2". Outputs are produced only during the final pass.

The "audit" listing contains the following: 1. Deleted, changed-from or moved-from cards, marked "---". 2. Inserted, changed-to or moved-to cards, marked "+++". 3. Completely unchang...