Chapter Contents

Previous

Next
Preprocessing, Compiling, and Linking

Creating C++ CICS Applications under OS/390 Batch

This release of the SAS/C CICS command language translator provides four cataloged procedures to facilitate the creation of C++ CICS applications under OS/390:

LCCPCXX
invokes the CICS translator, C++ translator, and compiler.

LCCCXXL
invokes COOL (SAS/C's prelinker) and the linkage editor.

LCCPCXXL
invokes the CICS translator, the C++ translator, the compiler, COOL, and the linkage editor in a single step.

LCCPCXXA
invokes the CICS translator, the C++ translator, the compiler, and the AR370 archive utility in a single step.

Here's an example of the JCL necessary to invoke the first two cataloged procedures listed above:

//COMPILE    EXEC LCCPCXX,PARM.CCP='CICS options',PARM.X='C++ options'
//CCP.SYSIN    DD DSN=your.source.library(member),DISP=SHR
//X.SYSLIN     DD DSN=your.object.library(member),DISP=SHR
//*
//LINK       EXEC LCCCXXL,PARM.LKED='COOL and LINK EDIT options'
//LKED.SYSLMOD DD DSN=your.cics.load(member),DISP=SHR
//LKED.SYSIN   DD DSN=your.object.library(member),DISP=SHR


LCCPCXX

You must provide two DD statements when you invoke the LCCPCXX cataloged procedure:
SYSIN your C++ source program that contains EXEC CICS commands.
SYSLIN your object library.

Note:    You must always compile CICS applications with the RENT option; you can specify this option in the PARM.X option list.  [cautionend]

The LCCPCXX procedure contains the JCL shown in Expanded JCL for LCCPCXX.


Expanded JCL for LCCPCXX
//LCCPCXX PROC //**************************************************************** //* NAME: LCCPCXX (LCCPCXX) *** //* PRODUCT: SAS/C++ *** //* PROCEDURE: INVOKE CICS/VS COMMAND LANGUAGE TRANSLATOR, *** //* C++ TRANSLATOR, COMPILER *** //* DOCUMENTATION: SAS/C++ TRANSLATOR USER'S GUIDE *** //* FROM: SAS INSTITUTE INC. *** //* SAS CAMPUS DRIVE *** //* CARY, NC 27513 *** //**************************************************************** //* //CCP EXEC PGM=LCCCP0,REGION=1536K //STEPLIB DD DSN=SASC.LINKLIB, // DISP=SHR C RUNTIME LIBRARY // DD DSN=SASC.LOAD, // DISP=SHR C COMPILER LIBRARY //SYSTERM DD SYSOUT=* //SYSPRINT DD SYSOUT=*, // DCB=(RECFM=FBA,LRECL=121,BLKSIZE=1210) //SYSPUNCH DD UNIT=SYSDA,DSN=&&CCPOUT,DISP=(,PASS), // DCB=(RECFM=VB,LRECL=259), // SPACE=(TRK,(5,5)) //* //X EXEC PGM=LC370CX,PARM='RENT' //STEPLIB DD DSN=SASC.LOAD, // DISP=SHR TRANSLATOR LIBRARY // DD DSN=SASC.LINKLIB, // DISP=SHR RUNTIME LIBRARY //SYSTERM DD SYSOUT=* //SYSPRINT DD SYSOUT=* //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=SASC.MACLIBC, // DISP=SHR C/C++ STANDARD HEADER FILES //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 //SYSTRIN DD DSNAME=*.CCP.SYSPUNCH,DISP=(OLD,DELETE,DELETE), // VOL=REF=*.CCP.SYSPUNCH


LCCCXXL

You must provide two DD statements when you invoke the LCCCXXL cataloged procedure:

SYSIN
your object library.

SYSLMOD
your CICS application load module library.

Note:    CICS applications must always be link-edited with the RENT option; you can specify this option in the PARM.LKED option list.  [cautionend]

The LCCCXXL procedure contains the JCL shown in Expanded JCL for LCCCXXL.


Expanded JCL for LCCCXXL
//LCCCXXL PROC ENV=CICS,ALLRES=NO,ENTRY=MAIN, // CALLLIB='SASC.BASEOBJ', // SYSLIB='SASC.BASEOBJ', // CICSLIB='CICS330.SDFHLOAD', // CXXLIB='SASC.A' //**************************************************************** //* NAME: LCCCXXL (LCCCXXL) *** //* PRODUCT: SAS/C++ *** //* PROCEDURE: CICS C++ APPLICATION CLINK *** //* DOCUMENTATION: SAS/C++ TRANSLATOR USER'S GUIDE *** //* FROM: SAS INSTITUTE INC. *** //* SAS CAMPUS DRIVE *** //* CARY, NC 27513 *** //**************************************************************** //**************************************************************** //* ENV=CICS: MODULE RUNS IN A CICS ENVIRONMENT //* ENV=VSE: MODULE RUNS IN A CICS/VSE ENVIRONMENT //* ENV='CICS.SPE': MODULE RUNS IN A CICS SPE ENVIRONMENT //* ENTRY=MAIN: MODULE IS A NORMAL C MAIN PROGRAM //* ENTRY=DYN: MODULE IS DYNAMICALLY LOADABLE //* ENTRY=CSPE: ENTRY POINT IS CICS SPE STANDARD START-UP ROUTINE //* ENTRY=NONE: ENTRY POINT TO BE ASSIGNED BY USER //**************************************************************** //* //LKED EXEC PGM=COOLB,PARM='RENT,LIST,MAP',REGION=1536K //STEPLIB DD DSN=SASC.LOAD, // DISP=SHR C COMPILER LIBRARY // DD DSN=SASC.LINKLIB, // DISP=SHR C RUNTIME LIBRARY //SYSPRINT DD SYSOUT=*,DCB=(RECFM=FBA,LRECL=121,BLKSIZE=1210) //SYSTERM DD SYSOUT=* //SYSLIN DD UNIT=SYSDA,DSN=&&LKEDIN,SPACE=(3200,(20,20)), // DCB=(RECFM=FB,LRECL=80,BLKSIZE=3200) //SYSLKCTL DD DSN=SASC.CICSOBJ(EP@&ENTRY), // DISP=SHR // DD DSN=*.SYSLIN,VOL=REF=*.SYSLIN, // DISP=(SHR,PASS) //SYSLIB DD DDNAME=AR#&ALLRES ARESOBJ OR ENVIRONMENT OBJ FILE // DD DSN=SASC.&ENV.OBJ, // DISP=SHR ENVIRONMENT SPECIFIC OBJECT FILE // DD DSN=&SYSLIB,DISP=SHR COMMON RESIDENT LIBRARY // DD DSN=&CALLLIB,DISP=SHR //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.CICS.ARESOBJ, // DISP=SHR //DFHLIB DD DSN=&CICSLIB,DISP=SHR CICS APPLICATION STUBS


LCCPCXXL

This cataloged procedure invokes the CICS translator, the C++ translator, the compiler, COOL, and the linkage editor in one step. Input to this step is provided by the CCP.SYSIN DD statement and the link-edited load module is placed in the data set referred to on the LKED.SYSLMOD DD statement, as follows:

//PCL        EXEC LCCPCXXL,PARM.CCP='CICS options',
//         PARM.X='C++ options',PARM.LKED='COOL and Link Edit options'
//CCP.SYSIN    DD DSN=your.source.library(member),DISP=SHR
//LKED.SYSLMOD DD DSN=your.cics.load(member),DISP=SHR


LCCPCXXA

This cataloged procedure invokes the CICS translator, the C++ translator, the compiler, and the AR370 archive utility in a single step. Input to this step is provided by the CCP.SYSIN DD statement, and the object code generated by the compiler is placed in the archive referred to on the A.SYSARLIB DD statement, as follows:

//PCA        EXEC LCCPCXXA,PARM.CCP='CICS options',
//         PARM.X='C++ options',PARM.A='AR370 options'
//CCP.SYSIN    DD DSN=your.source.library(member),DISP=SHR
//A.SYSARLIB   DD DSN=your.ar.library,DISP=SHR


Chapter Contents

Previous

Next

Top of Page

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