Chapter Contents

Previous

Next
Compiler Options

Option Descriptions

alias ( -Kalias under USS)
specifies that the compiler should assume worst-case aliasing.

See The optimize Option for details about this option. This option can be used only with the optimize option.

arlib
under TSO, specifies an AR370 archive that is used to store the compiler's output. The form of this option is as follows:
arlib(archive)

The archive parameter specifies the data set name of the AR370 archive. If the data set belongs to another user, the fully qualified name of the data set must be given, and the name must be preceded and followed by three single quotes. For example:

'''userid.archive-name.AR'''

If the archive name is not quoted and does not have a final qualifier of AR, a final qualifier of AR is appended. arlib may be used in conjunction with the member option, which specifies the AR370 library member name. If you do not use the member option, the LC370 CLIST will use the member name of your source file if possible or prompt you to enter the member name.

armode
specifies that code that uses the ESA access registers may be generated. This option is required to compile code that uses far pointers. See Optimization and Far Pointers for more information on far pointers and access register mode.

asciiout ( -Kasciiout under USS)
requests ASCII translation of character and string literals. The default is noasciiout , and the minimum abbreviation is as . When the asciiout option is used, the compiler generates string literals and character literals using the ASCII character set instead of the default EBCDIC character set. String literals are translated from IBM Code Page 1047 to ISO 8559-1, the Latin-1 character set.

Use the asciiout option with extreme care. The run-time library expects all string and character literals to be in EBCDIC format. Therefore, when using the asciiout option, you should avoid calls to library functions that pass character or string literals unless great care is taken. For example, calls to printf , scanf, and so on that use literal format strings may not produce the intended results because the functions cannot interpret an ASCII format string.

sprintf(buffer, "Number of %s was %d.\n", things, n);
                        /* This won't work if ASCII is used! */

at ( -Kat under USS)
allows the use of the call-by-reference operator @ .

