CICS® provides a range of samples that you can use to help develop your own applications, and test various CICS functions (for example, as an aid to verifying that CICS has installed correctly). These programs are in the CICS 4.1 Sample Applications Guide and the Designing and Programming CICS Applications book.
Before you can use some of these samples, you must create the data sets that they use, and make them available to your CICS region, as described below. You do not need to create these data sets, unless you intend using the associated sample applications.
You can use this sample application to demonstrate BMS support for the Common User Access (CUA) interface. The application uses an action bar, with associated pull-downs, pop-ups, and help panels. The application programs demonstrate how to code COBOL programs to display, overlay, and remove CUA style windows.
To create the data sets that are needed by the CUA text level application, submit the following jobs: DFH0JCUS and DFH0JHLP, installed in the hlq.XDFHINST library.
You can cause CICS to dynamically allocate the files for these data sets and open them after CICS initialization by installing the sample resource definitions in the group DFH$CTXT. If no DD statement exists for these data sets in the CICS startup job stream, the files are allocated to the data sets with DSNAMEs that are specified in the resource definitions: hlq.SAMPLE.DFHCTCUS, hlq.SAMPLE.DFHCTHLP, and hlq.SAMPLE.DFHCTAIX, for the data sets and the alternate index. Alternatively, you can add DD statements for the data sets to your CICS startup job, which causes CICS to use the DSNAMEs specified on the DD statements instead of those in the resource definitions.
For information about this sample application, see the CICS 4.1 Sample Applications Guide .
This comprises four sets of command-level application programs that operate on the sample VSAM file FILEA. There is one set for each of the four programming languages that are supported, (Assembler, C, COBOL, and PL/I). These programs show basic functions, such as inquire, browse, add, and update, that can serve as a framework for your own first programs. They were all written before publication of the Common User Access guidelines.
A copy of the data set that is needed by the FILEA application is created when you submit the DFHDEFDS job, installed in the hlq.XDFHINST library.
When you tailor the CICS installation-related jobs, as described in Tailoring the CICS-supplied skeleton jobs, a DD statement for the FILEA data set is added to the CICS IVP jobs and the DFHSTART procedure. If you want CICS to dynamically allocate the data set and open the file, you should remove the DD statement and install a FILE resource definition with an appropriate DSNAME. (For example, as supplied in the group DFH$FILA.)
For information about this sample application, see the CICS 4.1 Sample Applications Guide .
You can use this sample application to demonstrate the design and programming of a traditional CICS application. It provides online inquiry and maintenance facilities for a sample customer credit file in a department store. The application uses VSAM files, and 3270 display and printer terminals. It was written before publication of the Common User Access guidelines, and provides similar function (without CUA support) as the CUA sample application.
To create the data sets that are needed by the Primer sample application, edit and submit the sample job that is shown in Figure 23.
You can cause CICS to dynamically allocate the files for these data sets and open them on first reference by installing the sample resource definitions in the group DFH$ACCT. If no DD statement exists for these data sets in the CICS startup job stream, the files are allocated to the data sets with DSNAMEs that are specified in the resource definitions: hlq.ACCTFILE and hlq.ACIXFILE. Alternatively, you can add DD statements for the data sets to your CICS startup job, which causes CICS to use the DSNAMEs specified on the DD statements instead of those in the resource definitions.
For information about this sample application, see the CICS Application Programming Primer.
//DEFACCTF JOB (accounting parameters),MSGCLASS=A,MSGLEVEL=(1,1),
// CLASS=A,NOTIFY=userid
//*
//*********************************************************************
//* CICS/ESA sample jobs to define ACCT files
//*
//* This job deletes and defines the following data sets for the
//* ACCT sample described in the CICS Application Programming Primer
//*
//* STEPS:
//* . DELETE AND DEFINE
//* - DELETE/DEFINE THE CLUSTERS FOR:
//* . CICSTS31.CICS.ACCTFILE
//* . CICSTS31.CICS.ACIXFILE
//*
//* THE HIGH-LEVEL-QUALIFIER(S) OF THE DATASETS: CICSTS31.CICS
//* THE VOLUME SERIAL CICS31
//* THE UNIT TYPE 3390
//*
//*********************************************************************
//DELETE EXEC PGM=IDCAMS,REGION=1M
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
DELETE CICSTS31.CICS.ACCTFILE
DELETE CICSTS31.CICS.ACIXFILE
SET MAXCC=0
/*
//DEFINE EXEC PGM=IDCAMS,REGION=1M
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
/* */
DEFINE CLUSTER(NAME(CICSTS31.CICS.ACCTFILE)-
KEYS(5 0)-
INDEXED -
RECORDSIZE(383 383)-
REC(80)-
SHR(2 3)-
VOLUMES(CICS31)) -
DATA(NAME(CICSTS31.CICS.ACCTFILE.DATA)-
UNIQUE)-
INDEX(NAME(CICSTS31.CICS.ACCTFILE.INDEX)-
UNIQUE)
/* */
DEFINE CLUSTER(NAME(CICSTS31.CICS.ACIXFILE)-
KEYS(17 0)-
INDEXED -
RECORDSIZE(63 63)-
REC(80)-
SHR(2 3)-
VOLUMES(CICS31)) -
DATA(NAME(CICSTS31.CICS.ACIXFILE.DATA)-
UNIQUE)-
INDEX(NAME(CICSTS31.CICS.ACIXFILE.INDEX)-
UNIQUE)
/*
//*