Previous Page Contents Page Next Page

6.3 Testing the TPs

After examining the source code for the two programs, you may want to test the programs.

Although APPC is normally used for communications between a local and a remote computer, you may find it convenient to run both TPs on the same SNAP-IX computer for testing purposes.

To compile and link the TPs for a Solaris system, take the following steps.

  1. Copy the two files asample1.c and asample2.c from the directory /opt/sna/samples to a private directory.

  2. Follow the instructions in Compiling and Linking the APPC Application to compile and link each program. Add the command-line option to link with the CSV library in addition to the APPC library, because the programs use CSV functions in addition to APPC.

To run the TPs, perform the following steps. Note that some of these steps involve updating the SNAP-IX configuration, which is usually performed by the System Administrator.

The TPs can run on the same computer, or on separate computers. In the following steps, the source computer is the computer where the invoking TP asample1 runs, and the target computer is the computer where the invoked TP asample2 runs.

  1. If you are running the TPs on separate computers, configure the communications link to support CP-CP sessions between the source and target computers. See SNAP-IX Administration Guide for more information.

  2. Configure a mode. Specify LOCMODE as the mode name. Leave the default values for the other parameters.

  3. Configure a logical unit (LU) on the source computer for asample1 (the invoking TP). Set both the LU name and LU alias to TPLU1 (the LU alias specified in the asample1 program). Leave the default values for the other parameters.

  4. If you are running the TPs on separate computers, configure a partner LU alias on the source computer to identify the target LU. Set the partner LU name to netname.TPLU2, where netname is the SNA network name of the target computer.

  5. Configure an LU on the target computer for the invoked TP. Set both the LU name and LU alias to TPLU2 (the alias by which the asample1 program refers to the LU serving asample2). Leave the default values for the other parameters.

  6. Configure the invoked TP in the SNAP-IX invokable TP data file on the target computer. Refer to the SNAP-IX Administration Guide for more information.

    • For the TP name parameter, specify TPNAME2 (the name specified by the invoking TP).

    • For Full path to TP executable, enter the full path name of the executable file asample2.

    • For the User ID parameter, specify your Solaris user ID on the target computer.

    • Leave the default values for other parameters.

  7. Start the invoking program, asample1. This program requires one parameter, the full path name (on the target computer) of the file to be displayed. For example:

    asample1 /usr/john/myfile.text
  8. Enter F or B to display blocks of the requested file.

  9. Use Q to end program 1; program 2 will end as well.

Previous Page Contents Page Top of Page Next page