How to Use the API Feature of CA-XCOM Data Transport for Windows
search cancel

How to Use the API Feature of CA-XCOM Data Transport for Windows

book

Article ID: 55956

calendar_today

Updated On:

Products

XCOM Data Transport XCOM Data Transport - Windows XCOM Data Transport - Linux PC XCOM Data Transport - z/OS

Issue/Introduction

How to Use the API Feature of CA-XCOM Data Transport for Windows

Environment

Release: ESBXCM99000-11-CA-XCOM Data Transport-Extended Support Basic
Component:

Resolution

Who will use the API?

The API is not an end-user tool. A programmer should be familiar with both CA-XCOM and Microsoft C or C++ to use the API. This API is similar to the one supplied with the XCOM UNIX platforms.

What is the API used for?

Use the API when you want to run an XCOM function (like a transfer) by starting an executable file, or when you want to include performing that XCOM function in an application you are writing.

How is the API used?

The sample source, make files, library and header files needed to use the API are provided with CA-XCOM Data Transport for Windows (see the ...\Apisrc directory). The programmer provides the compiler/programming tools.

A sample apitest.c file is included. When programming with the API, you must choose the appropriate Starting State - LOCAL_SEND for send report, job or file transfers, or LOCAL_RECEIVE for the local initiation of a receive from a remote system.

Choosing the Starting State in turn determines which Member Names are available. The XCOM API Member Names are the transfer parameters that can be passed.

There are two sample make files: apisna.mak for SNA based transfers and apitcp.mak for TCP/IP based transfers. The make files contain the instructions for compiling the source code, including and linking in the required objects and libraries, and generating the executable. Here is a sample make file for TCP/IP transfers:

ECHO ********************************************************************
ECHO *    Building CA-XCOM API for Windows NT/2000/XP    *
ECHO ********************************************************************
REM Set the following variables to match your environment
REM xcomapii.bat file to build CA-XCOM API for TCP/IP transfers
set path=c:\Program Files\Microsoft Visual Studio\VC98\Bin;c:\IBMCS\sdk\win32\LIB%path%
set path
set include=c:\Program Files\Microsoft Visual Studio\VC98\Include;c:\IBMCS\sdk\win32\LIB
set include
set lib=c:\Program Files\Microsoft Visual Studio\VC98\Lib;c:\IBMCS\sdk\win32\LIB
set lib
echo Delete files from Release directory
del /S c:\xcomnt\apisrc\Release 
nmake apitcp.mak 
pause

Programmers using different compilers than the one used in the above example would need to develop instructions that are somewhat different than the above. If the XCOM transfer is only a part of a larger application, the libraries and paths included in this example would have to be incorporated into the make process for that larger application.

Examples of header files, make files and C program may also be found in chapter 3 of the CA-XCOM Data Transport for Windows Server/Professional User Guide,  along with all of the XCOM API Member Names/parameters.

It is important to note that aside from the XCOM for Windows API itself, CA provides only examples for employing that API. All these examples are for reference purposes only and are provided to guide toward utilizing the API. The code that programmers develop is their code and is usually specific to their environment and to their application. As such, CA supports how the API is accessed, but not the development of the application, or the application itself. Any compilations and/or modifications and their results are the responsibility of the programmer.