HP-UX SNAplus2 CPI-C Programmer's Guide (June 2003)
Sample CPI-C Transaction Programs
Testing the TPs
Chapter 4322
Testing the TPs
After examining the source code for CSAMPLE1 and CSAMPLE2, you
may want to test the programs.
Although CPI-C is normally used for communications between programs
on separate computers, you may find it convenient to run both programs
on the same computer for testing purposes.
To compile and link the programs for HP-UX systems, take the following
steps.
Step 1. Copy the three files csample1.c, csample2.c, and Makefile from the
directory /opt/sna/samples to a private directory.
Step 2. In the private directory, type the following commands:
make csample1
make csample2
On a 64–bit computer, use the following commands:
make csample1_64
make csample2_64
To run the programs, perform the following steps. Note that some of
these steps involve updating the SNAplus2 configuration, which is
usually performed by the System Administrator.
The programs can run on the same computer, or on separate computers.
In the following steps, the “source computer” is the computer where the
invoking program CSAMPLE1 runs, and the “target computer” is the
computer where the invoked program CSAMPLE2 runs.
Step 1. If you are running the programs on separate computers, configure the
communications link to support CP-CP sessions between the source and
target computers. See SNAplus2 Administration Guide for more
information.
Step 2. Configure a mode with mode name LOCMODE.
Step 3. Configure a logical unit (LU) on the source computer for CSAMPLE1 (the
invoking program). Specify TPLU1 as both the LU name and LU alias.
Leave the default values for the other parameters.