This appendix discusses and provides source listings
for some of the example programs available in the SASC.SAMPLE data sets under
OS/390 and the LCSAMPLE MACLIB under CMS.
The sample programs comprise an application that shows
a main selection menu on the display enabling the user to inquire, add, update,
and browse records.
The example application is provided in source code only.
Before executing the sample programs, you need to construct and install executable
load modules. Also, you need to define the maps, programs, and transactions
to the CICS environment.
Basic Mapping Support (BMS) maps are an integral part
of this application. The source code for these maps is also supplied in the
SASC.SAMPLE library under OS/390 and the LCSAMPLE MACLIB under CMS. These
maps are called SASCAMA, SASCAMB, and SASCAMC. Chapter 7, "Terminal
Control and Basic Mapping Support," provides additional information
about creating BMS maps for SAS/C applications.
The examples assume that the traditional CICS FILEA
data set has been installed at your site. Please consult your CICS systems
manager or the CICS Installation and Operations manual if the
FILEA example is not installed.
Perform the following tasks to construct the sample
application. After these tasks are complete, you can execute the sample application
by keying the transaction identifier SMNU in the top-left corner of the CICS
terminal screen and pressing the EN TER key. From there, follow the instructions
presented on the menu to direct you through the rest of the example.
-
Assemble the BMS maps and link-edit them into
your CICS application map library. You also need to create C language structures
that define those maps. The C structures can be stored in your C application
header files, or they can be placed in the standard header file library.
To accomplish this, you can use the IBM cataloged procedure DFHMAPS and the
SAS Institute cataloged procedure DSECT2C. See Terminal Control and Basic Mapping Support for more information on these
steps.
-
Translate, compile, and link-edit the example
programs. The resulting load modules need to be available to CICS on the
DFHRPL DD concatenation. The SAS Institute cataloged procedure LCCCPCL, CLIST's
LCCCP and CLK370, or CMS EXEC's LCCCP and CLINK can be used to accomplish
this task. See Preprocessing, Compiling, and Linking for more information on translating, compiling, and linking.
-
Define
the programs, maps, and transactions to
CICS. Sample CICS table-entry macros for these resources are provided in
the SASC.SAMPLE library as member name SASCTBLS. These macros can be copied
into your own tables, then reassembled and reinstalled; or the macros can
serve as information when using Resource Definition Online (RDO, transaction
identifier CEDA) to define and install the resources.
As you look over these examples, note the way exceptional
conditions are handled. In C, functions are executed when a HANDLE CONDITION
request is raised rather than using branches that depend on response code
values.
Copyright © 2001
by SAS Institute Inc., Cary, NC, USA. All rights reserved.