How to set the transfer type with calling the XcomAPI function with CA XCOM Data Transport

Document ID : KB000027243
Last Modified Date : 14/02/2018
Show Technical Document Details

Introduction: 

A C/C++ program needs to set the transfer type before calling the XcomAPI function. Starting_state should be set as defined in Starts.h header file.

Instructions: 

Xcomparm.file_type in sample program"%XCOM_HOME%\Apisrc\apitest.c" is not honoured. It is required to set starting_state correctly instead of changing xcomparm.file_type.

In the sample program "apitest.c" in %XCOM_HOME%\Apisrc, xcompar,.file_type is not honoured. The XCOM API program calls the XcomAPI function to initiate an XCOM transfer. The transfer type is determined by starting_state instead of xcomparm.file_type. It is described in apitest.c.

 [apitest.c]
   ...
 //  xcomparm.file_type = SEND_FILE;    /* "1" */
     xcomparm.file_type = RECEIVE_FILE; /* "4" */
  ...
     starting_state=LOCAL_RECEIVE;
  ...
     rc=XcomAPI(starting_state, xcomparm);
 
 and xcomparm.file_type and starting_state are defined in Xcomapi.h and Starts.h;
 
 [Xcomapi.h]
  ...
 #define SEND_FILE       "1"
 #define SEND_REPORT  "2"
 #define SEND_JOB        "3"
 #define RECEIVE_FILE   "4"
  ...
 
 [Starts.h]
 #ifndef STARTST_INCLUDED
 #define STARTST_INCLUDED ONCE
  ...
 #define LOCAL_SEND        152
 #define LOCAL_RECEIVE     153
 #define REMOTE_SEND       154
 #define REMOTE_RECEIVE   155
 #define LOCAL_NOTE         200
 #define REMOTE_NOTE      201
  ...

Additional Information:

It is required to set the correct starting_state instead of xcomparm.file_type to call the XcomAPI function.