![]() Chapter Contents |
![]() Previous |
![]() Next |
| SAS/C C++ Development System User's Guide, Release 6.50 |
This section describes six cataloged procedures that you can use to translate, compile, link, and run a C++ program. lists the procedures.
| Procedure | Translate and Compile | COOL and Link Edit | Run | Store AR370 Archive Member |
|---|---|---|---|---|
| LCXXC | Yes | No | No | No |
| LCXXCA | Yes | No | No | Yes |
| LCXXCL | Yes | Yes | No | No |
| LCXXL | No | Yes | No | No |
| LCXXCLG | Yes | Yes | Yes | No |
| LCXXLG | No | Yes | Yes | No |
Each subsequent section describes using the procedures, giving
both
the general syntax and an example.
Note the following considerations when you use any of the cataloged procedures described in this section:
In general, the CALLLIB parameter should not be used for a library containing C++ object modules. This is because MVS partitioned data sets are not suitable for storing C++ object modules, due to the limitation of eight-character uppercase member names. You should store C++ object code in AR370 archives and access them for autocall via the SYSARLIB DD statement.
You can use one of two cataloged procedures to simply translate and compile your C++ program and do nothing else (no link or run step). The LCXXC cataloged procedure invokes the translator and compiler in one job step and stores the compiler output in an MVS data set. The LCXXCA cataloged procedure is identical to the LCXXC procedure, except that the compiler output is stored in an AR370 archive. You can optionally run the OMD370 utility with either of these cataloged procedures.
If you only want to translate (not compile, link, or run) your C++ program,
use the LCXXC cataloged procedure and use the
tronly
option. This option causes only the translator to be run. Similarly,
if you only want to preprocess your code, use the LCXXC cataloged procedure
with the pponly option. For more information about options you can use the
with the translator, refer to Option Summary .
The cataloged procedures consist of various JCL statements, some of which are DD statements. Sometimes you may want to override some of the DD statements in the procedures. The following list describes the most commonly overridden DD statements in the translation and compilation steps. The descriptions include a brief overview of each statement's purpose and any pertinent DCB requirements for the data sets described by the DD statement.
Note: These DD statements apply to not only the LCXXC and LCXXCA procedures
but to all cataloged procedures that translate and compile a program (LCXXC,
LCXXCA, LCXXCL, and LCXXCLG).
In addition, the translator may require one or more DD statements describing
user-defined header files, as mentioned previously.
In general, the LCXXC cataloged procedure is used as shown here:
//SAMPLE JOB jobcard information //* //STEP1 EXEC LCXXC,PARM.X='options' //X.SYSLIN DD DISP=OLD,DSN=your.object.dataset //X.SYSTRIN DD DISP=SHR,DSN=your.source.dataset //X.ext DD DISP=SHR,DSN=your.headers.dataset // |
Using the LCXXC Cataloged Procedure //PROJECT1 JOB jobcard information //* //* Translator input: FRIEND.PROJ.CXX(MAIN1) //* Translator options: NONE //* Compiler options: RENT //* Header Files: FRIEND.PROJ.H, LEADER.SYSTEM.H //* Object code: FRIEND.PROJ.OBJ(MAIN1) //* //MAINXC EXEC LCXXC,PARM.X='RENT' //X.SYSLIN DD DISP=OLD, // DSN=FRIEND.PROJ.OBJ(MAIN1) //X.SYSTRIN DD DISP=SHR, // DSN=FRIEND.PROJ.CXX(MAIN1) //X.H DD DISP=SHR,DSN=FRIEND.PROJ.H // DD DISP=SHR,DSN=LEADER.SYSTEM.H // |
In general, the LCXXCA cataloged procedure is used as shown here:
//SAMPLE JOB jobcard information //* // EXEC LCXXCA,MEMBER=AR-archive-member, // PARM='options' //X.SYSTRIN DD DISP=SHR, // DSN=your.source.dataset //A.SYSARLIB DD DISP=OLD, // DSN=your.AR.dataset // |
Note that the MEMBER= parameter is required with this cataloged procedure. AR-archive-member is the AR370 archive member in which you want the
compiler output stored. The
options
are any translator, compiler, or, if the OMD option is used to run
the OMD370 utility, OMD370 options. See Option Summary for the options that are available for use
with the translator. You need only provide a SYSTRIN
DD statement to describe your source data set and a SYSARLIB DD statement
to describe your output AR370 archive. The X.ext DD statement
is optional and describes the PDS that the translator searches for header
files. Note that you never use a SYSLIN DD statement with the LCXXCA cataloged
procedure. Using the LCXXCA Cataloged Procedure
illustrates using the LCXXCA cataloged procedure.
Using the LCXXCA Cataloged Procedure //PROJECT1 JOB jobcard information //* //* Translator input: FRIEND.PROJ.CXX(MAIN1) //* Translator options: SNAME //* Compiler options: RENT //* AR370 archive/member: PROJECT.CXX.A(PARSER) //* // EXEC LCXXCA,MEMBER=PARSER, // PARM='RENT,SNAME(PARSER)' //X.SYSTRIN DD DISP=SHR, // DSN=FRIEND.PROJ.CXX(MAIN1) //A.SYSARLIB DD DISP=OLD,DSN=PROJECT.CXX.A // |
Under MVS batch, the intermediate
code produced by the translator is sent to the DDname SYSTROUT, which by default
is associated with a temporary file. You can make the output file permanent
by using the
pponly
or
tronly
options in combination with altering the
SYSTROUT DD statement. Here is a brief description of each of these options:
To save the C code resulting from translation when compiling your program,
change SYSTROUT to refer to a permanent data set (no option is necessary).
For detailed information on the
pponly
and
tronly
options, refer to Option Descriptions .
When
the filename is surrounded by angle brackets in an
#include
statement, the translator
searches for the header file in standard C and C++ header files supplied by
SAS Institute. The format of this form of the
#include
statement is:
#include <member.ext> |
#include <new.h> |
For this statement, the translator includes the file named ddn:SYSLIB(NEW). To include a header file from your personal files (as opposed to header files from system files), surround the filename with double quotes, as shown here:
#include "member.ext" |
The translator assumes that the header file is member
in a PDS described by the ext DD statement. The .ext
part can be omitted, in which case it defaults to .h. For example,
suppose you had the following
#include
statement in your program:
#include "project.h" |
In this case, the translator attempts to include the member PROJECT
from the data set associated with the DDname H. If the file is not found,
the translator searches the system header files for the member.
All
C++ programs must be preprocessed by the COOL object code preprocessor because
COOL automatically creates object code used during the initialization and
termination of static objects. In addition, COOL supports linking object files
that contain mixed case external names longer than eight characters, such
as those created by the compiler for source code generated by the translator.
Such external names cannot be handled by the
linkage editor unless the object code has been preprocessed by COOL. This
section describes the LCXXCL and LCXXL cataloged procedures.
The cataloged procedures consist of various JCL statements, some of which are DD statements. Sometimes you may want to override some of the DD statements in the procedures. The following list describes the most commonly overridden DD statements in the linking step. The descriptions include a brief overview of each statement's purpose and any pertinent DCB requirements for the data sets described by the DD statement.
Note: These DD statements apply to not only the LCXXCL and LCXXL procedures but
to all cataloged procedures that link programs (LCXXCL, LCXXL, LCXXLG, and
LCXXCLG).
//LKED.SYSARLIB DD // DD DSN=PROJECT.CPLUS.A,DISP=SHR |
Alternatively, you can put your archive first:
//LKED.SYSARLIB DD DSN=PROJECT.CPLUS.A, // DISP=SHR // DD DSN=SASC.CXX.A,DISP=SHR |
The SYSARLIB archives must have RECFM=U.
In addition, one or more DD statements describing user INCLUDE libraries
or AR370 archives may be required.
The LCXXCL and LCXXL cataloged procedures, as well as the LCXXCLG and LCXXLG cataloged procedures described in the next section, support the ENV parameter and the ALLRES parameter.
The ENV parameter is used to select the program environment. The default is ENV=STD, indicating that the module runs in a normal C environment.
The ALLRES parameter is used to specify whether the program uses the all-resident library or the transient library. The default is ALLRES=NO.
In most cases, these parameters should be left to take their default
values. Refer to the SAS/C Compiler and Library User's Guide
for more information about these parameters.
The LCXXCL cataloged procedure invokes the translator and compiler in one job step, followed by COOL and the linkage editor in another step. As in the LCXX procedure, you can also optionally run the OMD370 utility. In general, the LCXXCL cataloged procedure is used as shown in LCXXCL Cataloged Procedure .
LCXXCL Cataloged Procedure //SAMPLE JOB jobcard information //* //STEP1 EXEC LCXXCL,CALLLIB='your.object.lib', // PARM.X='C++-options', // PARM.LKED='COOL-options' //X.SYSTRIN DD DISP=SHR,DSN=your.source.dataset //X.ext DD DISP=SHR,DSN=your.headers.dataset //LKED.SYSARLIB DD // DD DISP=SHR,DSN=private.AR370.archive //LKED.SYSLMOD DD DISP=OLD, // DSN=your.load.module(member) //LKED.SYSLDLIB DD DSN=your-autocall-load-lib, // DISP=SHR //NAME DD DISP=SHR // DD DSN=OTHER.NAME |
By default, the LCXXCL cataloged procedure passes the LIST and MAP options to the linkage editor. You can override this default by specifying different options via PARM.LKED. You should provide a SYSTRIN DD statement to describe your source data set and a SYSLMOD DD statement to describe your load module data set. Using the LCXXCL Cataloged Procedure illustrates using the LCXXCL cataloged procedure.
Using the LCXXCL Cataloged Procedure //PROJECT1 JOB jobcard information //* //* Translator input: FRIEND.PROJ.CXX(MAIN1) //* Translator options: NONE //* Compiler options: RENT //* Header files: FRIEND.PROJ.H, //* LEADER.SYSTEM.H //* Autocall object library: LEADER.SYSTEM.OBJ //* Linkage Editor options: LIST,MAP,XREF, //* AMODE=31,RMODE=ANY //* AR370 archive: PROJECT.CPLUS.A //* Load module: FRIEND.PROJ.LOAD(MAIN1) //* Autocall load library: SYS1.ISPLOAD //* (ISPF interface load module) //* //MAINXCL EXEC LCXXCL, // PARM.X='RENT', // PARM.LKED=('LIST,MAP,XREF', // 'AMODE=31,RMODE=ANY'), // CALLLIB='LEADER.SYSTEM.OBJ' //X.SYSTRIN DD DISP=SHR, // DSN=FRIEND.PROJ.CXX(MAIN1) //X.H DD DISP=SHR,DSN=FRIEND.PROJ.H // DD DISP=SHR,DSN=LEADER.SYSTEM.H //LKED.SYSARLIB DD // DD DISP=SHR,DSN=PROJECT.CPLUS.A //LKED.SYSLMOD DD DISP=OLD, // DSN=FRIEND.PROJ.LOAD(MAIN1) //LKED.SYSLDLIB DD DISP=SHR,DSN=SYS1.ISPLOAD // |
The LCXXL cataloged procedure invokes COOL and the linkage editor to preprocess and linkedit object code produced by another job. In general, the LCXXL cataloged procedure is used as shown in LCXXL Cataloged Procedure .
LCXXL Cataloged Procedure //SAMPLE JOB jobcard information //* //STEP1 EXEC LCXXL, // CALLLIB='your.object.library', // PARM.LKED='options' //LKED.SYSARLIB DD // DD DISP=SHR, // DSN=private.AR370.archive //LKED.SYSLMOD DD DISP=OLD, // DSN=your.load.module(member) //LKED.SYSIN DD DISP=SHR, // DSN=your.object.dataset //LKED.libname DD DISP=SHR, // DSN=your.object.library //LKED.SYSLDLIB DD DSN=your-autocall-load-lib, // DISP=SHR // |
By default, the LCXXL cataloged procedure passes the LIST and MAP options to the linkage editor. You can override this default by specifying different options via PARM.LKED. You should provide a SYSIN DD statement to describe your primary input data set, and a SYSLMOD DD statement to describe your load module data set. Using the LCXXL Cataloged Procedure illustrates using the LCXXL cataloged procedure.
Using the LCXXL Cataloged Procedure //PROJECT1 JOB jobcard information //* //* Linkage Editor options: LIST,MAP,XREF, //* AMODE=31,RMODE=ANY //* COOL primary input: //* FRIEND.PROJ.OBJ(MAIN1) //* COOL secondary input: LEADER.SUBS.OBJ //* Autocall object library: //* LEADER.SYSTEM.OBJ //* Load module: FRIEND.PROG.LOAD(MAIN1) //* AR370 archive: PROJECT.CPLUS.A //* Autocall load library: SYS1.ISPLOAD //* //MAINXL EXEC LCXXL, // PARM.LKED=('LIST,MAP,XREF', // 'AMODE=31,RMODE=ANY'), // CALLLIB='LEADER.SYSTEM.OBJ' //LKED.SYSARLIB DD // DD DISP=SHR,DSN=PROJECT.CPLUS.A //LKED.SYSLMOD DD DISP=OLD, // DSN=FRIEND.PROJ.LOAD(MAIN1) //LKED.SYSIN DD DISP=SHR, // DSN=FRIEND.PROJ.OBJ(MAIN1) //LKED.SUBLIB DD DISP=SHR, // DSN=LEADER.SUBS.OBJ //LKED.SYSLDLIB DD DISP=SHR,DSN=SYS1.ISPLOAD // |
You
can choose to use one of two cataloged procedures to run your program, as
described in this section. The LCXXCLG procedure translates, compiles, links,
and runs a program. The LCXXLG procedure simply links and runs a program.
To run a C++ program, the DD statements described in the following list may be required.
cerr
stream should be written. The usual specification
for this statement is SYSOUT=A. This DD statement is optional but highly recommended.
All library error messages are written to this file.cin
stream is read. This DD statement is optional.Other DD statements may be needed if you want to run your program under the SAS/C Debugger. Refer to the SAS/C Debugger User's Guide and Reference for more information. In addition, further DD statements may be required to define files opened by your program.
Specify program arguments, library options, standard file redirections,
and environment variables via the PARM.GO parameter of the EXEC statement.
If you want to generate a dump, use a SYSUDUMP DD statement.
The LCXXCLG cataloged procedure is identical to the LCXXCL cataloged procedure, with the addition of a GO step to run the program. In general, the LCXXCLG cataloged procedure is used as shown in LCXXCLG Cataloged Procedure .
LCXXCLG Cataloged Procedure //SAMPLE JOB jobcard information //* //STEP1 EXEC LCXXCLG, // CALLLIB='your.object.library', // PARM.X='C++-options', // PARM.LKED='COOL-options', // PARM.GO='program-options' //X.SYSTRIN DD DISP=SHR, // DSN=your.source.dataset //X.ext DD DISP=SHR, // DSN=your.headers.dataset //LKED.SYSARLIB DD DD DISP=SHR, // DSN=private.AR370.archive //LKED.libname DD DISP=SHR, // DSN=your.object.library //LKED.SYSLDLIB DD DSN=your-autocall-load-lib, // DISP=SHR //GO.DBGIN DD DISP=SHR, // DSN=your.debugger.input //GO.SYSIN DD DISP=SHR, // DSN=your.program.input // |
Pass run-time options for your program such as program arguments, library
options, and standard file re-directions via the PARM.GO parameter. In addition
to the DD statements used with the LCXXCL cataloged procedure, you should
provide a SYSIN DD statement for the GO step to describe the
cin
input stream for your program, if necessary.
By default, the
cout
stream (SYSPRINT)
and
cerr
stream (SYSTERM) are specified as SYSOUT data sets. Using the LCXXCLG Cataloged Procedure illustrates using the LCXXCLG
cataloged procedure.
Using the LCXXCLG Cataloged Procedure //PROJECT1 JOB jobcard information //* //* Translator input: FRIEND.PROJ.CXX(MAIN1) //* Translator options: NONE //* Compiler options: NONE //* Header files: FRIEND.PROJ.H, //* LEADER.SYSTEM.H //* Autocall object library: LEADER.SYSTEM.OBJ //* Linkage Editor options: LIST,MAP,XREF, //* AMODE=31,RMODE=ANY //* AR370 archive: PROJECT.CPLUS.A //* Program arguments: =48k -z //* Program input: MY.SAMPLE.INPUT(TEST1) //* //MAINXCLG EXEC LCXXCLG, // CALLLIB='LEADER.SYSTEM.OBJ' // PARM.LKED=('LIST,MAP,XREF', // 'AMODE=31,RMODE=ANY'), // PARM.GO='=48k -z' //X.SYSTRIN DD DISP=SHR, // DSN=FRIEND.PROJ.CXX(MAIN1) //X.H DD DISP=SHR,DSN=FRIEND.PROJ.H // DD DISP=SHR,DSN=LEADER.SYSTEM.H //LKED.SYSARLIB DD // DD DISP=SHR,DSN=PROJECT.CPLUS.A //GO.SYSIN DD DISP=OLD, // DSN=MY.SAMPLE.INPUT(TEST1) // |
The LCXXLG cataloged procedure is identical to the LCXXL cataloged procedure described earlier, with the addition of a GO step to run the linkedited program. In general, the LCXXLG cataloged procedure is used as shown in LCXXLG Cataloged Procedure .
LCXXLG Cataloged Procedure //SAMPLE JOB jobcard information //* //STEP1 EXEC LCXXLG, // CALLLIB='your.object.library', // PARM.LKED='COOL-options', // PARM.GO='program-options' //LKED.SYSIN DD DISP=SHR, // DSN=your.object.dataset //LKED.libname DD DISP=SHR, // DSN=your.object.library //LKED.SYSLDLIB DD DSN=your-autocall-load-lib, // DISP=SHR //LKED.SYSARLIB DD DD DISP=SHR, // DSN=private.AR370.archive //GO.DBGIN DD DISP=SHR, // DSN=your.debugger.input //GO.SYSIN DD DISP=SHR, // DSN=your.program.input // |
Pass run-time options for your program such as program arguments, library
options, and standard file re-directions via the PARM.GO parameter. In addition
to the DD statements used with the LCXXL cataloged procedure, you should provide
a SYSIN DD statement for the GO step to describe the cin stream for your program,
if necessary. By default, the
cout
stream (SYSPRINT) and
cerr
stream
(SYSTERM) are specified as SYSOUT data sets. Using the LCXXLG Cataloged Procedure illustrates using the LCXXLG cataloged procedure.
Using the LCXXLG Cataloged Procedure //PROJECT1 JOB jobcard information //* //* COOL autocall: LEADER.SYSTEM.OBJ //* Linkage Editor options: LIST,MAP,XREF, //* AMODE=31,RMODE=ANY //* AR370 archive: PROJECT.CPLUS.A //* Program arguments: =48k -z //* Program input: MY.SAMPLE.INPUT(TEST1) //* //MAINLG EXEC LCXXLG, // CALLLIB='LEADER.SYSTEM.OBJ', // PARM.LKED=('LIST,MAP,XREF', // 'AMODE=31,RMODE=ANY'), // PARM.GO='=48k -z' //LKED.SYSIN DD DISP=SHR, // DSN=FRIEND.PROJ.OBJ(MAIN1) //LKED.SYSARLIB DD DISP=SHR, // DSN=PROJECT.CPLUS.A //GO.SYSIN DD DISP=OLD, // DSN=MY.SAMPLE.INPUT(TEST1) // |
This section lists the JCL for the six cataloged procedures available
for the translator. Use this section for reference to determine the proper
order of DD statements when you are writing overriding JCL. The procedures
are listed in the following order: LCXXC, LCXXCA, LCXXCL, LCXXL, LCXXCLG,
and LCXXLG.
This procedure translates and compiles your code.
//LCXXC PROC //******************************************* //* NAME: LCXXC //* SUPPORT: C COMPILER DIVISION //* PRODUCT: SAS/C C++ DEVELOPMENT SYSTEM //* PROCEDURE: TRANSLATE AND COMPILE //* DOCUMENTATION: SAS/C C++ DEVELOPMENT //* SYSTEM USER'S GUIDE //* FROM: SAS INSTITUTE INC., SAS CAMPUS DR., //* CARY, NC 27513 //******************************************* //* //X EXEC PGM=LC370CX //STEPLIB DD DSN=SASC.LOAD, // DISP=SHR TRANSLATOR LIBRARY // DD DSN=SASC.LINKLIB, // DISP=SHR RUNTIME LIBRARY //SYSTERM DD SYSOUT=A //SYSPRINT DD SYSOUT=A //SYSTROUT DD DSN=&&TROUT, // SPACE=(6160,(10,10)), // DISP=(NEW,PASS),UNIT=SYSDA //SYSIN DD DSN=*.SYSTROUT, // VOL=REF=*.SYSTROUT, // DISP=(OLD,PASS) //SYSUT1 DD UNIT=SYSDA,SPACE=(TRK,(10,10)) //SYSUT2 DD UNIT=SYSDA,SPACE=(TRK,(10,10)) //SYSUT3 DD UNIT=SYSDA,SPACE=(TRK,(10,10)) //SYSTRDB DD UNIT=SYSDA,SPACE=(TRK,(10,10)) //SYSLIN DD DSN=&&OBJECT, // SPACE=(3200,(10,10)), // DISP=(MOD,PASS),UNIT=SYSDA, // DCB=(RECFM=FB,LRECL=80) //SYSLIB DD DSN=SASC.MACLIBC, // DISP=SHR C++ AND C STANDARD HEADERS //SYSDBLIB DD DSN=&&DBGLIB, // SPACE=(4080,(20,20,1)),DISP=(,PASS), // UNIT=SYSDA,DCB=(RECFM=U,BLKSIZE=4080) //SYSTMP01 DD UNIT=SYSDA, // SPACE=(TRK,25) VS1 ONLY //SYSTMP02 DD UNIT=SYSDA, // SPACE=(TRK,25) VS1 ONLY |
This procedure translates and compiles your code and stores the compiler output (object code) in an AR370 archive.
//LCXXCA PROC MEMBER=DO.NOT.OMIT //******************************************* //* NAME: LCXXCA //* SUPPORT: C COMPILER DIVISION //* PRODUCT: SAS/C C++ DEVELOPMENT SYSTEM //* PROCEDURE: TRANSLATE AND COMPILE //* DOCUMENTATION: SAS/C C++ DEVELOPMENT //* SYSTEM USER'S GUIDE //* FROM: SAS INSTITUTE INC., SAS CAMPUS DR., //* CARY, NC 27513 //******************************************* //* //X EXEC PGM=LC370CX //STEPLIB DD DSN=SASC.LOAD, // DISP=SHR TRANSLATOR LIBRARY // DD DSN=SASC.LINKLIB, // DISP=SHR RUNTIME LIBRARY //SYSTERM DD SYSOUT=A //SYSPRINT DD SYSOUT=A //SYSTROUT DD DSN=&&TROUT, // SPACE=(6160,(10,10)), // DISP=(NEW,PASS),UNIT=SYSDA //SYSIN DD DSN=*.SYSTROUT, // VOL=REF=*.SYSTROUT, // DISP=(OLD,PASS) //SYSUT1 DD UNIT=SYSDA, // SPACE=(TRK,(10,10)) //SYSUT2 DD UNIT=SYSDA, // SPACE=(TRK,(10,10)) //SYSUT3 DD UNIT=SYSDA, // SPACE=(TRK,(10,10)) //SYSTRDB DD UNIT=SYSDA, // SPACE=(TRK,(10,10)) //SYSLIN DD DSN=&&OBJECT(&MEMBER), // SPACE=(3200,(10,10,1)), // DISP=(NEW,PASS),UNIT=SYSDA, // DCB=(RECFM=FB,LRECL=80,DSORG=PO) //SYSLIB DD DSN=SASC.MACLIBC, // DISP=SHR C++ AND C STANDARD HEADERS //SYSDBLIB DD DSN=&&DBGLIB, // SPACE=(4080,(20,20,1)), // DISP=(,PASS), // UNIT=SYSDA, // DCB=(RECFM=U,BLKSIZE=4080) //SYSTMP01 DD UNIT=SYSDA, // SPACE=(TRK,25) VS1 ONLY //SYSTMP02 DD UNIT=SYSDA, // SPACE=(TRK,25) VS1 ONLY //A EXEC PGM=AR370#,PARM=R, // COND=(4,LT,X) //STEPLIB DD DSN=SASC.LOAD, // DISP=SHR COMPILER LIBRARY // DD DSN=SASC.LINKLIB, // DISP=SHR RUNTIME LIBRARY //SYSTERM DD SYSOUT=A //SYSPRINT DD SYSOUT=A //SYSARLIB DD DSN=&&AR, // SPACE=(4080,(10,10)), // DISP-(NEW,PASS),UNIT=SYSDA //OBJECT DD DSN=*.C.SYSLIN, // VOL=REF=*.C.SYSLIN, // DISP=(OLD,PASS) //SYSIN DD DSN=SASC.BASEOBJ(AR@OBJ), // DISP=SHR |
This procedure translates, compiles, and links your program.
//LCXXCL PROC ENV=STD,ALLRES=NO, // CALLLIB='SASC.BASEOBJ', // MACLIB='SASC.MACLIBC', // SYSLIB='SASC.BASEOBJ', // CXXLIB='SASC.LIBCXX.A' //******************************************* //* NAME: LCXXCL //* SUPPORT: C COMPILER DIVISION //* PRODUCT: SAS/C C++ DEVELOPMENT SYSTEM //* PROCEDURE: TRANSLATE, COMPILE, COOL, //* LINK EDIT //* DOCUMENTATION: SAS/C C++ DEVELOPMENT //* SYSTEM USER'S GUIDE //* FROM: SAS INSTITUTE INC., SAS CAMPUS DR., //* CARY, NC 27513 //******************************************* //* //******************************************* //* ENV=STD: MODULE RUNS IN THE NORMAL C //* ENVIRONMENT //* ENV=CICS: MODULE RUNS IN A //* CICS C ENVIRONMENT //* ENV=GOS: MODULE RUNS USING THE //* GENERALIZED SYSTEM ENVIRONMENT //* ENV=SPE: MODULE USES THE SYSTEMS //* PROGRAMMING ENVIRONMENT //******************************************* //X EXEC PGM=LC370CX //STEPLIB DD DSN=SASC.LINKLIB, // DISP=SHR C RUNTIME LIBRARY // DD DSN=SASC.LOAD, // DISP=SHR TRANSLATOR LIBRARY //SYSTERM DD SYSOUT=A //SYSPRINT DD SYSOUT=A //SYSTROUT DD DSN=&&TROUT, // SPACE=(6160,(10,10)), // DISP=(NEW,PASS),UNIT=SYSDA //SYSIN DD DSN=*.SYSTROUT, // VOL=REF=*.SYSTROUT, // DISP=(OLD,PASS) //SYSUT1 DD UNIT=SYSDA, // SPACE=(TRK,(10,10)) //SYSUT2 DD UNIT=SYSDA, // SPACE=(TRK,(10,10)) //SYSUT3 DD UNIT=SYSDA, // SPACE=(TRK,(10,10)) //SYSTRDB DD UNIT=SYSDA, // SPACE=(TRK,(10,10)) //SYSLIN DD DSN=&&OBJECT, // SPACE=(3200,(10,10)), // DISP=(MOD,PASS),UNIT=SYSDA, // DCB=(RECFM=FB,LRECL=80) //SYSLIB DD DSN=SASC.MACLIBC, // DISP=SHR C++ AND C STANDARD HEADERS //SYSDBLIB DD DSN=&&DBGLIB, // SPACE=(4080,(20,20,1)), // DISP=(,PASS), UNIT=SYSDA, // DCB=(RECFM=U,BLKSIZE=4080) //SYSTMP01 DD UNIT=SYSDA, // SPACE=(TRK,25) VS1 ONLY //SYSTMP02 DD UNIT=SYSDA, // SPACE=(TRK,25) VS1 ONLY //LKED EXEC PGM=COOLB,PARM='LIST,MAP', // REGION=1536K,COND=(8,LT,X) //STEPLIB DD DSN=SASC.LINKLIB, // DISP=SHR C RUNTIME LIBRARY // DD DSN=SASC.LOAD, // DISP=SHR COMPILER LIBRARY //SYSPRINT DD SYSOUT=A, // DCB=(RECFM=FBA,LRECL=121,BLKSIZE=1210) //SYSTERM DD SYSOUT=A //SYSIN DD DSN=*.X.SYSLIN, // VOL=REF=*.X.SYSLIN, // DISP=(OLD,PASS) //SYSLIN DD UNIT=SYSDA,DSN=&&LKEDIN, // SPACE=(3200,(20,20)), // DCB=(RECFM=FB,LRECL=80,BLKSIZE=3200) //SYSLIB DD DDNAME=AR#&ALLRES //* ARESOBJ OR STDOBJ OR SPEOBJ // DD DSN=SASC.&ENV.OBJ, // DISP=SHR STDOBJ OR SPEOBJ OR GOSOBJ // DD DSN=&SYSLIB,DISP=SHR //* COMMON RESIDENT LIBRARY // DD DSN=&CALLLIB,DISP=SHR //SYSDBLIB DD DSN=*.X.SYSDBLIB,DISP=OLD, // VOL=REF=*.X.SYSDBLIB //SYSARLIB DD DSN=&CXXLIB,DISP=SHR //SYSUT1 DD DSN=&&SYSUT1,UNIT=SYSDA, // DCB=BLKSIZE=1024, // SPACE=(1024,(200,50)) //SYSLMOD DD DSN=&&LOADMOD(MAIN), // DISP=(,PASS),UNIT=SYSDA, // SPACE=(1024,(50,20,1)) //AR#NO DD DSN=SASC.&ENV.OBJ,DISP=SHR //AR#YES DD DSN=SASC.ARESOBJ,DISP=SHR |
This procedure links an already translated and compiled program.
//LCXXL PROC ENV=STD,ALLRES=NO, // CALLLIB='SASC.BASEOBJ', // SYSLIB='SASC.BASEOBJ' // CXXLIB='SASC.LIBCXX.A' //******************************************* //* NAME: LCXXL //* SUPPORT: C COMPILER DIVISION //* PRODUCT: SAS/C C++ DEVELOPMENT SYSTEM //* PROCEDURE: COOL, LINK EDIT //* DOCUMENTATION: SAS/C C++ DEVELOPMENT //* SYSTEM USER'S GUIDE //* FROM: SAS INSTITUTE INC., SAS CAMPUS DR., //* CARY, NC 27513 //******************************************* //* //******************************************* //* ENV=STD: MODULE RUNS IN THE NORMAL C //* ENVIRONMENT //* ENV=CICS: MODULE RUNS IN A CICS //* C ENVIRONMENT //* ENV=GOS: MODULE RUNS IN THE GENERALIZED //* OPERATING SYSTEM ENVIRONMENT //* ENV=SPE: MODULE USES THE SYSTEMS //* PROGRAMMING ENVIRONMENT //********************************************* //LKED EXEC PGM=COOLB,PARM='LIST,MAP', // REGION=1536K //STEPLIB DD DSN=SASC.LINKLIB, // DISP=SHR C RUNTIME LIBRARY // DD DSN=SASC.LOAD, // DISP=SHR COMPILER LIBRARY //SYSPRINT DD SYSOUT=A, // DCB=(RECFM=FBA,LRECL=121,BLKSIZE=1210) //SYSTERM DD SYSOUT=A //SYSLIN DD UNIT=SYSDA,DSN=&&LKEDIN, // SPACE=(3200,(20,20)), // DCB=(RECFM=FB,LRECL=80,BLKSIZE=3200) //SYSLIB DD DDNAME=AR#&ALLRES //* ARESOBJ OR STDOBJ OR SPEOBJ // DD DSN=SASC.&ENV.OBJ, // DISP=SHR STDOBJ OR SPEOBJ OR GOSOBJ // DD DSN=&SYSLIB,DISP=SHR //* COMMON RESIDENT LIBRARY // DD DSN=&CALLLIB,DISP=SHR //SYSDBLIB DD DSN=&&DBGLIB, // SPACE=(4080,(20,20,1)), // DISP=(,PASS),UNIT=SYSDA, // DCB=(RECFM=U,BLKSIZE=4080) //SYSARLIB DD DSN=&CXXLIB,DISP=SHR //SYSUT1 DD DSN=&&SYSUT1,UNIT=SYSDA, // DCB=BLKSIZE=1024, // SPACE=(1024,(200,50)) //SYSLMOD DD DSN=&&LOADMOD(MAIN), // DISP=(,PASS),UNIT=SYSDA, // SPACE=(1024,(50,20,1)) //AR#NO DD DSN=SASC.&ENV.OBJ,DISP=SHR //AR#YES DD DSN=SASC.ARESOBJ,DISP=SHR |
This procedure translates, compiles, links, and executes your program.
//LCXXCLG PROC ENV=STD,ALLRES=NO, // CALLLIB='SASC.BASEOBJ', // MACLIB='SASC.MACLIBC', // SYSLIB='SASC.BASEOBJ', // CXXLIB='SASC.LIBCXX.A' //******************************************* //* NAME: LCXXCLG //* SUPPORT: C COMPILER DIVISION //* PRODUCT: SAS/C C++ DEVELOPMENT SYSTEM //* PROCEDURE: TRANSLATE, COMPILE, COOL, //* LINK EDIT, GO //* DOCUMENTATION: SAS/C C++ DEVELOPMENT //* SYSTEM USER'S GUIDE //* FROM: SAS INSTITUTE INC., SAS CAMPUS DR., //* CARY, NC 27513 //******************************************* //* //******************************************* //* ENV=STD: MODULE RUNS IN THE NORMAL C //* ENVIRONMENT //* ENV=CICS: MODULE RUNS IN A CICS //* C ENVIRONMENT //* ENV=GOS: MODULE RUNS IN THE GENERALIZED //* OPERATING SYSTEM ENVIRONMENT //* ENV=SPE: MODULE USES THE SYSTEMS //* PROGRAMMING ENVIRONMENT //******************************************* //X EXEC PGM=LC370CX //STEPLIB DD DSN=SASC.LOAD, // DISP=SHR TRANSLATOR LIBRARY // DD DSN=SASC.LINKLIB, // DISP=SHR C RUNTIME LIBRARY //SYSTERM DD SYSOUT=A //SYSPRINT DD SYSOUT=A //SYSTROUT DD DSN=&&TROUT, // SPACE=(6160,(10,10)), // DISP=(NEW,PASS),UNIT=SYSDA //SYSIN DD DSN=*.SYSTROUT, // VOL=REF=*.SYSTROUT, // DISP=(OLD,PASS) //SYSUT1 DD UNIT=SYSDA, // SPACE=(TRK,(10,10)) //SYSUT2 DD UNIT=SYSDA, // SPACE=(TRK,(10,10)) //SYSUT3 DD UNIT=SYSDA, // SPACE=(TRK,(10,10)) //SYSLIN DD DSN=&&OBJECT, // SPACE=(3200,(10,10)), // DISP=(MOD,PASS),UNIT=SYSDA, // DCB=(RECFM=FB,LRECL=80) //SYSLIB DD DSN=&MACLIB, // DISP=SHR C++ AND C STANDARD HEADERS //SYSDBLIB DD DSN=&&DBGLIB, // SPACE=(4080,(20,20,1)), // DISP=(,PASS),UNIT=SYSDA, // DCB=(RECFM=U,BLKSIZE=4080) //SYSTMP01 DD UNIT=SYSDA, // SPACE=(TRK,25) VS1 ONLY //SYSTMP02 DD UNIT=SYSDA, // SPACE=(TRK,25) VS1 ONLY //LKED EXEC PGM=COOLB,PARM='LIST,MAP', // REGION=1536K,COND=(8,LT,X) //STEPLIB DD DSN=SASC.LINKLIB, // DISP=SHR C RUNTIME LIBRARY // DD DSN=SASC.LOAD, // DISP=SHR COMPILER LIBRARY //SYSPRINT DD SYSOUT=A, // DCB=(RECFM=FBA,LRECL=121,BLKSIZE=1210) //SYSTERM DD SYSOUT=A //SYSIN DD DSN=*.X.SYSLIN, // VOL=REF=*.X.SYSLIN,DISP=(OLD,PASS) //SYSLIN DD UNIT=SYSDA,DSN=&&LKEDIN, // SPACE=(3200,(20,20)), // DCB=(RECFM=FB,LRECL=80,BLKSIZE=3200) //SYSLIB DD DDNAME=AR#&ALLRES //* ARESOBJ OR STDOBJ OR SPEOBJ // DD DSN=SASC.&ENV.OBJ, // DISP=SHR STDOBJ OR SPEOBJ OR GOSOBJ // DD DSN=&SYSLIB,DISP=SHR //* COMMON RESIDENT LIBRARY // DD DSN=&CALLLIB,DISP=SHR //SYSDBLIB DD DSN=*.X.SYSDBLIB,DISP=OLD, // VOL=REF=*.X.SYSDBLIB //SYSARLIB DD DSN=&CXXLIB,DISP=SHR //SYSUT1 DD DSN=&&SYSUT1,UNIT=SYSDA, // DCB=BLKSIZE=1024, // SPACE=(1024,(200,50)) //SYSLMOD DD DSN=&&LOADMOD(MAIN), // DISP=(,PASS),UNIT=SYSDA, // SPACE=(1024,(50,20,1)) //AR#NO DD DSN=SASC.&ENV.OBJ,DISP=SHR //AR#YES DD DSN=SASC.ARESOBJ,DISP=SHR //GO EXEC PGM=*.LKED.SYSLMOD, // COND=((8,LT,X),(4,LT,LKED)) //STEPLIB DD DSN=SASC.LINKLIB, // DISP=SHR C TRANSIENT LIBRARY //SYSPRINT DD SYSOUT=A //SYSTERM DD SYSOUT=A //DBGTERM DD SYSOUT=A //DBGLOG DD SYSOUT=A //DBGLIB DD DSN=*.X.SYSDBLIB, // DISP=(OLD,PASS), // VOL=REF=*.X.SYSDBLIB //SYSTMPDB DD UNIT=SYSDA, // SPACE=(TRK,25) VS1 ONLY |
This procedure links and executes an already translated and compiled program.
//LCXXLG PROC ENV=STD,ALLRES=NO, // CALLLIB='SASC.BASEOBJ', // SYSLIB='SASC.BASEOBJ', // CXXLIB='SASC.LIBCXX.A' //******************************************* //* NAME: LCXXLG //* SUPPORT: C COMPILER DIVISION //* PRODUCT: SAS/C C++ DEVELOPMENT //* PROCEDURE: COOL, LINK EDIT, GO //* DOCUMENTATION: SAS/C C++ DEVELOPMENT //* SYSTEM USER'S GUIDE //* FROM: SAS INSTITUTE INC., SAS CAMPUS DR., //* CARY, NC 27513 //******************************************* //* //******************************************* //* ENV=STD: MODULE RUNS IN THE NORMAL C //* ENVIRONMENT //* ENV=CICS: MODULE RUNS IN A CICS //* C ENVIRONMENT //* ENV=GOS: MODULE RUNS IN THE GENERALIZED //* OPERATING SYSTEM ENVIRONMENT //* ENV=SPE: MODULE USES THE SYSTEMS //* PROGRAMMING ENVIRONMENT //******************************************* //LKED EXEC PGM=COOLB,PARM='LIST,MAP', // REGION=1536K //STEPLIB DD DSN=SASC.LINKLIB, // DISP=SHR C RUNTIME LIBRARY // DD DSN=SASC.LOAD, // DISP=SHR COMPILER LIBRARY //SYSPRINT DD SYSOUT=A, // DCB=(RECFM=FBA,LRECL=121,BLKSIZE=1210) //SYSTERM DD SYSOUT=A //SYSLIN DD UNIT=SYSDA,DSN=&&LKEDIN, // SPACE=(3200,(20,20)), // DCB=(RECFM=FB,LRECL=80,BLKSIZE=3200) //SYSLIB DD DDNAME=AR#&ALLRES //* ARESOBJ OR STDOBJ OR SPEOBJ // DD DSN=SASC.&ENV.OBJ, // DISP=SHR STDOBJ OR SPEOBJ OR GOSOBJ // DD DSN=&SYSLIB,DISP=SHR //* COMMON RESIDENT LIBRARY // DD DSN=&CALLLIB,DISP=SHR //SYSDBLIB DD DSN=&&DBGLIB, // SPACE=(4080,(20,20,1)), // DISP=(,PASS),UNIT=SYSDA, // DCB=(RECFM=U,BLKSIZE=4080) //SYSARLIB DD DSN=&CXXLIB,DISP=SHR //SYSUT1 DD DSN=&&SYSUT1,UNIT=SYSDA, // DCB=BLKSIZE=1024, // SPACE=(1024,(200,50)) //SYSLMOD DD DSN=&&LOADMOD(MAIN), // DISP=(,PASS),UNIT=SYSDA, // SPACE=(1024,(50,20,1)) //AR#NO DD DSN=SASC.&ENV.OBJ,DISP=SHR //AR#YES DD DSN=SASC.ARESOBJ,DISP=SHR //GO EXEC PGM=*.LKED.SYSLMOD, // COND=(4,LT,LKED) //STEPLIB DD DSN=SASC.LINKLIB, // DISP=SHR C TRANSIENT LIBRARY //SYSPRINT DD SYSOUT=A //SYSTERM DD SYSOUT=A //DBGTERM DD SYSOUT=A //DBGLOG DD SYSOUT=A //SYSTMPDB DD UNIT=SYSDA, // SPACE=(TRK,25) VS1 ONLY |
![]() Chapter Contents |
![]() Previous |
![]() Next |
![]() Top of Page |
Copyright © Tue Feb 10 12:11:23 EST 1998 by SAS Institute Inc., Cary, NC, USA. All rights reserved.