Chapter Contents

Previous

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

COOL Control Statements

COOL accepts four control statements: INCLUDE, INSERT, ARLIBRARY, and GATHER. All COOL control statements must have a blank in the first column.


INCLUDE Statement

The INCLUDE control statement is used to specify one or more additional files to be used as input to COOL. The INCLUDE statement has two formats. The first is

INCLUDE filename <, . . .>

Under TSO and OS/390 batch, filename is a DDname that has been allocated to a sequential data set or PDS member. Under CMS, filename is the filename of a CMS file. The filetype must be TEXT. The file can be on any accessed minidisk or in a SFS directory accessed as a minidisk, or it can be in an SFS directory that has been named in the _INCLUDE environment variable. (See the SAS/C Compiler and Library User's Guide for more information about the _INCLUDE environment variable.)

The second format of the INCLUDE statement is

INCLUDE libname (member<,member>)<, . . .>

Under CMS, libname is the name of a TEXT library. The filetype must be TXTLIB. The library can be on any accessed disk. member is the name of a member in the TEXT library. Under TSO and OS/390 batch, libname is a DDname that has been allocated to a PDS, and member is the name of a member in that PDS. The two formats can be combined in the same statement. Here are several examples of the INCLUDE statement:

INCLUDE MYPROJ
Under CMS, the file MYPROJ TEXT is used as input. Under TSO and OS/390 batch, this statement causes the sequential data set allocated to the MYPROJ DDname to be used as input.

INCLUDE PROJLIB(MAINPROG)
Under CMS, member MAINPROG of PROJLIB TXTLIB is used. Under TSO and OS/390 batch, this statement causes member MAINPROG in the PDS allocated to the PROJLIB DDname to be used as input.

INCLUDE PROJLIB(MAINPROG,SUBRTN)
Under CMS, both member SUBRTN and member MAINPROG of PROJLIB TXTLIB are used. Under TSO and OS/390 batch, this statement causes member SUBRTN in the PDS allocated to the PROJLIB DDname to be used as input, in addition to member MAINPROG.

INCLUDE PROJLIB(MAINPROG),SUBRTN
Under CMS, member MAINPROG of PROJLIB TXTLIB and the file SUBRTN TEXT are used as input. Under TSO and OS/390 batch, this statement causes member MAINPROG in the PDS allocated to the PROJLIB DDname to be used as input. In addition, the sequential data set allocated to the SUBRTN DDname is used.

An included object file can also contain an INCLUDE statement. The specified modules are also included, but any data in the object file after the INCLUDE statement is ignored.


INSERT Statement

The INSERT control statement is used to specify one or more external symbols that are to be resolved, if necessary, via COOL's autocall mechanism. The format of the INSERT statement is

INSERT symbol-1<,symbol-2 . . .>

If a symbol specified in an INSERT statement is not resolved after all primary input has been processed, COOL attempts to resolve it by using automatic library call.


ARLIBRARY Statement

The ARLIBRARY statement specifies the names of one or more AR370 archives to be used to resolve external references by COOL. The format of the ARLIBRARY statement is as follows:

ARLIBRARY name-1<,name-2 . . .>

Under TSO and OS/390 batch, name is the DDname that has been allocated to the data set. Under CMS, name is the filename of the archive file. COOL uses A as the filetype.

For more information on the AR370 utility, refer to the SAS/C Compiler and Library User's Guide.


GATHER Statement

The last control statement accepted by COOL is the GATHER control statement. You do not need to use any GATHER statements to link your C++ program; however, a GATHER statement is generated automatically for you by COOL when C++ programs are linked. This special statement causes COOL to create tables of functions that are used to initialize and terminate static objects in your program. COOL prints the names of the functions in these tables in its listing. Usually this information can be ignored, although it may be useful for debugging.

The format of the GATHER statement is

GATHER prefix<,prefix2 . . .>

where prefix is a one- to six-character symbol.


Chapter Contents

Previous

Next

Top of Page

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