Chapter Contents

Previous

Next
Tutorial: Creating a Simple Transaction

Preparing the Example Program

To run the example under CICS, you must first use the SAS/C CICS translator and the SAS/C Compiler and Library to preprocess, compile, and link-edit the source code. You can perform these steps under OS/390, VM, or with the SAS/C Cross-Compiler product under UNIX. In this section, we use TSO under OS/390 and OS/390 batch to illustrate how to prepare the example so you can run it under CICS.


Using TSO under OS/390

Using TSO, you execute a CLIST that invokes the translator, then proceed with compilation and linking as you would with any SAS/C program.

Because the translator is itself a C program, you must ensure that the transient run-time library is allocated to the DDname CTRANS or is installed in the system link list. Your installation will probably cause it to be allocated automatically. Consult your SAS Software Representative for SAS/C software products to determine if this has been done. If not, use the TSO ALLOCATE command to associate the library with the CTRANS DDname, as shown in the following example:

ALLOC FI(CTRANS) DA('SASC.LINKLIB') SHR

To translate the SAS/C example program, you execute the LCCCP CLIST. Specify the input data set as the SAS/C sample library, and specify the output data set as one of your own user data sets, as shown in the following example:

LCCCP 'SASC.SAMPLE(SASCSAMP)' OUTPUT(your.data-set)

Next, you execute the regular SAS/C compilation CLIST, LC370. Specify as input the same data set as the one used for OUTPUT in the previous step. If you are not familiar with these steps using the SAS/C compiler, see the SAS/C Compiler and Library User's Guide for additional information on executing SAS/C CLISTs. In particular, see the sections on TSO execution styles.

After you have preprocessed and compiled the example program, you are ready to execute the regular SAS/C link-edit CLIST, CLK370. Specify as input the data set that contains the output from the LC370 CLIST. Specify, via the LOAD option, the name of your CICS program library. Specify the CICS option so that CICS resident-routines are included at link time.

Refer to Preprocessing, Compiling, and Linking and to the SAS/C Compiler and Library User's Guide for more information on how to execute SAS/C CLISTs.


Using OS/390 Batch

Under OS/390 batch, you first build a job stream that executes the cataloged procedure LCCCPCL. Allocate the SASC.SAMPLE library to the SYSIN DD of the translator step (CCP). The PDS member name of the example program is SASCSAMP. Allocate your CICS program library to the SYSLMOD DD of the link-edit step (LKED). An example follows:

//jobname  JOB ...
// EXEC LCCCPCL
//CCP.SYSIN  DD DSN=SASC.SAMPLE(SASCSAMP),DISP=SHR
//LKED.SYSLMOD DD DSN=your.cics.loadlib(SASCSAMP),
   DISP=SHR

You're now ready to submit the job stream for execution. All return codes will be 0 if the translation, compilation, and link-edit have been successful. Refer to Preprocessing, Compiling, and Linking and to the SAS/C Compiler and Library User's Guide for more information on how to execute SAS/C cataloged procedures.


Chapter Contents

Previous

Next

Top of Page

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