Using the REFORMATUtility

14.1 Running the REFORMATUtility

REFORMAT -
REFORMAT - Enter Y for ANSI-to-terminal conversion, or
REFORMAT - Enter N (default) for terminal-to-ANSI conversion.
REFORMAT - Enter ^Z to exit.
REFORMAT - ANSI-to-terminal format conversion mode [ Y / [N] ]? n
REFORMAT - Terminal-to-ANSI format selected
REFORMAT - Terminal-format input file spec : myprog.cob
REFORMAT - ANSI-format output file spec: myprog2.cob
REFORMAT - Columns 73 to 80:
REFORMAT - 42 Terminal source code records converted to ANSI format
REFORMAT -
REFORMAT - Enter Y for ANSI-to-terminal conversion, or
REFORMAT - Enter N (default) for terminal-to-ANSI conversion.
REFORMAT - Enter ^Z to exit.
REFORMAT - ANSI-to-terminal format conversion mode [ Y / [N] ]? ^Z
REFORMAT -
In the preceding example, the following events took place:
1. Theuser typed n in response to the first prompt, indicating a desire to
convert a file from Terminal to ANSI format (the user could have simply
pressed Return, as the default direction is Terminal-to-ANSI).
2. Theuser typed myprog.cob in response to the prompt for an input file spec.
3. Theuser typed myprog2.cob in response to the prompt for an output file spec.
4. Theprogram next prompted for an identification entry in columns 73 to 80,
and the user simply pressed Return.
5. Endingthat dialog, the program reported that it converted 42 source code
records.
6. Theprogram then repeated the original prompts, to which the user replied
with a Ctrl/Z.
The Ctrl/Z ends this reformatting session.
14.2 ANSI-to-Terminal Format Conversion
REFORMAT converts each ANSI format source line to terminal format by:
Removing the 6-character sequence field in the first six character positions of
the ANSI format line
Moving any continuation symbol (- ) or comment symbols (* or /) from
character position 7 into character position 1
Moving the conditional compilation character (if any) from the ANSI format
indicator area into character position 2 and inserting a backslash character
(\ ) into character position 1 of the terminal format line
Removing the identification entry field in character positions 73 to 80 of the
ANSI format line
Removing insignificant trailing spaces before character position 73 of the
ANSI format line
Replacing every form-feed record with a line containing a slash (/ ) in
character position 1
142Using the REFORMAT Utility