Chapter Contents

Previous

Next
Linking C Programs

Specifying the Correct Entry Point

Because of the variety of ways a SAS/C program can be constructed, the same entry point is not appropriate for all programs. This section describes how to determine what entry point your application requires and then describes how to specify this entry point when you link the program.

The correct entry point can always be specified via a linkage editor control card or the RESET option of the CMS LOAD command. Additionally, when you use most of

the SAS/C batch cataloged PROCs or the COOL TSO CLIST, you can often use the entry keyword to specify the entry point; when you compile under the USS shell, you can use the -Bep option of sascc370 for this. To illustrate:

OS/390 batch
// EXEC LC370L,PARM.LKED='LIST,MAP',ENTRY=MAIN

TSO
cool example(init) list map rent entry(dyn)

USS
sascc370 -Bep='#OEEP' -Tspe example/init.c

The entry keyword may have any of the following values:
MAIN The module is an ordinary C main program.
DYN The module is a rent - or rentext -compiled dynamically loadable module.
DYNNR The module is a norent -compiled dynamically loadable module
OS The module is an SPE application using the default OS/390 start-up code
OE The module is an USS SPE application using the default USS start-up code.
CSPE The module is a CICS SPE application using the default CICS start-up code. This option is available only with the CICS batch PROCs (for example, LCCCPCL).
NONE The entry point to the module is specified by an input ENTRY control statement provided by the user.

If no entry option is specified, the default is always MAIN.

Note:    The -Bep option of the sascc370 shell command, unlike the entry keyword for batch and TSO, requires that the actual entry point be specified, not a code. Thus, the example above specifies -Bep='#OEEP' , not -Bep=OE .  [cautionend]


Chapter Contents

Previous

Next

Top of Page

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