autoinst ( -Kautoinst under UNIX System Services)
The autoinst option controls automatic implicit instantiation of template functions and static data members of template classes. The compiler organizes the output object module so that COOL can arrange for only one copy of each template item to be included in the final program. In order to correctly perform the instantiation, the autoinst option must be enabled on a compilation unit that contains both a use of the item and its corresponding template identifier. (See the SAS/C C++ Development System User's Guide for information about templates and automatic instantiation.)

Note:    COOL must be used if this option is specified.  [cautionend]

bitfield n ( -Kbitfield= n under USS)
allows bitfields that are not int and specifies an allocation unit. This option requires that you specify the allocation unit n to be used for plain int bitfields. The values can be either 1, 2, or 4, which specifies that the allocation unit be a char , short , or long , respectively. See Noninteger bitfields for more details.

In TSO and under OS/390 batch, the bitfield option is specified as follows:

bitfield(value)

For example, the following indicates that bitfields that are not int are accepted and that the allocation unit for int bitfields is a short :

bi(2)

Under CMS, the bitfield option is specified as follows:

bitfield value

For example, the following indicates that bitfields that are not int are accepted and that the allocation unit for int bitfields is a long :

bitfield 4

bytealign ( -Kbytealign under USS)
aligns all data on byte boundaries. Most data items, including all those in structures, are generated with only character alignment. Because formal parameters are aligned according to normal IBM 370 conventions, even with the bytealign option, you can call functions compiled with byte alignment from functions that are not compiled with byte alignment and vice versa.

If functions compiled with and without byte alignment are to share the same structures, you must ensure that such structures have exactly the same layout. The layout is not exactly the same if any structure element does not fall on its usual boundary, for example, an int member's offset from the start of the structure is not divisible by 4. You can force such alignment by adding unreferenced elements of appropriate length between elements, as necessary. If a shared structure does contain elements with unusual alignment, you must compile all functions that reference the structure with the byte alignment option.

c
identifies the object code to be disassembled as code generated by the compiler. The negative ( noc ) means that the object code to be processed by the OMD was not generated by the compiler. c is an OMD-only option. See also omd and object .

-c (USS only)
specifies that only the compiler is to be run. After completion of compilation, the prelink and link steps are bypassed. Normally, these steps follow compilation under USS.

comnest ( -Kcomnest under USS)
allows nested comments.

complexity ( -Kcomplexity= n under USS)
specifies the maximum complexity the function can have and remain eligible for default inlining for functions that have not been defined using the __inline keyword. Used with optimize only.

Specify the complexity option as follows, where n is a value between 0 and 20 inclusive:

See The optimize Option for more details.

cxx ( -cxx under USS)
specifies that the source code being compiled is generated by the SAS/C++ translator. For more information on the cxx option, refer to the SAS/C C++ Development System User's Guide.

dbhook ( -Kdbhook under USS)
generates hooks in the object code that is generated by the compiler. When you compile a module with the debug option, the dbhook option is implied. dbhook can be used with the optimize option to enable limited debugging of optimized object code. The default is nodbhook . See The optimize Option for more details.

dbglib
specifies a debugger file qualifier that provides for customization of the destination of the debugger file.

For each platform, dbglib specifies something different:

ON MVS:
A SAS/C file specification that denotes a PDS. The filename is constructed using whatever is supplied, followed by ( sname ).

On CMS:
If the option specified starts with a ' / ', then it is assumed that this is either a ' //sf: ' file specification or an SFS path. In this case, the specification is prepended to the filename. For example,
dbglib(//sf:ted/)
will generate the name
//sf:/ted/sname.DB
If the option specified does not start with a ' / ' then it is considered to be a filemode, and will be appended to the filename. For example,
dbglib(d2)
will generate the name
sname.db.d2

On USS:
The option specified is a path name to be prepended to the filename. For example,
dbglib(/u/sasc/dbg/)
will generate a filename of
/u/sasc/dbg/sname.dbg370

The option has different defaults on the various platforms:

ON MVS:
dbglib(ddn:sysdblib)

On CMS:
dbglib(A)

On USS:
dbglib()

For the various platforms, the default filename has different forms:

On MVS:
ddn:sysdblib(sname)

On CMS:
sname.DB.A

On USS:
hfs:sname.dbg370

Note:   On USS and UNIX platforms, the sname is capitalized and remains so for debugger filename generation.  [cautionend]
The short form of this option is -db .

dbgmacro ( -Kdbgmacro under USS)
specifies that definitions of C macro names should be saved in the debugger file. Note that this substantially increases the size of the file.

dbgobj ( -Kdbgobj under OpenEditon)
The dbgobj option causes the compiler to place the debugging information in the output object file, instead of a separate debugger file. If the debugging information is not placed in the object file, you cannot debug the automatically instantiated objects.

If automatic instantiation is specified with the autoinst option, dbgobj is enabled automatically.

By default, the dbgobj option is off. The short form for the option is -xc . See the SAS/C C++ Development System User's Guide for information about templates and automatic instantiation.

Note:    COOL must be used if this option is specified.  [cautionend]

debug ( -Kdebug[= filename ] or -g under USS)
allows the use of the debugger to trace the execution of statements at runtime. For programs not compiled with debug , only calls can be traced. Note that if you use debug , lineno is implied. Also note that the debug option causes the compiler to suppress all optimizations as well as store and fetch variables to or from memory more often.

Under the USS shell, you can supply the name of the debugger symbol table file by specifying -Kdebug= filename. If -Kdebug without a filename or -g is specified, the debugger file is stored in an HFS file with a .dbg370 extension. The name of the default debugging file is derived from the source filename in the same way as the object file, except for the .dbg370 extension. See the object option for a description of this process. Note that you should not specify an explicit filename if you compile more than one source file at a time, since each individual compilation will overwrite the debugging file.

define ( -D[ sym = val ] under USS)
defines a symbol with an optional value. The following are further instructions for using define in different environments.

depth ( -Kdepth= n under USS)
specifies the maximum depth of function calls to be inlined. depth is used with optimize only. See The optimize Option for more information.

Specify depth as follows, where n is between 0 and 6 inclusive (the default is 3):

digraph ( -Kdigraph under UNIX System Services)
Digraph options enable the translation of the International Standard Organization (ISO) digraphs and/or the SAS/C digraph extensions.

A digraph is a two character representation for a character that may not be available in all environments. The different options allow you to enable subsets of the full diagraph support offered collectively by ISO and SAS/C. Digraph Descriptions gives a brief description of the new digraph compiler options.

Digraph Descriptions
Digraph
No.
Description
0 Turn off all digraph support
1 Turn on New ISO digraph support
2 Turn on SAS/C Bracket digraph support - '(|' or '|)'
3 Turn on all SAS/C digraphs.

Digraph Default and Negated Forms provides the default values and an example of how to negate the options in each of the different environments.

Digraph Default and Negated Forms
Environment Default Options Negated Options
IBM 370 (Long Form) DI(1) ,

DI(3)

NODI(1) ,

NODI(3)

IBM 370 and Cross (Short Form) -cgd1 ,

-cgd3

!cgd1 ,

!cgd3

Cross Compiler and IBM 370 UNIX System Services -Kdigraph1 ,

-Kdigraph3

!Kdigraph1 ,

!Kdigraph3

ISO digraph Alternative Tokens lists several of the ISO digraph sequences from the C++ ANSI draft. Basically, the alternative sequence of characters is an alternative spelling for the primary sequence. Similar to SAS/C digraphs, substitute sequences are not replaced in either string constants or character constants. SAS/C Release 7.00 supports the left column of pairs of primary and alternative sequences.

ISO digraph Alternative Tokens
Rel 6.50 Tokens
Primary Alternate
{ <%
} %>
[ <:
] :>
# %:
## %:%:

Note:    See Special Character Support for more information on digraphs.  [cautionend]

disk
writes the listing file on the A-disk. disk is a valid option under CMS only. When using the disk option, remember the following:

See also print , term , and type , and refer to Listing File Contents by Option and Interaction between term, print, disk, and type under CMS. If more than one of the type , print , or disk options is specified, the last one entered is in effect.

dollars ( -Kdollars under USS)
allows the use of the dollar sign ($) character in identifiers, except as the first character.

enforce ( -w~ n under USS)
treats one or more warning conditions as error conditions. Each warning condition is identified by its associated message number. Only warnings in the ranges 0-199 and 300-499 are affected. Conditions whose numbers have been specified are treated as errors, and the compiler return code is set to 12 instead of 4.

The following are further instructions for using enforce in different environments:

enxref ( -Kenxref under USS)
causes the compiler to generate two extended names cross-references. The first cross-reference is in alphabetical order by C identifier (the name in the source file). The second cross-reference is in alphabetical order by link id, which is the @@xxxxxx form assigned by the compiler. The default is noenxref . See also the extname option description.

exclude ( -Kexclude under USS)
omits listing lines from the formatted source that are excluded by #if , #ifdef , and so on. For example, in the following sequence
#ifdef MAX_LINE
   printf("Line overflow\n");
#endif

the exclude option omits the printf statement from the formatted source listing if MAX_LINE is not currently defined with the #define command.

extname ( -Kextname under USS)
enables the use of extended names. The default is noextname for TSO, CMS, and OS/390 batch and -Kextname for USS.

The compiler provides extended names support that enables compiler processing of extended names of up to 64K in length. An extended name is any name that identifies an extern variable or that identifies an extern or static function and fits either of the following criteria:

Note:    If you specify the extname option, be sure to include the appropriate header files for any library functions that you use. Some library functions, such as localtime and setlocale , are more than eight characters in length and therefore fit the criteria for extended names. The library header files for these functions all contain #pragma map statements that change the function names to names that are not extended. For example, <time.h> contains the following statement:  [cautionend]

#pragma map(localtime, "#LOCALTM")

This statement converts localtime to a shorter name that the compiler does not treat as extended. If you do not include the appropriate header file for a library function with a long name, the compiler treats it as an extended name and generates a reference to the extended name that cannot be resolved from the standard library. For more information on #pragma map , refer to The #pragma map statement.

files
replaces SYS in compiler DDnames with the prefix xxx. This option is valid for OS/390 batch only.

The only DDname in which SYS cannot be replaced is SYSTERM. The xxx prefix can contain from one to three characters. For example,

files(job)
substitutes the DDnames in column 1 with those in column 2, as follows:

column 1 column 2
SYSIN JOBIN
SYSPRINT JOBPRINT
SYSLIN JOBLIN
SYSLIB JOBLIB
SYSUT1 JOBUT1
SYSUT2 JOBUT2
SYSUT3 JOBUT3
SYSDBLIB JOBDBLIB
SYSPROTO JOBPROTO
SYSPPOUT JOBPPOUT

freg ( -Kfreg= n under USS)
specifies the maximum number of floating-point registers that the compiler can assign to register variables in a function. freg is used with optimize only. The format is
freg n
where n is 0 to 2 inclusive (the default is 2). Under OS/390 and TSO, freg is coded as freg( n ) ; under CMS it is coded as freg n. See The optimize Option for additional details.

global
invokes default values for MACLIBs set with the CMS GLOBALV command. This option is valid under CMS only.

If you specify noglobal , automatic reference to the GLOBALV variable MACLIBs is suppressed. However, the GLOBALV variable OPTIONS is still used.

greg ( -Kgreg= n under USS)
specifies the maximum number of registers that the compiler can assign to register variables in a function. greg is used with optimize only. The format is greg n where n is 0 to 6 inclusive (the default is 6). Under OS/390 and TSO, greg is specified as GREG(n) . Under CMS, it is specified as greg n. See The optimize Option for more details.

hlist ( -Khlist under USS)
includes standard header files in the formatted source listing. These are files that are included using the following syntax:
#include <name.h>
or
#include <name>

hmulti ( -Khmulti under USS)
specifies that system header files should be included each time they are referenced by a #include statement, even if the same file has previously been included. If nohmulti is specified, the compiler only includes one copy of the header file code even if the header file is specified by more than one #include < filename > statement. hmulti is the default.

hxref ( -Khxref under USS)
prints references in standard header files in the cross-reference listing. See hlist for a description of header files.

igline ( -Kigline under USS)
causes the compiler to ignore any #line statements in the input file. The default is noigline .

ilist ( -Kilist under USS)
includes user header files referenced by the #include statement in the formatted source listing. The #include filename appears in the right margin of each line taken from the #include file. See also hlist .

imulti ( -Kimulti under USS)
specifies that user header files should be included each time they are referenced by a #include statement, even if the same file has previously been included. If noimulti is specified, the compiler only includes one copy of the header file code even if the header file is specified by more than one #include "filename" statement. imulti is the default.

indep ( -Kindep under USS)
generates code that can be called before the C framework is initialized or code that can be used for interlanguage communication. See Systems Programming with the SAS/C Compiler and Using the indep Option for Interlanguage Communication for a detailed description of the use of this option.

inline ( -Kinline under USS)
inlines small functions identified by complexity and those with __inline keyword. inline is used with optimize only. See The optimize Option for more details.

inlocal ( -Kinlocal under USS)
inlines single-call static functions. inlocal is used with optimize only. See The optimize Option for more information.

ipath ( -I pathname under USS)
specifies a location that is to be searched for header files. The pathname may specify an HFS directory, an OS/390 PDS, or a CMS shared-file system directory. If you are running under the USS shell, the pathname is assumed to be an USS HFS directory unless you precede the name with two slashes and possibly a SAS/C style prefix. If you are running under OS/390 or CMS, a style prefix is required as part of the pathname unless you are referring to an OS/390 DDname. See Include-File Processing for more information on the ipath option. Note that under TSO you can only specify the ipath option once, and that the pathname is automatically converted to lowercase.

ixref ( -Kixref under USS)
lists references in user #include files.

japan ( -Kjapan under USS)
translates keywords and identifiers that are in uppercase to lowercase before they are processed by the compiler. It prints messages in uppercase. This option is intended to be used with terminals or printers that support only uppercase (Roman) characters.

-Knobinder (UNIX System Services only)
Under USS, by default, the Binder is automatically invoked if the output from COOL was successful. Use the -Knobinder option to prevent the Binder from executing. If COOL runs successfully, an output file from COOL will be saved. -Kbinder is the default.

lib
identifies a header file library.

In TSO, the lib option is specified as follows:

lib(dsname)
where dsname indicates the name of a library that contains header files, that is, one containing members that are to be included using the #include <member.h> (or <member> ) form of the #include statement. If the library belongs to another user, the fully qualified name of the data set must be used, and the name must be preceded and followed by three single quotes (because of CLIST language requirements). No final qualifier is assumed for a lib data set. nolib is the default. nolib indicates that no header file libraries are required other than the standard library provided with the compiler.

lineno ( -Klineno under USS)
enables identification of source lines in run-time messages. When lineno is specified, module size is increased because of the generation of line number and offset tables. lineno is the default.

loop ( -Kloop or -Ol under USS)
specifies that the compiler should perform loop optimizations. Use this option for multitrip loops. See The optimize Option for details on this option. This option can be used only in conjunction with the optimize option.

maclist or mlist ( -Kmaclist under USS)
prints macro expansions. Source code lines containing macros are printed before macro expansion.

me
under CMS, specifies the fileid of the source file used by the object module disassember. The form of the me option is as follows:
me(source-fileid)
where source-fileid is a CMS fileid or SAS/C sf: style filename. The default filetype is C. See Using the OMD under CMS.

member
under TSO, the member option is used with the arlib option to specify the output archive member name. The form of the option is as follows:
ar370(archive) member(member)
where archive specifies the AR370 archive and member specifies the member to store the output in.

mention ( -w+ n under USS)
specifies that the warnings whose numbers are specified as n1, n2, and so on, are not to be suppressed. Only warnings in the ranges 0-199 and 300-499 are affected. See also suppress .

Any number of warning conditions can be specified, regardless of the environment.

merge
merges a copy of the source code into the OMD listing.

Under OS/390 batch, when used as an option with the appropriate PROC, merge merges the source code into the OMD listing of the object code.

In TSO, this option is specified as follows:

merge(dsname)
where dsname names the data set from which the OMD is to read the source code for the module to be disassembled. The data set name can be a sequential data set or a partitioned data set member. If the data set belongs to another user, the fully qualified name of the data set must be specified, and the name must be preceded and followed by three single quotes, as in the following example:
OMD370 PROJ4(PART1) MER('''YOURLOG.PROJ4.SOURCE(PART1)''')

The extra quotes are required for the CLIST language. If the data set name is not specified within three single quotes, it is assumed to be a data set with a final qualifier of C.

Note that the merge (dsname) form is used only with the OMD370 CLIST. When the merge option is used with the LC370 CLIST, no data set name is specified because the location of the source is always the data set name immediately following the command name on the command line, that is, the source code to be compiled.

The following indicates that source code is not to be merged into the OMD's output listing:

nomerge

When the LC370 CLIST is run, the default is merge . When OMD370 is used, the default depends on how the object data set name is specified. If the object data set name is specified in single quotes, the default is nomerge . Otherwise, the default is merge . (The source data set name is determined by replacing the final OBJ qualifier in the source data set name with C.)

Under CMS, the default is merge . By default, source code is merged with the object code in the OMD output listing.

-mrc (USS only)
requests that the compiler return the same return codes as on OS/390 and CMS, that is, 4 if there were warnings, 8 if there were errors, and so on. If -mrc is not specified, the compiler conforms to UNIX conventions and returns 0 if there were no errors and a non-zero code if errors were detected.

object ( -o filename under USS)
outputs object code.

In TSO, this option is specified as follows:

object(dsname)
where dsname names the data set into which the compiler stores the object code. The data set name can be a sequential data set or a partitioned data set member. If the data set belongs to another user, the fully qualified name of the data set must be specified, and the name must be preceded and followed by three single quotes, as in the following example:
LC370 PROJ4(PART1)
OB('''YOURLOG.PROJ4.OBJ(PART1)''')

The extra quotes are required for the CLIST language. If the data set name is not specified within three single quotes, it is assumed to be a data set with a final qualifier of OBJ.

The following indicates that no object code is to be stored by the compilation:

noobject

When the object or noobject option is missing, the default depends on how the source data set name is specified. If the source data set name is specified in single quotes, the default is noobject . Otherwise, the default is object . (The object data set name is determined by replacing the final C in the source data set name with OBJ.)

In TSO, if both noobject and omd are specified, object code is generated but discarded after the OMD is run.

Under CMS, the default is object . By default, object code is generated in pass two of the compiler. If you specify noobject , pass two is suppressed and object code is not generated.

Under CMS, if both noobject and omd are specified, neither pass two nor the OMD is run.

Under USS, the -o option is used to specify the output file for sascc370 . If the -c option is also specified, the -o option specifies the file where the compiler's output (an object module) is to be stored. If -c is not specified, the -o option specifies the file where the linkage editor's output (a load module or program object) is to be stored. Use of -o where -c is not specified is discussed in more detail in COOL Options under the load option.

When -o is specified, the syntax is as follows:

-o filename

The filename is assumed to be an absolute or relative HFS pathname. To store the compiler output in an OS/390 data set, you must use a pathname beginning with two slashes possibly followed by a SAS/C style prefix. (See SAS/C Library Reference, Volume 1 for information about style prefixes.) For example, to store the object file in the PDS member YOURLOG.PROJ4.OBJ(PART1), specify the following:

-o '//dsn:yourlog.proj4.obj(part1)'

Note that you should not specify an explicit object filename if you compile more than one source file at a time, since each individual compilation will overwrite the object file.

Under the USS shell, if the options -o and -c are not both specified, the compiler stores its object code output in a default location. If the compiler input file is an HFS file, the object filename is the same as the source filename with the extension changed to .o . If the compiler input file is an OS/390 data set, the object file is an HFS file whose name is derived from the member name, if the input file is a PDS member and, otherwise, from the next-to-the-last qualifier of the data set name. For instance, if you compile the source file //tso:proj4.c(part1) , the default object location is the HFS file part1.o . If you compile the sequential file //tso:proj4.report.c , the default object location is the HFS file report.o .

Note that unless -c is specified, you cannot override the location where the object module is stored.

omd ( -Komd[= filename ] or -S under USS)
invokes the object module disassembler (OMD) after successful compilation. OMD-only options and selected compilation options are passed to the OMD, as explained in Object Module Disassembler Options.

Under USS, you can supply the name of the OMD's output file by specifying -Komd= filename. If -Komd is specified without a filename, the listing is stored in an HFS file with a .omd extension. The name of the default OMD output file is derived from the source filename in the same way as the object file, except for the .omd extension. See the object option for a description of this process. Note that you should not specify an explicit filename if you compile more than one source file at a time, since each individual compilation will overwrite the OMD output file.

optimize ( -Koptimize under USS)
causes optimized code to be generated. See The optimize Option for details on this option.

options ( -Koptions under USS)
generates an options listing. The options listing contains all options in effect for the compilation.

overstrike ( -Koverstrike under USS)
prints special characters in the listing file as overstrikes. This option is useful, for example, if you do not have a printer that can print the special characters listed in the fourth column of Default Representations for Special Characters.

pagesize ( -Kpagesize= nn under USS)
defines the number of lines per page of source and cross-reference listings. (See Listing File Contents by Option.) pagesize is specified as follows:

nn lines per page of listing are printed at the location determined by the print option. The default is 60 lines per page. (The default location is different for each operating system and is described in the discussion of print .)

pflocal ( -Kpflocal under USS)
assumes that all functions are __local unless __remote was explicitly specified in the declaration. The default is nopflocal . The nopflocal option causes the compiler to treat all function pointers as __remote unless they are explicitly declared with the __local keyword.

posix ( -Kposix under USS)
informs the compiler that the program is a POSIX oriented program, and that compile-time and run-time defaults should be changed for maximum POSIX compatibility. The default is noposix under TSO, CMS, and OS/390 batch and -Kposix under USS.

Specifically, the posix option has the following effects on compilation:

Additionally, if any compilation in a program's main load module is compiled with the posix option, it will have the following effects on the execution of the program:

Note:    Functions that can be used by both POSIX and non-POSIX applications should be compiled without use of the posix compiler option.  [cautionend]

ppix ( -Kppix under USS)
allows nonstandard use of the preprocessor.

If the ppix option is in effect, the preprocessor allows token-pasting by treating a comment in macro replacement text as having zero characters. The ISO/ANSI Standard defines the double pound sign ( ## ) operator to perform token-pasting.

This option also specifies that the preprocessor should replace macro arguments in string literals. Equivalent functionality can be gained for portability by using the ISO/ANSI Standard pound sign ( # ) operator.

pponly ( -P under USS)
creates a file containing preprocessed source code for this compilation. Preprocessed source code has all macros and #include files expanded. If the pponly option is used, all syntax checking (except in preprocessor directives) is suppressed, no listing file is produced, and no object code is generated.

In TSO, use the following:

pponly(dsname)
where dsname indicates the name of a data set in which the preprocessed source file is to be stored. If the library belongs to another user, the fully qualified name of the data set must be used, and the name must be preceded and followed by three single quotes because of the CLIST language requirements. No final qualifier is assumed for a pponly data set.

Under CMS, use pponly . The output file is written to a file with the same filename as the source file and a filetype of PP.

Under OS/390 batch, use pponly . The output file is written to the data set allocated to the DDname SYSPPOUT.

In TSO and under OS/390 batch, the output data set should use the DCB options LRECL=1028, RECFM=VB. The data set can have any block size.

Under the USS shell, if the -o option is specified together with -P , the preprocessed source code is written to the file specified by -o . If -o is not specified, the preprocessed source code is written to an HFS file with a .i extension. The name of the default ouput file is derived from the source filename in the same way as the object file, except for the .i extension. See the object option for a description of this process.

pr
under CMS, specifies the output ASM file for the object module disassembler. The form of the pr option is as follows:
pr(asm-fileid)
where asm-fileid is a CMS fileid or a SAS/C sf: style filename. The default filetype is ASM. See Using the OMD under CMS.

print ( -Klisting[= filename ] under USS)
produces a listing file.

Under OS/390 batch, the print option produces a listing file and sends it to SYSPRINT. The listing file also includes error messages. If noprint is used, the listing file is suppressed. Under OS/390 batch, the default is print .

Also see the discussion of term . Interaction between term and print under OS/390 Batch and in TSO summarizes the interaction between term and print .

In TSO, the print option is used with both the LC370 CLIST and the OMD370 CLIST to specify where the listing file is to be stored.

If you specify the following, the listing file is printed at the terminal:

print(*)

If you use print(*) , you do not need to use the term option. If you do, error messages are sent to the terminal twice. See also term .

The following stores the listing file in the named data set:

print(dsname)

This data set must be sequential; a partitioned data set member is not allowed. If the data set belongs to another user, the fully qualified name of the data set must be specified, and the name must be preceded and followed by three single quotes because of the CLIST language requirements. If the data set name is not specified within three single quotes, it is assumed to be a data set with a final qualifier of LIST.

The following form specifies that no listing file is to be produced:

noprint

If you use noprint , the compiler ignores all other listing options, such as pagesize and ilist . The xref option also is ignored.

If the source data set name is enclosed in single quotes, the default is noprint . Otherwise, the default is print . The listing data set name is determined by replacing the final C in the source data set name with LIST and ignoring any member name specification.

You cannot specify noprint when you use the OMD370 CLIST.

If you do not specify print when you use the OMD370 CLIST, the default is print(*) if the object data set name is enclosed by single quotes. Otherwise, the listing data set name is determined by replacing the final OBJ qualifier in the source data set name with LIST, and any member name specification is ignored.

Under CMS, print spools the listing file to the printer. noprint suppresses the listing file. noprint is an alternative to print , disk , and type .

You can also give the print , disk , and type options to the OMD370 EXEC. If you use more than one of the options type , print , or disk , the last one entered is in effect. See Interaction between term and print under OS/390 Batch and in TSO.

Under USS, by default, no listing file is generated unless you specify the -Klisting option. You can supply the name of the listing file by specifying -Klisting= filename. If -Klisting is specified without a filename, the listing is stored in an HFS file with a .lst extension. The name of the default listing file is derived from the source filename in the same way as the object file, except for the .lst extension. See the object option for a description of this process. Note that you should not specify an explicit filename if you compile more than one source file at a time, since each individual compilation will overwrite the listing file.

rdepth ( -Krdepth= n under USS)
defines the maximum level of recursion to be inlined (the default is 1). rdepth is used with optimize only. See The optimize Option for more details. rdepth is specified as follows:

redef ( -Kredef under USS)
allows redefinition and stacking of #define names.

refdef ( -Krefdef under USS)
The refdef option forces the use of the strict reference-definition (ref/def) model for external linkage of __rent identifiers. If you specify norefdef , which is the default, the compiler uses the common model. The minimum abbreviation of refdef is ref . This option is useful primarily when used with the rent or rentext options. (Strict reference-definition is always used for __norent identifiers.)

Note:    If you specify the posix option, the compiler option refdef is assumed if norefdef is not also specified.  [cautionend]

rent ( -Krent under USS)
specifies that all extern and static variables are __rent by defualt.

rentext ( -Krentext under USS)
specifies that all extern variables are __rent by default, and all static variables are __norent by default.

reqproto ( -cf under USS)
requires that all functions and function pointers have a prototype in scope. If the reqproto option is used and a function or function pointer is declared or defined that does not have a prototype, the compiler issues a warning message.

smpxivec ( -Ksmpxivec under USS)
causes the compiler to generate a CSECT with a unique name in the place of @EXTERN#. The option is provided to accommodate SMP update methods. Refer to SAS Programmer's Report: SMP Packaging for SAS/C Based Products for more information on this option.

sname ( -Ksname= name under USS)
defines the section name. The name can be up to seven characters in length.

The section name is assigned by the compiler as follows:

The following are further instructions for using sname in different environments:

source ( -Ksource under USS)
outputs a formatted source listing of the program to the listing file. (The default location of the listing file is different for each operating system and is described in the discussion of print .)

nosource suppresses only the source listing; the cross-reference listing is still printed if requested with the xref option.

The source option has no effect on the OMD listing if an OMD listing is requested. Whether source code is merged into the OMD listing is controlled by the merge option.

stmap

( -Kstmap

under UNIX System Services)

requests that a map of structure elements and their offsets be generated in the cross-reference for each structure tag enclosed. Specifying the stmap option implies the xref option.

strict ( -Kstrict under USS)
enables an extra set of warning messages for questionable or nonportable code.

stringdup ( -Kstringdup under USS)
creates a single copy of identical string constants.

suppress n ( -w n under USS)
ignores one or more warning conditions. For more information about related messages, see SAS/C Software Diagnostic Messages.

Each warning condition is identified by its associated message number, n. Only warnings in the ranges 0-199 and 300-499 are affected. Conditions whose numbers have been specified are suppressed. No message is generated, and the compiler return code is changed.

The following are further instructions for using suppress in different environments:

Any number of warning conditions can be specified, regardless of the environment. If both suppress and enforce specify the same message number, the warning is enforced.

-temp=directory (USS only)
specifies a directory where temporary files created by sascc370 should be stored.

term
directs diagnostic messages to stderr .

In contrast to print , term specifies whether error messages are written to stderr but does not affect the contents of any listing file.

Under OS/390 batch, CMS, and TSO, stderr is defined as follows:

The term option interacts with the print option as summarized in Interaction between term and print under OS/390 Batch and in TSO for OS/390 batch and TSO and in Interaction between term, print, disk, and type under CMS for CMS. Under the USS shell, diagnostic messages are always sent to stderr .

trans ( -Ktrans under USS)
translates special characters to their listing file representations. Default representations for these characters are in column four of Default Representations for Special Characters. If you specify notrans , all special characters are written out as they appear in the source data.

trigraphs ( -Ktrigraphs under USS)
enables translation of ANSI Standard trigraphs. If the trigraphs compiler option is used, all occurrences of the following three-character sequences are replaced with the corresponding single character:
   ??=       #
   ??(       [
   ??/       \
   ??)       ]
   ??<       {
   ??>       }
   ??'       ^
   ??!       |
   ??-       ~

Unlike digraphs, trigraphs are replaced within comments and character string literals. (Digraphs are shown in Digraph Sequences For Special Characters.)

type
displays the listing file on the terminal. type is a CMS option only. type implies noterm .

Note that you cannot use type with either print or disk . If you specify more than one of the options type , print , or disk , the last one you enter is in effect. See also print , term , and disk .

undef ( -Kundef under USS)
undefines predefined macros.

Predefined macros are defined as follows:

The definition of the DEBUG or NDEBUG macro depends on whether or not you have specified the debug or nodebug option.

upper ( -Kupper under USS)
outputs all lowercase characters as uppercase in the listing file. upper implies overstrike .

usearch ( -Kusearch under USS)
specifies that UNIX oriented search rules should be used when the compiler searches for include files rather than mainframe-oriented search rules. This option may be useful when compiling programs ported from a UNIX environment. The effect of usearch is described in detail in Complete include processing. -Kusearch is the default when compiling under the USS shell, while nousearch is the default in all other environments.

-v
specifies verbose mode. In verbose mode, the command line that executes each phase of the compiler is displayed. -v is valid for UNIX System Services (USS) only.

verbose ( -v under USS)
prints relocation directory and line number and offset tables separately, in addition to merging them with the generated code. The verbose option applies only to the OMD listing. OMD370 displays the run-time constants CSECT if the verbose option is specified. The OMD370 utility also displays the extended names CSECTs when the verbose option is specified.

vstring ( -Kvstring under USS)
generates character string literals with a 2-byte length prefix. This option is used primarily in conjunction with the interlanguage communication feature. For more information on the vstring option, refer to Chapter 3, "Communication with Other Languages," in the SAS/C Compiler Interlanguage Communication Feature User's Guide.

warn ( -Kwarn under USS)
causes compilation warning messages to be printed. nowarn suppresses warning messages.

xref ( -Kxref under USS)
produces a cross-reference listing.

zapmin ( -Kzapmin= n under USS)
specifies the minimum size of the patch area, in bytes. In TSO and under OS/390, use the following:
zapmin(n)
where n refers to the number of bytes in the patch area. The default is 24 bytes.

Under CMS, use the following:

zapmin n
where n refers to the number of bytes in the patch area. The default is 24 bytes.

For more information about the patch area, refer to Register Conventions and Patch Writing. For more information about using the zapmin option, refer to The zapmin option.

zapspace ( -Kzapspace= n under USS)
changes the size of the patch area generated by the compiler. Under OS/390 batch and in TSO, use the following:
zapspace(factor)

Under CMS, use the following:

zapspace factor

For more information about the patch area, refer to Register Conventions and Patch Writing. For more information about using the zapspace option, refer to The zapspace option.


Chapter Contents

Previous

Next

Top of Page

Copyright © 2001 by SAS Institute Inc., Cary, NC, USA. All rights reserved.