Chapter Contents |
Previous |
Next |
Using the SAS/C C++ Development System under TSO, CMS, OS/390 Batch, and UNIX System Services |
This section describes six cataloged procedures that you can use to translate, compile, link, and run a C++ program. C++ Cataloged Procedures lists the procedures.
General Notes about the Cataloged Procedures |
Translating and Compiling Your Program under OS/390 Batch |
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.
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 //
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 SYSLIN DD statement to describe your object data set. The X.ext DD statement is optional and describes the PDS that the translator searches for header files. Using the LCXXC Cataloged Procedure illustrates using the LCXXC cataloged procedure.
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 OS/390 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>
The .ext part can be omitted. Here is an example of including a standard header file:
#include <new.h>
#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"
Linking Your Program under OS/390 Batch |
If you want to concatenate your own AR370 archive to the C++ library archive, you can do so. Here is an example of such a statement, which puts your AR370 archive (PROJECT.CPLUS.A) after the library archive:
//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.
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 //
Running Your Program under OS/390 Batch |
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.
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) //
Cataloged Procedure Listings |
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
//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 © 2001 by SAS Institute Inc., Cary, NC, USA. All rights reserved.