Batch Conversion : Command Line Interface

Keywood Computer Services have developed a program that can perform a variety of JSP-related file conversion and code generation tasks. Called simply the Generator, it is used as a back-end by the Keywood graphical user interface tools but you can also use it stand-alone via a Windows command file called GENERATOR.BAT.

The Generator can perform the following tasks:

The three different kinds of code generation listed above are all really variations on the same thing because the Generator can only really generate COBOL source from a single JSP-COBOL file. However it can create such a single JSP-COBOL file from fragments extracted from various sources - i.e. the header, operation and condition sections of PDF and JSP Tool files, and text extracted from Copy and Macro Libraries.

A Replacement for the MJSL JSP-COBOL Processor

The COBOL code generation facilities of the Keywood Generator are a replacement for the original JSP-COBOL processor produced by Michael Jackson Systems Ltd in the 1970's.

When Keywood embarked on creating the JSP-COBOL processor replacement there were two possible approaches:

The first approach would have been the easiest, but the second was chosen because it enabled verification of the Keywood Generator by simple comparison of the generated code.

The code generated by the Keywood Generator is lexically equivalent to that generated by the original rather than being character-for-character identical. This means that the generated code contains the same sequence of reserved words, punctuation marks, literals and identifiers as would have been produced by the original, but there may be minor differences in the spacing, line breaks, line sequence numbers and comments.

To verify the Generator, Keywood developed a Lexical Comparator that compares two COBOL files and reports on any differences. This comparator can be invoked via a Windows command file called COMPARATOR.BAT.