Using the REFORMAT Utility
14.1 Running the REFORMAT Utility
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.
The user 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.
The user typed myprog.cob in response to the prompt for an input file spec.
3.
The user typed myprog2.cob in response to the prompt for an output file spec.
4.
The program next prompted for an identification entry in columns 73 to 80,
and the user simply pressed Return.
5.
Ending that dialog, the program reported that it converted 42 source code
records.
6.
The program 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
14–2 Using the REFORMAT Utility
Содержание COBOL AAQ2G1FTK
Страница 22: ......
Страница 30: ......
Страница 94: ......
Страница 110: ......
Страница 146: ......
Страница 180: ......
Страница 194: ...Processing Files and Records 6 1 Defi...
Страница 300: ......
Страница 490: ......
Страница 516: ......
Страница 517: ......
Страница 530: ......
Страница 534: ......
Страница 590: ......
Страница 620: ......