Same input and output sample setup instructions

In order to run the command bean sample, follow the instructions below.

Before you begin

  1. Make sure you have a clean workspace.
  2. You need to set up a CICS® transaction gateway on a machine to access the server. You also need to perform some setup work on the CICS server, where you want the CICS COBOL program to execute. These steps are not covered; contact your CICS server administrator for setup and connection information to your CICS server.

About this task

After you import the sample:

You need to configure the server and associate the sample with it using the following steps:

Procedure

  1. To associate the sample with your CICS server, you need to change the connection information in the bean implementation class.
  2. Open CustomerImpl.java in a Java™ editor, and change the following tag to include your CICS server connection information.
    /**
     * @j2c.managedConnectionFactory class="com.ibm.connector2.cics.ECIManagedConnectionFactory"
     * @j2c.managedConnectionFactory-property name="connectionURL" value="connectionURL"
     * @j2c.managedConnectionFactory-property name="password" value="password"
     * @j2c.managedConnectionFactory-property name="serverName" value="serverName"
     * @j2c.managedConnectionFactory-property name="userName" value="userName"
     * @j2c.connectionSpec class="com.ibm.connector2.cics.ECIConnectionSpec"
     * @generated
     */  
  3. Note that this example uses the default port 2006. If your port number is different, you need to add a tag to define the port number.
  4. Testing the application using the TestCustomer.java program: To directly invoke and run the sample program, you will use the TestCustomer.java file. You will pass in a CustomerNumber, and then the corresponding CustomerInfo will be returned.
    1. Right click Taderc99 > sample.cics > TestCustomer.java and select Run As > Java Application.

Results

You can see the results in the console:

Sample application output


Feedback