Container link support sample setup instructions

In order to run the CICS® application containing links 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

Procedure

  1. To associate the sample with your CICS server, you need to change the connection information in the bean implementation class.
  2. Open Ec03Impl.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="your conenction URL"
     * @j2c.managedConnectionFactory-property name="portNumber" value="your port number"
     * @j2c.managedConnectionFactory-property name="serverName" value="your server name"
     * @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 TestEc03.java program: To directly invoke and run the sample program, you use theTestCustomer.java file. You pass in a CustomerNumber, and then the corresponding CustomerInfo is returned.
    1. Right click CICS32KSample > sample.cics > TestEc03.java and select Run As > Java Application.

Results

You can see the results in the console:
sample.cics.data.EC03ChannelRecord@24602460
sample.cics.data.OutputContainer@24e524e5
Input data was: Boo                                                     
sample.cics.data.InputContainer@256f256f
Boo             
sample.cics.data.LengthContainer@25942594
Buffer Size: 4 bytes

10000000 00000000 00000000 00000000  |................|



16
Input data was: Boo
Boo

Feedback