Developing the sample application with CICS Explorer SDK

This task describes the steps that are needed to create a modern batch application with CICS Explorer® SDK.

Before you begin

Follow the steps for installing and configuring the CICS® Modern Batch Feature Pack . See Installing the feature pack and Configuring Modern batch for CICS. A sample xJCL template is provided to help you create the xJCL for the batch job. See Understanding the xJCL.

You must download the JAR files from the feature pack to your local workstation.
Note: You must FTP the files in binary mode.

About this task

This task describes the steps that are needed to create a modern batch application with CICS Explorer SDK.

You can use this task to:
  • Create a Java™ project. This project contains all the artifacts for your batch application.
  • Configure the environment by adding necessary JARs to the Java build path
  • Create a Java class for each job step.

Procedure

  1. FTP the following JARs in binary mode:
    • From the feature pack install directory:
      • com.ibm.cics.batch.jar
      • pgcruntime.jar
      • batchframework.jar
    • From the CICS installation directory:
      • com.ibm.cics.server.jar
      • com.ibm.record.jar
  2. If it is not already running, start CICS Explorer SDK.
  3. Click File > New > Java Project. The New Java Project dialog box opens where you can enter the required information.
    For this example, set the Project name to MyBatchProject.
    Screen capture of the dialog box where you can define a new Java project. For this example, set the Project name to MyBatchProject.
  4. Click Next. The properties dialog box for the Java Build Path opens. You can tailor your development environment by adding JARs, variables, libraries, and class folders to the Java build path.
    This screen capture shows the dialog box where you can specify the components and libraries you want to use for your batch project. Select all the JARs imported in Step 1.
    Note: You can modify the build path later by right-clicking the project, then click Build Path > Configure Build Path.
  5. Add the JARs imported in step 1 to the build path.
  6. When you have all the components you need, click OK.

You must now create the XML file and the Java class for the job step.

  1. In the Package Explorer view, right-click the batch project folder and create a subfolder xJCL.
  2. Right-click the new xJCL folder and click New > Other.
  3. In the Select a wizard dialog box, click XML File. Click Next.
  4. In the New XML File dialog box, select the xJCL folder and enter the file name.
    Screen capture of the XML dialog box where you can create a new XML file.
  5. Click Finish.
  6. To create a Java class that represents a batch job step, switch to the Package Explorer view, right-click the src folder and click New > Class.

    Screen capture of the menu system where you can create a class for the samples package.
  7. Enter a name for an enclosing package and a name for the class. In the Interfaces section, click Add. The Implemented Interfaces Selection dialog box opens.
    Screen capture of the New Java Class dialog box with the Implemented Interfaces Selection dialog box used to add new interfaces to this Java class.
  8. Type BatchJobStepInterface into the Choose interfaces field.
    As you type, the matching items are displayed in the list.
  9. Select BatchJobStepInterface - com.ibm.websphere.batch and click Add.
    The interface is included in your Java class.
  10. Click OK to return to the New Java Class dialog box.
  11. Check Inherited abstract methods and click Finish.
    You now have the basic components of your batch project.

What to do next

You can now open the XML file in your editor and add the content that is required for your batch application. See Creating xJCL for the sample batch job.

You can then implement the methods in your job step class to run your business logic and deploy your application.