The following tests the connectivity between TRS and the mainframe.
This section assumes that you have already installed the SYM2 RPC.
To define the test region
Log into TRS as “sa”:
isql -Strstcpservice -Usa -P
At the isql prompt, enter the following command:
exec sgw_addregion region, “ipaddress”|hostname, “portnumber”
go
Any 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.
To define the test connection
Log into TRS as “sa”:
isql -Strslu62service -Usa -P
At the isql prompt, enter the following command:
exec sgw_addconn locallu, remotelu, snamode, “max_sessions”
go
Any entry beginning with a number must be entered with double quotes.
where:
locallu is the local logical unit (LU), or you can use ConnectionSpec1from your worksheet.
remotelu is the name of the partner logical unit (PLU), or it can be the ConnectionSpec2 on your worksheet.
snamode is the mode name, or it can be ConnectionSpec3 from your worksheet.
max_sessions is the maximum number of sessions that can run concurrently over this connection.
The following describes how to define an RPC to execute in the defined region. The SYM2 transaction is a simple CICS transaction that simulates data and requires no external resources such as DB2 or VTAM.
At the isql prompt, enter the following command:
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 remote lu parameter in the sgw_addcon procedure.
security is the type of login information TRS passes to the transaction processing region. Enter one of the following:
none, specify none to indicate that no user IDs are passed to the mainframe for this test.
both, specify both to send both user ID and password to the mainframe for this test.
userid, specify userid to send user ID to the mainframe for this test.
Enter the following at the isql prompt to run the SYM2 sample:
exec SYM2 a, 4
The output should be similar to the following:
TESTDATA
-----------------------------------------------
U6T42P01
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
U6T42P01
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
U6T42P01
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
U6T42P01
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
(4 rows affected, return status = 0)
Sybase provides three scripts for you to use with CSPs:
addcat - adds the CSPs to TRS.
dropcat - drops the CSPs from TRS.
testcat - tests the CSPs (requires that the AMD2 transaction be installed at the mainframe).
The addcat script executes the sgw_addrpc procedure automatically for each CSP. Before you run addcat, modify the script to suit your installation.
Use your text editor to specify the value of these parameters:
region parameter – name of the region you want the CSPs to execute against.
security parameter – value you can change to meet the security requirements at your installation. If you do not change it, the value is none.
rpc_name parameter – name or value must be coordinated with any change to the RPC names with the mainframe system programmer. If you are using ODBC applications, do not change the RPC names.
tran_id parameter – value or name of this parameter must be coordinated with any change to the transaction ID with the mainframe system programmer.
After you edit the script to suit your installation, run the addcat script as input to your TRS. The following isql example shows how to run the addcat script with a TRS named “new_TRS”:
isql -Snew_TRS -Usa -P < addcat
go
This script automatically executes the sgw_addrpc procedure for each CSP.
The 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 testcat script then drops the temporary tables.
Run the testcat script as input to your TRS. The following isql example shows how to run the testcat script with a TRS named “new_TRS”:
isql -Snew_TRS -Usa -P < testcat
go
This script automatically tests each of the CSPs.
The dropcat script drops the CSPs from TRS. Run the dropcat script as input to your TRS.
The following isql example shows how to run the dropcat script with a TRS named “new_TRS”:
isql -Snew_TRS -Usa -P < dropcat
go
This script automatically drops the CSPs.
Copyright © 2005. Sybase Inc. All rights reserved. |