Verify TRS connectivity

The following procedure tests the connectivity between TRS and the mainframe.


Define the test region (TCP/IP only)

StepsTo define the test region

  1. Log in to TRS as “sa”:

    isql -Sservice_name -Usa -P
    
  2. At the isql prompt, enter:

    exec sgw_addregion region, “ipaddress”|hostname, “portnumber” 
    go
    

    NoteAny entry beginning with a number must be entered with double quotes.

    where:

    • region is the name of the destination CICS region, or you can use ConnectionSpec3 from a service definition worksheet.

    • ipaddress|hostname is the IP address or the hostname, the name that corresponds to the TCP/IP network hostname, or you can use ConnectionSpec1 from a service definition worksheet.

    • portnumber is the port number, or you can use ConnectionSpec2 from a service definition worksheet.


Define the test region (LU 6.2 only)

StepsTo define the test connection

  1. Log in to TRS as “sa”:

    isql -Strslu62service -Usa -P
    
  2. At the isql prompt, enter:

    exec sgw_addconn lualias, plualias, snamode, “max_sessions”
    go
    

    where:

    • lualias is the local logical unit (LU) from your worksheet.

    • plualias is the name of the partner logical unit (PLU) on your worksheet.

    • snamode is the SNA mode name from your worksheet.

    • max_sessions is the maximum number of sessions that can run concurrently over this connection.


Define the test RPC

Define an RPC to execute in the defined region. The SYM2 transaction is a simple CICS transaction that fabricates data and requires no external resources such as DB2 or VTAM.

StepsTo define the test RPC

  1. At the isql prompt, enter:

    exec sgw_addrpc SYM2, SYM2, CICSregion, security
    
    go
    

    where:

    • sgw_addrpc is the RPC name.

    • SYM2 (1st occurrence) is the RPC name of the remote procedure.

    • SYM2 (2nd occurrence) is the transaction ID at the mainframe.

    • CICSregion is the CICS region name:

      • For TCP/IP, it must match the region name given in the sgw_addregion procedure.

      • For LU 6.2, it must match the region parameter in the sgw_addcon procedure.

    • security is the type of user login information TRS passes to the transaction processing region. Enter one of the following:

      • none – indicates that no user IDs are passed to the mainframe for this test.

      • both – sends both user ID and password to the mainframe for this test.

      • userid – sends the user ID to the mainframe for this test.


Run the sample

StepsTo run the sample

  1. Enter this at the isql prompt to run the “SYM2” sample:

    exec SYM2 a, 4
    

    The output should be similar to this:

    TESTDATA
    
    -----------------------------------------------
    
    		U6T42P01
    
    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
    
    		U6T42P01
    
    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
    
    		U6T42P01
    
    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
    
    		U6T42P01
    
    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
    
    (4 rows affected, return status = 0)
    

Check for error messages

The MSG request can return any of several types of error messages. Some mainframe access products messages are written to the error log at MSG; others are returned to the client.


CSP scripts

Sybase provides three scripts for you to use with CSPs:

Installing CSPs

The 15_0_addcat script executes the sgw_addrpc procedure automatically for each CSP. Before you run 15_0_addcat, modify the script to suit your installation.

Use your text editor to specify the value of these parameters:

After you edit the script to suit your installation, run the 15_0_addcat script as input to your TRS. The following isql example shows how to run the 15_0_addcat script with a TRS named “new_TRS”:

isql -Snew_TRS -Usa -P < 15_0_addcat
go

This script automatically executes the sgw_addrpc procedure for each CSP.

Testing CSPs

The 15_0_testcat script uses the AMD2 transaction to create temporary tables and execute each CSP. At least one row is returned for each CSP and the 15_0_testcat script then drops the temporary tables.

Run the 15_0_testcat script as input to your TRS. The following isql example shows how to run the 15_0_testcat script with a TRS named “new_TRS”:

isql -Snew_TRS -Usa -P < 15_0_testcat
go

This script automatically tests each of the CSPs.

Dropping CSPs

The 15_0_dropcat script drops the CSPs from TRS. Run the 15_0_addcat script as input to your TRS.

This isql example shows how to run the 15_0_dropcat script with a TRS named “new_TRS”:

isql -Snew_TRS -Usa -P < 15_0_dropcat
go

This script automatically drops the CSPs.