Chapter Contents

Previous

Next
Using the SAS/C C++ Development System under TSO, CMS, OS/390 Batch, and UNIX System Services

Creating C++ Programs under OS/390 Batch

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.

C++ Cataloged 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.


General Notes about the Cataloged Procedures

Note the following considerations when you use any of the cataloged procedures described in this section:


Translating and Compiling Your Program under OS/390 Batch

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 OS/390 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.

DD statements used in translation and compilation

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).  [cautionend]

SYSTROUT DD statement
describes the data set that is used to contain the translator output. Usually this is a temporary data set. The data set can be sequential or a member of a PDS.

SYSTRIN DD statement
describes the translator input data set. This data set can have either fixed- or variable-length records of any length. It can be blocked or unblocked and can be sequential or a member of a PDS. The SYSTRIN DD statement is required.

SYSLIB DD statement
describes one or more standard header file data sets. These data sets must be partitioned. They can have either fixed- or variable-length records of any length and can be blocked or unblocked. However, all SYSLIB data sets must have the same record format and record length, and the one with the largest block size must be first. Usually, SYSLIB includes SASC.MACLIBC; if so, all other partitioned data sets must match the SASC.MACLIBC record format and record length (RECFM=FB, LRECL=80). The SYSLIB DD statement is required if any standard header files are included in the primary input file.

SYSLIN
describes a file that is used for the compiled object code. It can be a sequential data set or a PDS member. Its DCB should specify RECFM=FB and LRECL=80, and the BLKSIZE value should be no greater than 3200. No SYSLIN statement should be provided if you use the LCXXCA cataloged procedure.

SYSDBLIB
describes a file that contains debugging information for the compilation. This file must be a PDS. Its DCB should specify RECFM=U and BLKSIZE=4080. A SYSDBLIB DD statement is needed only if you use the translator debug option, DBGOBJ, or use the AUTOINST option.

SYSARLIB
applies only to the LCXXA cataloged procedure. It describes an output AR370 archive. The compiled object code is stored in a member of the archive. Because C++ programs use extended names, if you want to autocall your C++ functions, you must store them in an AR370 archive, not in a PDS. For more information on AR370 archives, refer to the SAS/C Compiler and Library User's Guide.

In addition, the translator may require one or more DD statements describing user-defined header files, as mentioned previously.

LCXXC cataloged procedure

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 //


LCXXCA cataloged procedure

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 //


Saving the output data set under OS/390 batch

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:
pponly performs only the preprocessing step. The program is not translated or compiled. The output data set contains C++ code.
tronly performs the preprocessing and translation steps. The program is not compiled. The output data set contains C code.

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.

Locating header files under OS/390 batch

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>

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.


Linking Your Program under OS/390 Batch

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.

DD statements used in linking

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).   [cautionend]

SYSDBLIB
describes a file that contains debugging information for the compilation. This file must be a PDS. Its DCB should specify RECFM=U and BLKSIZE=4080. A SYSDBLIB DD statement is needed only if you use the debug option, DBGOBJ, or use the AUTOINST option.

SYSLIB
defines an object code call library to COOL. If you want to use a single additional call library, you should use the CALLLIB symbolic parameter, as described in the SAS/C Compiler and Library User's Guide. If you need several such libraries, you should concatenate them after the standard libraries referenced by the cataloged procedure.

SYSLDLIB
is an optional DD statement that defines any user or system autocall libraries needed in load module form. Members in SYSLDLIB are left unresolved by COOL and are resolved by the linkage editor.

SYSLMOD
defines the load module library and the member where the output of the linkage editor is to be stored.

SYSIN
identifies the primary input to COOL. If you are using a procedure that runs the translator and compiler as well as COOL, you should not define your own SYSIN DD statement, as one is defined automatically by the procedure. If you are using LCXXL or LCXX LG, you must specify SYSIN. The SYSIN data set can be a sequential data set or a PDS member, and may contain object code, link-edit control statements such as INCLUDE, or both.

SYSARLIB
identifies one or more input AR370 archives. Each AR370 archive contains C or C++ routines to be linked into a load module by autocall. Because C++ programs use extended names, if you want to autocall your C++ functions you must store them in an AR370 archive, not in a PDS. For more information on AR370 archives, refer to the SAS/C Compiler and Library User's Guide.

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.

In addition, one or more DD statements describing user INCLUDE libraries or AR370 archives may be required.

ENV and ALLRES parameters

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.

LCXXCL cataloged procedure

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 //


LCXXL cataloged procedure

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

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.

DD statements used at run time

To run a C++ program, the DD statements described in the following list may be required.

SYSTERM
describes the data set to which the 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.

SYSPRINT
describes the data set to which the cout stream should be written. This DD statement is optional.

SYSIN
describes the data set from which the 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.

LCXXCLG cataloged procedure

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) //


LCXXLG cataloged procedure

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 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.

JCL for the LCXXC cataloged procedure

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


JCL for LCXXCA cataloged procedure

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


JCL for the LCXXCL cataloged procedure

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


JCL for the LCXXL cataloged procedure

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


JCL for the LCXXCLG cataloged procedure

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


JCL for the LCXXLG cataloged procedure

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.