z/OS MVS Programming: Writing Transaction Programs for APPC/MVS
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Calling APPC/MVS Test Services from Your Application

z/OS MVS Programming: Writing Transaction Programs for APPC/MVS
SA23-1397-00

To create a test shell by calling APPC/MVS test services from your application, do the following:
  1. Logon to TSO/E with a logon procedure that does not allocate APPC/MVS conversations when an APPC/MVS TP is to be tested.
  2. Catalog the data set that contains the load module for the TP to be tested.
  3. Allocate all required data sets to the TSO/E address space where the TP is to run, including a data set for TP message log. See the section on logging transaction program processing in z/OS MVS Planning: APPC/MVS Management.
  4. Ensure that no active APPC conversations are in progress in the TSO/E address space, and that all resources from prior conversations are cleaned up in the TSO/E address space.
  5. Establish the required environment for the TP under test, as described in Test Shell Characteristics.
  6. Ensure that the TP under test belongs to an APPC/MVS local LU that allows user-level TP profiles. Although you are not required to have a user-level TP profile when testing a TP under a TSO/E user ID, you must enable the LU for user-level TP profiles. See Enabling an LU for User-Level TP Profiles.
  7. Enter calls to the Register_Test and Accept_Test services from the TP to be tested. The sequence of these calls is shown in Figure 1:
    Figure 1. Use of Test Services by a TP Test Shell
    Note: If the call to Register_Test fails, APPC resources might be active in the TSO/E address space where the TP is to run. To initialize your environment, you should logoff TSO/E, and then logon again. Do not logon to TSO/E again without first logging off (this will not initialize your environment).
  8. Invoke an outbound TP to start a conversation with the inbound TP (the TP to be tested) under APPC/MVS. The outbound TP should specify the following values when calling the Allocate service to allocate the conversation:
    • The user ID under which the TP under test (the inbound TP) is running
    • A Security_type of security_pgm or security_same.

    See APPC/MVS TP Conversation Callable Services for a complete description of the parameters that are required on an Allocate call from an outbound TP.

  9. Run the load module that contains the TP to be tested (you must take this step because the APPC/MVS test services ignore any JCL in the TP profile).
  10. Enter calls to the Cleanup_TP and Unregister_Test services from the TP to be tested.
  11. When the test is complete, end the TP under test. You can call one of the following Cleanup_TP services to deallocate and clean up any conversations and resources that are left after the test is complete:
    • ATBCUC1, if the test shell is problem state and PSW key 8
    • ATBCTP1, if the test shell is supervisor state or PSW key 0-7.

If you want to repeat a test of a TP, you must call the Register_Test service again.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014