Running the CatalogManagerStockUpdate sample

This task contains the steps that are required to run the CatalogManagerStockUpdate sample application.

Before you begin

Complete the configuration steps that are contained in Configuring the CICS Modern Batch Feature Pack.

About this task

The CatalogManagerStockUpdate sample can be used alone, or with the CICS Catalog Manager example application. In this example, when new stock arrives, a batch program is run that updates stock levels in the Catalog Manager stock file. The Catalog Manager is a high availability application so the file must be updated while online processing continues. The batch application uses the Java batch programming model, which allows the batch program to run in CICS at the same time as the existing online Catalog Manager application.

The sample demonstrates:
  • Using a BatchDataStream to read input from a CICS managed VSAM KSDS file.
  • Linking to existing COBOL business logic.
  • Using a BatchDataStream to update records in a CICS managed VSAM KSDS file.

Procedure

  1. Create the required VSAM files.
    Copy <INSTALL_HLQ>.SDFHBATI(DFHBSDAT) and edit the copy as follows:
    1. Change all instances of <INSTALL_HLQ> to the MVS high-level qualifier for the Feature pack.
    2. Change all instances of <VOL> to the disk volume where you want to create the data sets.
    3. Review the JCL job card and update as appropriate.
    4. Save your changes and submit the job.
      The job should complete with a return code of 0.
    The following data sets are created:
    • <INSTALL_HLQ>.BATCH.SAMPIN (Sample VSAM input file)
    • <INSTALL_HLQ>.BATCH.SAMPIN.DATA
    • <INSTALL_HLQ>.BATCH.SAMPIN.INDEX
    • <INSTALL_HLQ>.BATCH.SAMPOUT (Sample VSAM output file.)
    • <INSTALL_HLQ>.BATCH.SAMPOUT.DATA
    • <INSTALL_HLQ>.BATCH.SAMPOUT.INDEX
  2. Update and submit the configuration job <INSTALL_HLQ>.SDFHBATI(DFHBSCSD) to create a group for the sample of DFH$BASM.
    1. Change all instances of <BATCHINST> to the feature pack INSTALL_HLQ on MVS.
    2. Change <YOUR_CSD> to the data set name of your CICS CSD.
    3. Change <CICS_INSTALL_HLQ> to your CICS INSTALL_HLQ on MVS.
    4. Review the JCL job card and STEPLIB statements and change them as appropriate. You may need to change the STEPLIB DD to point to your CICS SDFHLOAD library.
    5. Save your changes and submit the job.
      The job should complete with a return code of 0.
  3. Go to https://<WAS_ND_Host_Name>:<WAS_ND_Port>/jmc/console.jsp to display the Job Management Console.
    For example: https://ibmdij54f60ch8.hursley.ibm.com:9080/jmc/console.jsp
  4. Click Job Management > Submit a job.
  5. Copy the xml file <install root>/batchfp/samples/config/CICSBatchSamplexJCL.xml to your local workstation.
  6. Click Local file system > Browse, and select the CICSBatchSamplexJCL.xml file
  7. Click Submit.
    The web page displays a message:
    Successfully submitted the job definition CICSBatchSamplexJCL.xml with job ID CICSBatchSample:xxxxx
    where xxxxx is the job ID.
  8. Optional: To view the job status, click Job Management > View jobs and search the table for the job ID.
    If you see an error message, follow the diagnosis instructions in Troubleshooting and support.