Remote stored procedures (RSPs) are written by customers to access DB2 in the MVS CICS environment. This guide describes how to design, code, and test RSPs.
If you are not familiar with CICS and the CICS control
tables, ask your CICS programmer or system programmer to make the
required CICS entries.
This guide is for anyone responsible for the following tasks:
Designing, coding, and testing RSPs in one of the supported programming languages (COBOL II, assembler, PL/I, and C)
Preparing client applications
Implementing RSPs
Administering Open ClientConnect™, Open ServerConnect™, or DirectConnect™ environments
Administering database management systems
Supporting data transfer and staging
This guide provides a set of tasks and reference information, with each chapter representing a task and each appendix representing reference information to help you accomplish a task. This reference guide includes these chapters:
Chapter 1, “Overview of RSPs,” provides an overview of RSPs and how they work.
Chapter 2, “Designing an RSP,” discusses information to consider before you design an RSP.
Chapter 3, “Writing an RSP,” explains how to write an RSP.
Chapter 4, “Compiling an RSP,” describes how to compile an RSP.
Chapter 5, “Testing and invoking an RSP,” explains how to test and invoke an RSP.
Chapter 6, “Troubleshooting,” discusses how to troubleshoot problems.
Appendix A, “RSP Commands,” lists and describes the RSP commands.
Appendix B, “MODELRSP DB2 Output Pipe Sample RSP,” contains a sample RSP with DB2-formatted output pipes or multiple-column rows.
Appendix C, “RSP3C STD Input and Output Pipe Sample RSP,” provides a sample RSP that sends single-column rows of character strings.
Appendix D, “RSP4C Keyword Variable Sample RSP,” provides and explains a sample RSP that passes keyword values.
Appendix E, “RSP8C Variable Text Sample RSP,” provides a sample RSP that reads variable text and uses output pipes to echo data that a client application sends to it.
Appendix F, “The SPAREA,” explains how the SPAREA is used by RSPs. It includes SPAREA fields and SPAREA definitions.
Appendix G, “The SQLDA,” explains how the SQLDA is used by RSPs.
There is also a Glossary at the back of this guide.
The following table describes new names for products in this release of the Mainframe Connect™ Integrated Product Set.
Old product names |
New product name |
---|---|
|
Mainframe Connect Client Option for CICS |
|
Mainframe Connect Client Option for IMS and MVS |
|
Mainframe Connect Server Option for CICS |
|
Mainframe Connect Server Option for IMS and MVS |
|
Mainframe Connect DB2 UDB Option for CICS |
|
DirectConnect for z/OS |
The old product names are used throughout this book, except for on the title page.
This book also uses the terms MVS and OS/390
where the newer term z/OS would otherwise be used.
The documentation set consists of
The Release Bulletin for your platform – contains last-minute information that was too late to be included in the books.
A more recent version of the release bulletin may be available on the World Wide Web. To check for critical product or document information that was added after the release of the product CD, use the Sybase Product Manuals Web site.
Mainframe Connect Client Option for CICS Installation and Administration Guide – describes configuring the Enterprise Connect™ network, setting up APPC communications, installing the Server Option, setting up security, and troubleshooting for an IMS or z/OS environment.
Mainframe Connect Server Option for CICS Installation and Administration Guide – describes configuring the Enterprise Connect network, installing the Server Option, setting up security, and troubleshooting for a CICS environment.
Mainframe Connect Client Option for IMS and MVS Installation and Administration Guide – describes installing and configuring the Client Option, routing requests to a server, and using Sybase isql. This manual also contains instructions for using the connection router and the mainframe-based isql utility.
Mainframe Connect DB2 UDB Option for CICS Installation and Administration Guide – describes configuring the mainframe, installing the DB2 UDB Option for CICS, setting up security, and troubleshooting for a CICS environment.
Mainframe Connect DirectConnect for z/OS Option Installation Guide – describes installing a DirectConnect for z/OS Option server and service libraries.
Enterprise Connect Data Access and Mainframe Connect Server Administration Guide for DirectConnect – describes administration of the DirectConnect for z/OS Option server. Information about administering specific service libraries and services is provided in other DirectConnect for z/OS Option publications.
Mainframe Connect Client Option Programmer’s Reference for COBOL – describes writing Client Option programs that call COBOL Client-Library functions. This guide contains reference pages for Client-Library routines and descriptions of the underlying concepts for COBOL programmers.
Mainframe Connect Server Option Programmer’s Reference for COBOL – provides reference material for writing Server Option programs that call COBOL Gateway-Library functions. This guide contains reference pages for Gateway-Library routines and descriptions of the underlying concepts for COBOL programmers.
Mainframe Connect Client Option Programmer’s Reference for PL/1 – describes writing Client Option programs that call PL/1 Client-Library functions. This guide contains reference pages for Client-Library routines and descriptions of the underlying concepts for PL/1 programmers.
Mainframe Connect Server Option Programmer’s Reference for PL/1 – provides reference material for writing Server Option programs that call PL/1 Gateway-Library functions. This guide contains reference pages for Gateway-Library routines and descriptions of the underlying concepts for PL/1 programmers.
Mainframe Connect Client Option Programmer’s Reference for C – describes writing Client Option programs that call C Client-Library functions. This guide contains reference pages for Client-Library routines and descriptions of the underlying concepts for C programmers.
Mainframe Connect Client Option Programmer’s Reference for Client Services Applications – provides information for anyone who designs, codes, and tests client services applications (CSAs).
Mainframe Connect Server Option Programmer’s Reference for Remote Stored Procedures – provides information for anyone who designs, codes, and tests remote stored procedures (RSPs).
Mainframe Connect DirectConnect for z/OS Option User's Guide for Transaction Router Services – describes configuring, controlling, and monitoring the DirectConnect for z/OS Option Transaction Router Service Library, as well as setting up security.
Mainframe Connect DirectConnect for z/OS Option User's Guide for DB2 Access Services – describes configuring, controlling, and monitoring a DirectConnect for z/OS Option Access Service, as well as setting up security.
Mainframe Connect Client Option and Server Option Open ClientConnect and Open ServerConnect Messages and Codes – provides details on messages that components return.
Use the Sybase Getting Started CD, the SyBooks™ CD, and the Sybase Product Manuals Web site to learn more about your product:
The Getting Started CD contains release bulletins and installation guides in PDF format, and may also contain other documents or updated information not included on the SyBooks CD. It is included with your software. To read or print documents on the Getting Started CD, you need Adobe Acrobat Reader, which you can download at no charge from the Adobe Web site using a link provided on the CD.
The SyBooks CD contains product manuals and is included with your software. The Eclipse-based SyBooks browser allows you to access the manuals in an easy-to-use, HTML-based format.
Some documentation may be provided in PDF format, which you can access through the PDF directory on the SyBooks CD. To read or print the PDF files, you need Adobe Acrobat Reader.
Refer to the SyBooks Installation Guide on the Getting Started CD, or the README.txt file on the SyBooks CD for instructions on installing and starting SyBooks.
The Sybase Product Manuals Web site is an online version of the SyBooks CD that you can access using a standard Web browser. In addition to product manuals, you will find links to EBFs/Maintenance, Technical Documents, Case Management, Solved Cases, newsgroups, and the Sybase Developer Network.
To access the Sybase Product Manuals Web site, go to Product Manuals.
Technical documentation at the Sybase Web site is updated frequently.
Finding the latest information on product certifications
Point your Web browser to Technical Documents.
Click Certification Report.
In the Certification Report filter select a product, platform, and timeframe and then click Go.
Click a Certification Report title to display the report.
Finding the latest information on component certifications
Point your Web browser to Availability and Certification Reports.
Either select the product family and product under Search by Base Product; or select the platform and product under Search by Platform.
Select Search to display the availability and certification report for the selection.
Creating a personalized view of the Sybase Web
site (including support pages)
Set up a MySybase profile. MySybase is a free service that allows you to create a personalized view of Sybase Web pages.
Point your Web browser to Technical Documents.
Click MySybase and create a MySybase profile.
Finding the latest information on EBFs and software
maintenance
Point your Web browser to the Sybase Support Page.
Select EBFs/Maintenance. If prompted, enter your MySybase user name and password.
Select a product.
Specify a time frame and click Go. A list of EBF/Maintenance releases is displayed.
Padlock icons indicate that you do not have download authorization for certain EBF/Maintenance releases because you are not registered as a Technical Support Contact. If you have not registered, but have valid information provided by your Sybase representative or through your support contract, click Edit Roles to add the “Technical Support Contact” role to your MySybase profile.
Click the Info icon to display the EBF/Maintenance report, or click the product description to download the software.
This section describes the syntax and style conventions used in this book.
Throughout this book, all references to Adaptive Server® Enterprise
also apply to its predecessor, SQL Server.
Also, Adaptive Server Enterprise (ASE) and Adaptive Server (AS)
are used interchangeably.
The Client Option uses eight-character function names, while other versions of Client-Library use longer names. This book uses the long version of Client-Library names with one exception: the eight-character version is used in syntax statements. For example, CTBCMDPROPS has eleven letters. In the syntax statement, it is written CTBCMDPR, using eight characters. You can use either version in your code.
Table 1 explains syntax conventions used in this book.
Symbol |
Explanation |
---|---|
( ) |
Parentheses indicate that parentheses are included as part of the command. |
{ } |
Braces indicate that you must choose at least one of the enclosed options. Do not type the braces when you type the option. |
[ ] |
Brackets indicate that you can choose one or more of the enclosed options, or none. Do not type the brackets when you type the options. |
| |
The vertical bar indicates that you can select only one of the options shown. Do not type the bar in your command. |
, |
The comma indicates that you can choose one or more of the options shown. Separate each choice by using a comma as part of the command. |
Table 2 explains style conventions used in this book.
This type of information |
Looks like this |
---|---|
Gateway-Library function names |
TDINIT, TDRESULT |
Client-Library function names |
CTBINIT, CTBRESULTS |
Other executables (DB-Library routines, SQL commands) in text |
the dbrpcparam routine, a select statement |
Directory names, path names, and file names |
/usr/bin directory, interfaces file |
Variables |
n bytes |
Adaptive Server datatypes |
datetime, float |
Sample code |
01 BUFFER PIC S9(9) COMP SYNC. 01 BUFFER PIC X(n). |
User input |
01 BUFFER PIC X(n) |
Client-Library and Gateway-Library function argument names |
BUFFER, RETCODE |
Client-Library function arguments that are input (I) or output (O) |
COMMAND – (I) RETCODE – (O) |
Names of objects stored on the mainframe |
SYCTSAA5 |
Symbolic values used with function arguments, properties, and structure fields |
CS-UNUSED, FMT-NAME, CS-SV-FATAL |
Client-Library property names |
CS-PASSWORD, CS-USERNAME |
Client-Library and Gateway-Library datatypes |
CS-CHAR, TDSCHAR |
All other names and terms appear in this typeface.
This document is available in an HTML version that is specialized for accessibility. You can navigate the HTML with an adaptive technology such as a screen reader, or view it with a screen enlarger.
The HTML documentation has been tested for compliance with U.S. government Section 508 Accessibility requirements. Documents that comply with Section 508 generally also meet non-U.S. accessibility guidelines, such as the World Wide Web Consortium (W3C) guidelines for Web sites.
You might need to configure your accessibility tool
for optimal use. Some screen readers pronounce text based on its
case; for example, they pronounce ALL UPPERCASE TEXT as initials,
and MixedCase Text as words. You might find it helpful to configure
your tool to announce syntax conventions. Consult the documentation
for your tool.
For information about how Sybase supports accessibility, see Sybase Accessibility. The Sybase Accessibility site includes links to information on Section 508 and W3C standards.
Each Sybase installation that has purchased a support contract has one or more designated people who are authorized to contact Sybase Technical Support. If you cannot resolve a problem using the manuals or online help, please have the designated person contact Sybase Technical Support or the Sybase subsidiary in your area