Chapter Contents

Previous

Next
Compiling C Programs

Compiling C Programs in TSO

This section explains how to use the LC370 CLIST, which invokes the SAS/C Compiler. Included are discussions on specifying data sets and compiler options in TSO. Since the compiler is itself a C program, you must ensure that the transient run-time library is allocated to the DDname CTRANS or is installed in the system link list before you use the compiler. Your installation will probably cause it to be allocated automatically. Consult your SAS Installation Representative for C compiler products to determine if this has been done. If not, use the TSO ALLOCATE command to associate the library with the DDname CTRANS.


The LC370 CLIST

Invoke the compiler with the LC370 CLIST as follows:

LC370 dsname  [options]

The dsname argument is the name of the data set containing the source to be compiled. The options arguments are compiler options (see Compiler Options). For the data set specification, you must follow standard TSO naming conventions; that is, if the data set belongs to another user, you must specify the full name of the data set and enclose the full name in single quotes. If the source code is in a member of a partitioned data set, you must specify the member name in parentheses following the data set name, in the normal TSO manner. For example, a data set belonging to another user can be specified as follows:

'YOURLOG.PROJ4.C'

If a member name is included, the data set can be specified as follows:

'YOURLOG.PROJ4.C(PART1)'

If you do not enclose the data set name in single quotes, the LC370 CLIST assumes that the final qualifier of the data set name is C. If you do not specify C, it is added automatically by the CLIST. (The default qualifier can be changed by your site when the CLIST is installed.) For example, in the command

LC370 PROJ4(PART1)

the C source is assumed to be in member PART1 of the data set prefix.PROJ4.C, where prefix is the user's default prefix. You must separate options with one or more commas, blanks, or tabs. The only order requirement is that the input source filename must be the first item on the command line following LC370. You can abbreviate options to the portion shown in uppercase in Compiler Options. To negate an option, precede it with NO . If you use both the positive and negative form of an option (for example, debug and nodebug ), both options are rejected and the default is in effect.

Sample LC370 CLIST command line with options

The following is a sample command line that invokes the compiler and executes the OMD:

LC370 PROJ4(PART1) PR('''ADMIN.PROJ4.LIST''') COMN SO NOX OMD V

The following items discuss the sample command line:

For information on the OMD, see The Object Module Disassembler.


Chapter Contents

Previous

Next

Top of Page

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