Source conversion utility (scu) options
Multiple options are available in the source conversion
utility (scu
) for source program conversion.
The scu
command has the following
syntax:
Option descriptions:
- -7
- If
a line starts with a special character, the -7 option
detects and moves the character to column 7 (the indicator area of
fixed or extended format). The special character here can be an asterisk
'*', slash '/', dollar sign '$', character 'D' followed by space and
'd' followed by space. The characters that follow the moved special
character are handled depending on their positions:
- If the following characters are in column 2 - 7, the entire line is moved to the right until the special character is in column 7.
- If the following characters are in Area A or B, they remain where they are, unless there are characters in column 73 or beyond. When there are characters in column 73 or beyond, the characters might be moved left to the start of Area B.
Notes:- For a dollar sign '$',
scu
issues an error that states manual intervention is required for this line. - The special character '-' as the first character of a line is moved to column 7 only when you specify both the -f and -7 options or when the -f option is specified and '-' is in column 1.
- For special characters that are not in column
7 or are not moved
to column 7,
scu
handles these characters as regular (non-special) ones.
- -b
- Removes trailing blanks.
- -e
- Indicates
whether an input file is in extended source format of
a 252-character line. This option allows
scu
to distinguish the extended format from the default fixed format and covert the source code correctly. - -E
- Tells
scu
that the output (the converted source) is not limited to the default 72 columns (the fixed format).scu
can extend the lines to the maximum length of 252 columns if necessary. - -f
- Identifies the input source as
being in free format. By default
the fixed (compatible) source format allows executable COBOL source
code in Area A (column 8 - 11), and Area B (column 12 - 72), with
indicators in column 7. Optionally, if you specify -e,
Area B is extended to column 252 for the input file. The -f option
causes
scu
to move COBOL source code from column 1 - 6 to the indicator column, Area A, or Area B depending on the content of the source code to be moved. - -G<copybook output directory name>
- Fixes COPY files and places them in the specified directory. For
a COPY file that is qualified with a directory name, the directory
name is kept as the subdirectory of the specified COPY file directory.
If the -G option is not specified, only
the main source file is fixed.Note: Do not insert spaces between -G and <copybook output directory name>.
- -h
- Provides
scu
basic help with information about the available functions ofscu
. You can also specify -\? to display the same help information as -h does. For more detailed help, see thescu
man page by running the commandman scu
. - -I<copybook input directory name>
- Adds the specified path to
the directories to be searched for
copybooks if a library-name or SYSLIB is not specified. Notes:
- This option is the uppercase letter I, not the lowercase letter l.
- Only a single path is allowed for each -I option. To add multiple paths, use multiple -I options.
- Do not insert spaces between -I and <copybook input directory name>.
- COPY files that are retrieved
from an -I directory,
fixed by
scu
and stored in the-G directory can then be picked up by specifying -I and the same -G directory. In this way,scu
uses a fixed version of the copy file on subsequent runs against the same or different main source files.
- -L
- Indents level numbers other than 01 and 77 to Area B when the level numbers are in Area A.
- -M
- Issues
a
scu
fix code (for example, SCU0001) at the end of each fixed line and provides a short description and summary at the bottom of the output file. When standard compatible COBOL is input and the option -M is specified, ascu
fix code is added to the unused noncompilable columns (starting at column 82) to indicate that the line is changed. A summary is also provided to display fix information that is associated with each fix code. The fix codes and summary are provided for syntax and semantic changes, not for the initial transformation changes. For example, when you specify -f to convert a file of free format to fixed 80 column or extended format, the line changes are made but you do not receive ascu
fix code. - -N
- Enables
scu
to do only the initial transformation changes without syntax and semantic changes, and forces the output to be written to the standard output. - -o <output filename>
- Specifies the output file name for the
source file. The output
file can be qualified with an existing directory. For example, the
command scu -o/dirname1/abc.modified.cbl abc.cbl saves
the output file
abc.modified.cbl
in the /dirname1 directory. By default the output file is saved in your current directory. If the -o option is not specified, the output file for the source file would beabc.scu.cbl
. - -s
- Removes the leading and trailing sequence numbers by blanking columns 1-6 and truncating the source line at column 73.
- -t <tabwidth>
- Passes to
scu
the tab width that is used in the source code to ensure that the converted data is in correct columns. Tab characters that are encountered before a tab position are replaced by spaces sufficient to move the ensuing character to the tab position. The default tab width is 8. - -t <tabstop>,...
- Passes to
scu
the tab stops for conversion. Specify two or more tab stops separated by commas. Tab characters encountered past the last tab position are replaced by a single space character. - -v
- Enables verbose output so that
error and fix information is sent
to
STDERR
during the source transformation, syntax and semantic checking, and fixing. - -V
- Displays the version information of
scu
.
Copybooks
and scu
:
It
is a good practice to have all copybooks go through transformation
changes before scu
attempts to fix syntax and semantic
errors, because currently scu
does not automatically
perform transformation changes on copybooks. You can first run scu
for
your copybooks by specifying the -N option
with any other transformation options, such as -7, -b, -e, -E, -f, -L, -s,
and -t. Then, run scu
for
the main source files and specify -I with
the copybook directory that contains the transformed copybooks for
syntax and semantic error processing.