The BankDemo JES sample builds upon the BANKDEMO CICS application and demonstrates a JCL job that extracts, sorts and prints
a customer statement from the BankDemo database.
This sample uses resources stored on a local disk based file system rather than database-hosted.
This sample assumes that you have followed and completed the installation verification process described here
Installing and Verifying the Software
and you have successfully started and run the JCLDEMO region and have successfully submitted a test JCL.
The BankDemo JES sample files are in%PUBLIC%\Documents\Micro Focus\Enterprise Developer\samples\Mainframe\JCL\DotNet\BankDemo.
Follow steps 1 and 2 of the CICS BankDemo sample to create the database and compile the application. Stop at the end of step
2, and do not deploy to the database.
Then complete the following steps:
- Configure an XA resource definition for the bankdemo database as described in
Configuring XA resources
- An XA resource definition is used to tell the region how to connect to the database.
- Ensure that the application plan field in the XA resource definition is set correctly (BANKDEMO in this case).
- Call the XA resource "bank" and associate it with the JESBANK region.
- Create the JESBANK region.
These steps are not detailed, as most of the process has been previously described in other tutorials.
- Open the
Enterprise Server for .NET Administration UI.
- Create a new JES Region called JESBANK, hosted in the (local) database.
- Select the region startup called REGION_JESBANK.CONFIG file from the sample directory
- If you don't want to use the default catalog and data file locations, adjust them.
- Create a listener endpoint for the JESBANK region on a suitable mfbinp port.
- Start the region.
- Start the listener.
- Submit the JCL job entitled DEFBANK.JCL into the JESBANK region.
- This will create and initialize some required data sets in the catalog.
- Submit the JCL job entitled ZBNKSTMNT.JCL into the JESBANK region.
- This will perform three steps: extract, sort, and print.
- Examine the spool output at the end of the job to see the result.
The ZBNKSTMNT job runs three procs stored in the MF.PROCLIB PDS dataset:
- YBNKEXTS - extracts the data from the database.
It uses TSO syntax in a control card, KBNKTSO2.TXT stored in the MFI01.MFIDEMO.CTLCARDS PDS.
- YBNKSRT1 - sorts the retrieved data.
It uses sort parameters in a control card , KBNKSRT1.TXT stored in the MFIDEMO.MFI01.CTLCARDS PDS.
- YBNKPRT1 - prints the statement.
It invokes the COBOL program ZBNKPRT1 included in the BankDemo CICS sample.