Chapter Contents

Previous

Next
Using the SAS/C C++ Development System under TSO, CMS, OS/390 Batch, and UNIX System Services

Translating C++ Programs under USS

The compiler drivers sascc370 and sasCC370 control the translation, compilation, and link-editing of C++ programs under USS. The following syntax is used to translate, compile, and/or link a C++ program from the USS shell:

sascc370 [options] filename1 [filename2 ...]
sasCC370 [options] filename1 [filename2 ...]

The options argument is a list of SAS/C Compiler options, COOL prelinker options, and/or OS/390 linkage editor options (for details, see the SAS/C Compiler and Library User's Guide). You can also specify the C++ translator options as described in Option Descriptions.(footnote 1) It also lists the SAS/C Compiler options that are not valid for C++ compilations. The filename arguments may contain any combination of C++ source files, C source files, object modules, and ar370 archives. sascc370 invokes the C++ translator if any input file has a .C or .cxx extension, or if you specify the -cxx compiler option. sasCC370 invokes the C++ translator if any input file has a .c , .C , or .cxx extension.

If you do not suppress the prelinking step with the -c compiler option, both sascc370 and sasCC370 invoke the COOL prelinker followed by the linkage editor to link the object files. The C++ library is automatically added to the prelinking step if any C++ translations have occurred.

The input source files may reside either in the USS hierarchical file system (HFS) or in a standard OS/390 partitioned data set. The following example illustrates the use of an HFS file:

sasCC370 ./proj/sort.cxx

If this program was located in an OS/390 PDS member named YOURLOG.PROJ4.CXX(SORT), the compiler could be invoked from the USS shell as follows:

sasCC370 '//dsn:yourlog.proj4.cxx(sort)'

In either case, the compiled and linked output module is stored in the file a.out in your current directory. To specify another file, use the -o option. For example, the following command stores the output module in the file ./proj5/sort :

sasCC370 -o ./proj5/sort ./proj5/sort.cxx

To invoke the sascc370 or sasCC370 command, you must include the directory where SAS/C was installed in your PATH environment variable. Typically, your site will define PATH appropriately for you when you start up the shell. If your site does not define PATH for you, contact your SAS Installation Representative for C compiler products to obtain the correct directory name and add it to your PATH.

For additional information about compiling programs under the USS shell, see the SAS/C Compiler and Library User's Guide.


FOOTNOTE 1:   C++ translator options are processed by the translator itself, not by the compiler. [arrow]


Chapter Contents

Previous

Next

Top of Page

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