Like the SAS/C Compiler, the SAS/C Cross-Platform Compiler and C++ Development System is a portable implementation of the high-level C and C++ languages. It provides the same functionality under a UNIX operating system as the SAS/C C and C++ Development System does under the MVS or CMS operating systems. This includes the following:
COOL
utility, including extended
names processing.
Note: In this release,COOL
replacesCLINK
as the default SAS/C pre-linker on MVS and CMS systems. Similarly, the programcool
replacesclink
as the default pre-linker for the SAS/C Cross-Platform Compiler and C++ Development System. For details on this and other changes in Release 6.0, see Appendix E, "Compatibility Notes".
ar370
archive libraries.
FIGURE 1: Application Development Process
make
utilities.
FTP uses the Transmission Control Protocol/Internet Protocol (TCP/IP) as the network mechanism for communicating between the host and target machines. Both FTP and TCP/IP are available at most mainframe sites. However, if this method of file transfer is not available at your site, you can use any file transfer method that enables you to transfer binary files between your workstation and the mainframe. The pre-linked output file is already in binary form and does not require conversion from text to binary. Also, if you copy object files from the workstation to the mainframe, be sure the destination data set has a logical record length of 80 (LRECL=80) and a fixed record format (RECFM=F or FB).
Note: The SAS/C Connectivity Support Library (CSL) provides the capability of using Network File System (NFS) to copy files between the workstation and the mainframe using example utilities that are provided with that product. See "Manipulating Files and Directories" on page 96 for additional information.
FIGURE 2 Cross-Platform Compiler Architecture
TABLE 1. Names of Executable Files
Note: There are several additional executable files for the utility programs provided with the
SAS/C Cross-Platform Compiler.
The compiler drivers,
The CICS command preprocessor recognizes CICS command embedded in your C and C++
source. The preprocessor translates these commands into appropriate function calls for
communication with CICS.
The global optimizer, pre-linker, and object module disassembler are enabled by compiler
options and, like the parser and code generator, their execution is controlled by the compiler driver.
The global optimizer,
The object module disassembler,
The pre-linker,
The C++ translator,
The
See Chapter 5, "Using the Global Optimizer and the Object Module Disassembler" on page 49
for more information about
Executable Files
The SAS/C Cross-Platform system is composed of the executable files shown in the following
table.
-------------------------------------------
| Functional Name | Filename |
===========================================
| CICS command preprocessor | ccp |
-------------------------------------------
| C compiler driver | sascc370 |
-------------------------------------------
| C++ driver | sasCC370 |
-------------------------------------------
| C++ translator | cxx |
-------------------------------------------
| parser | lc1 |
-------------------------------------------
| code generator | lc2 |
-------------------------------------------
| global optimizer | go |
-------------------------------------------
| object module disassembler | omd |
-------------------------------------------
| ar370 archive manager | ar370 |
-------------------------------------------
| pre-linker (default) | cool |
-------------------------------------------
| pre-linker | clink |
-------------------------------------------
Using the Executable Files
Like most compilers, the SAS/C Cross-Platform Compiler and C++ Development System
performs the compilation in a series of phases.
sascc370
and sasCC370
, control the compilation, invoking the other
executable files and passing them options during the various phases.
go
, performs advanced optimizations such as merging common
subexpressions and eliminating code that is never executed, constant propagation, and strength
reduction. The global optimizer also allocates registers, placing the most highly used variables for
each section of code in registers. This eliminates any need for you to select and specify register
variables.
omd
, is a useful debugging tool that provides a copy of the
assembler code generated for a C or C++ program. In addition to running the object module
disassembler at compile time, it can also be invoked independent of the driver.
cool
, is an object code preprocessor that merges CSECTs based on references to
external variables. It provides the same functionality as the SAS/C COOL
utility on the mainframe.
cxx
, parser, lc1
, and code generator, lc2
, are called by the compiler and
C++ drivers to perform the actual compilation of the source code. Together, they handle the
parsing, semantics analysis, instruction selection, and code emission phases of compilation.
ar370
archive utility is used to generate groups of files that are combined into a single
archive file.
go
and omd
.
Library and Header Files
The SAS/C Cross-Platform Compiler and C++ Development Systems require that the resident
portions of the SAS/C and C++ libraries be located on the host workstation. The standard C and
C++ header files must also be located on the host workstation. Optionally, you can specify
additional header files as described in Chapter 2, "Using the SAS/C® Cross-Platform Compiler and
C++ Development System" on page 9. The transient portion of the SAS/C and C++ Libraries is
located on the target mainframe.
man
pages listed in the following table are supplied with the SAS/C
Cross-Platform Compiler and should be located in the man1
subdirectory.TABLE 2. Available man
Pages
-------------------------------------------------------------------- | man Page | Provides information for... | ==================================================================== | ar370 | ar370 archive utility | -------------------------------------------------------------------- | atoe | ASCII-to-EBCDIC translation utility | -------------------------------------------------------------------- | ccp | CICS command preprocessor | -------------------------------------------------------------------- | cool | cool pre-linker | -------------------------------------------------------------------- | clink | clink pre-linker | -------------------------------------------------------------------- | dset | display license information | -------------------------------------------------------------------- | etoa | EBCDIC-to-ASCII translation utility | -------------------------------------------------------------------- | mf2unix | mainframe-to-UNIX C source code translation utility | -------------------------------------------------------------------- | objdump | SAS/C 370 object file dump utility | -------------------------------------------------------------------- | omd | describes the object module disassembler | -------------------------------------------------------------------- | sascc370 | sascc370 C compiler driver | -------------------------------------------------------------------- | sasCC370 | sasCC370 C++ driver | -------------------------------------------------------------------- | spatch | SAS/C binary patching application | -------------------------------------------------------------------- | unix2mf | UNIX-to-mainframe C source code translation utility | -------------------------------------------------------------------- | update | SAS/C update utility | -------------------------------------------------------------------- | zap | SAS/C zap utility, used with license information | --------------------------------------------------------------------
To use these
man
pages, you must add install_location to your MANPATH
environment
variable, and install_location/host
/hostname/bin
to your PATH
environment variable. The
install_location and hostname are specific to your site.
Because of different maintenance structures, the SAS/C Cross-Platform Compiler and C++ Development System and the mainframe SAS/C C and C++ Development System do not always produce identical object code. However, the performance of applications compiled with either compiler will be essentially identical.
You can use the SAS/C Debugger running on the mainframe to debug source code located on your workstation. The SAS/C Debugger has the ability to access source code and debugging information located on the workstation. The debugger uses the SAS/C CSL run-time transients that are provided with the SAS/C Cross-Platform Compiler to establish client/server connectivity between the workstation and the mainframe. This capability is described in Chapter 9, "Cross-Debugging" on page 71, Appendix A, "Installing and Administering the NFS Client", and Appendix B, "Using the NFS Client" on page 91. SAS/C CSL provides many additional features, which are described in SAS Technical Report C-113, SAS/C Connectivity Support Library, Release 1.00.