01.01.2013 Views

CICS Transaction Gateway V5 The WebSphere ... - IBM Redbooks

CICS Transaction Gateway V5 The WebSphere ... - IBM Redbooks

CICS Transaction Gateway V5 The WebSphere ... - IBM Redbooks

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Once the file was created, we went into OMVS and marked EciB1Test as<br />

executable with the following command: chmod +x EciB1Test. You can verify<br />

this worked by doing a ls -l and verifying the last character in the first<br />

column is “x”.<br />

– You can see the first parameter after the name of the Java class is the<br />

location of the <strong>Gateway</strong> daemon (tcp://wtsc66oe.itso.ibm.com). Since the<br />

<strong>Gateway</strong> daemon was running on the same host as our Java client we<br />

could also have used the loopback IP address of 127.0.0.1 or “loopback” if<br />

it is defined in the TCP/IP configuration.<br />

– <strong>The</strong> final parameter on the EciB1 line is the TCP/IP port used by the<br />

<strong>Gateway</strong> daemon. This defaults to 2006, but we added it anyway.<br />

With the script marked as executable, we ran it by entering EciB1Test. <strong>The</strong><br />

results of our tests are shown in Example 7-14.<br />

Example 7-14 OMVS EciB1 test output<br />

$ [SC66] /u/cicsrs2: EciB1Test<br />

Usage: java com.ibm.ctg.samples.eci.EciB1 [<strong>Gateway</strong> Url] [<strong>Gateway</strong> Port Number]<br />

<strong>Gateway</strong> tcp://wtsc66oe.itso.ibm.com port:2006<br />

<strong>CICS</strong> Servers Defined:<br />

1. SCSCPJA1 -<br />

2. SCSCPJA2 -<br />

Choose Server to connect to, or q to quit:<br />

1<br />

Program EC01 returned with data:-<br />

Hex: 32342f30362f30322031353a30363a32300<br />

ASCII text: 24/06/02 15:06:20<br />

6. Once we knew the basic <strong>CICS</strong> TG functions were working, we tested the<br />

transaction EXCI functions using the supplied EciI1 sample class. We used<br />

ISHELL to create /u/cicsrs2/EciI1Test. This will be an executable script file<br />

with the contents shown in Example 7-15.<br />

Example 7-15 OMVS test script file<br />

export CLASSPATH=/usr/lpp/ctg500/ctg/classes/ctgsamples.jar<br />

export CLASSPATH=$CLASSPATH:/usr/lpp/ctg500/ctg/classes/ctgclient.jar<br />

echo $CLASSPATH<br />

java com.ibm.ctg.samples.eci.EciI1 tcp://wtsc66oe.itso.ibm.com 2006<br />

Once the file was created, we went into OMVS and marked EciI1Test as<br />

executable with the following command: chmod +x EciI1Test. You can verify<br />

Chapter 7. TCP connections to the <strong>Gateway</strong> daemon on z/OS 161

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!