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.
-
In the case of a normal, single load module SAS/C application
with no special requirements, the program entry point is the symbol
MAIN
. In most cases, you need not take any special action to have this
entry point selected.
-
The module you are linking may be a dynamically
loadable component of a multi-load-module program. In this case, the entry
point name depends on whether you compiled with the
norent
option or with one of
rent
or
rentext
. In the
norent
case, the entry point is #DYNAMNR. In the
rent
or
rentext
case, the entry point is #DYNAMN. Under TSO, OS/390 batch
and the shell, you can often specify a keyword to ensure that the correct
entry point is selected.
-
You may have written your program to be called
from assembler language, as described in Communication with Assembler Programs. Some of these calls require one of the
entry points $MAINC or $MAINO, as described in this chapter. In this case,
you must explicitly specify the correct entry point.
-
You may have compiled your initial function with
the
indep
option. If so, this function must be specified
as the entry point. Since the name of this function is not fixed, you must
explicitly specify the correct entry point.
-
You may be linking your application with the SPE
library (see Systems Programming with the SAS/C Compiler)
and using the standard front-end for your environment. In this case, the correct
entry point will be either #OSEP, #CMSEP, #CICSEP or #OEEP, depending on whether
the program is intended for execution under OS/390, CMS, CICS, or the USS
shell. Under TSO, OS/390 batch and the shell, you can often specify a keyword
to ensure that the correct entry point is used.
-
You may be linking your application with the SPE
library and using a custom front-end. In this case, you must specify your
own front-end as the entry point. Since this name cannot be predicted, you
must explicitly specify the entry point.
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:
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
.
Copyright © 2001
by SAS Institute Inc., Cary, NC, USA. All rights reserved.