Previous Topic: Starting States in startst.h

Next Topic: How to Use API Member Names


API Control Block Structure

The following is the include file xcomapi.h. This is a C language header file containing the necessary API definitions for the control block structure.

Note: The API header file example provided on your distribution media may have been updated for your CA XCOM Data Transport system and may be different from the example shown below.

#ifndef XCOMAPI_INCLUDED
#define XCOMAPI_INCLUDED ONCE

#include "startst.h"

#ifdef XCOMSHARED_LIB_EXPORT
    #define XCOMSHARED_API __declspec(dllexport)
#else
    #define XCOMSHARED_API __declspec(dllimport)
#endif

#define SEND_FILE    "1"
#define SEND_REPORT  "2"
#define SEND_JOB     "3"
#define RECEIVE_FILE "4"

#define XCOM_TID_MAX_LEN   6   /* user001 make q_entryname/TID available to XcomAPI */

typedef struct  {
    char

       *file_type,     /* 1-file, 2-report, 3-job, 4-retrieve
                          ( the same as starting_state=LOCAL_RECEIVE )*/

       *protocol,      /* communications protocol: SNA or TCPIP */
       *port,          /* TCPIP remote server port */
       *remote_system,          /* remote lu name */
       *xluname,                /* local lu name */
       *xnodespec,              /* node specification for SNA gateway node */

       *xmode,                   /* mode */

       *xidest,         /* intermediate destination */

       *local_file,     /* local filename for send */
       *remote_file,    /* local filename for receive */

       *local_file_rf,  /* local filename for receive */
       *remote_file_rf, /* remote filename for receive */

       *remote_system_relay,  /* remote system for relay transfer */
       *remote_file_relay,    /* remote filename for relay transfer */

       *file_option,          /* CREATE / REPLACE / APPEND */
       *remove_trail_blanks,  /* remove trailing blanks     (MVS/R) */
       *volume,               /* volume */
       *unit,                 /* unit */
       *record_format,        /* record format */
       *lrecl,                /* logical record length */
       *blksize,              /* block size */

 /* remote printing parameters */
       *local_file_sr,         /* local filename for sending reports */
 /* #14375523 user002 */
       *print_class,           /* printjob class */
       *destination,           /* name of remote printer */
       *form,                  /* name of special forms to be used */
       *fcb,                   /* Form Control Block */
       *copies,                /* number of copies to be printed */
       *report_title,          /* report name (banner) to be used on
                                  separator sheet */
       *hold,                  /* flag for MVS spoolers */
       *spool_flag,            /* turns on spooling on receiving side */
       *disposition,           /* MVS file disposition */
       *carriage_control_characters,  /* A - ASA chars in column 1 ,
                                         M -IBM Machine chars (MVS) */
       *local_file_sj,         /* local filename for sending jobs */

       *userid,                /* user id */
       *password,              /* password */

       *queue,                 /* YES - queue transactions
                                  NO  - execute immediately */
       *start_time,         /* time to start scheduled transaction */
       *start_date,         /* date to start scheduled transaction */

       *notifyr,            /* TSO / WTO / CICS / LU / VM */
       *notify_name,        /* who to notify */
       *local_notify,       /* user name for notification */
       *notifyl,            /* MAIL / WRITE	*/
       *notify_term,        /* user's terminal to notify if notifyl=WRITE */

       *maxreclen,          /* maximum record length */
       *code_flag,          /* ASCII / BINARY / EBCDIC */
       *carriage_flag,      /* specifies if it is a text file or a type of record
       packing to use      */
       *truncation,        /* YES - truncation is allowed for this transfer */
       *compress,          /* YES / NO */


       *xtrace,            /* trace level */
       *stat_frequency,    /* How often to put record stats to Q-record */
       *debug_flag,        /* YES - debug output printed to stderr */

       *xlogfile,          /* log for locally initiated transactions */
       *tempdir,           /* directory to hold temporary files */

/* parameters used by xcom62 version 2 only */
       *version,
       *number_of_retries,
       *allocation_type,
       *checkpoint_count,
       *num_of_dir_blocks,
       *primary_alloc,
       *secondary_alloc,
       *restart_supported,

/* parameters used by xcom 3.1 only */
       *trusted,
       *domain,
       *den,
       *expdt,
       *retpd,
       *label,
       *tape,
       *unitct,
       *volct,
       *volsq,
       *labelnum,
       *tapedisp,

/* xcv32kv parameters used by xcom r11 only */
       *storcls,
       *datacls,
       *mgtclas,
       *dsntype,
       *vlr_flag,  /* #747 */
       *codetabl,
       *lclntfyl,
       *rmtntfyl,

/*  SSL parameters used by xcom r11 only */
       *configssl,
       *xcomfullssl,

 /* Reserved for future use */
       *hfs_flag,
       *seclabel,
      /* *xcomssl,
       *xcomsslopt, #13806313 user002 */

/* user data  #12723994 user002 */
       *user_data,            /* user data -- system dependent */
       *transfer_usr_data,    /* user data -- transfer specific */
       *transfer_id,          /* allows user definable identification for the transfer request */

/* parameters normally taken from shared memory but may be overwritten in API */
       *xlpcmd,               /* print command with full path	*/
       *xppcmd,               /* print command with full path	*/
       *xprecmd,              /* pre-allocation exit command with full path	*/
       *xendcmd,
       *xpullcmd,             /* Relay transfer pull command exit	*/
       *xpushcmd,             /* Relay transfer push command exit	*/
       *xnotifycmd,           /* path name of command to notify users */
       *shell_cmd,            /* command to run shell scripts */
       *eol_classes,          /* print classes having NL added at end of record */
       *convert_classes,      /* classes needing ebcdic-ascii translation */
       *metacode_classes,     /* classes needing variable length records */
      /* HCL start - Parameters added for XTC */
       *hold_transfer,  /* Should the transfer be held or not */
       *xtchold_count,  /* Count to tell the total number of dependencies */
       *xtcerrdecr,     /* Specifies the transferrequests for which the 
                           HOLDCOUNT parameter value is decremented 
                           when the current transfer completes 
                           unsuccessfully. */
       *xtcerrincr,     /* Specifies the transfer requests for which the 
                           HOLDCOUNT parameter value is incremented if
                           the current file transfer fails. */
       *xtcerrpurge,    /* Specifies the transfer requests to be purged if the 
                           transfer concludes unsuccessfully. */
       *xtcerrrel,      /* Specifies the transfers to be released if the current 
                           transfer completes unsuccessfully. */
       *xtcgooddecr,    /* Indicates an XTCNET job whose hold count decrements if 
                           the file transfer completes successfully. */
       *xtcgoodincr,    /* Indicates the transfer requests whose HOLDCOUNT 
                           parameter is incremented when the current file 
                           transfer completes successfully. */
       *xtcgoodpurge,   /* Specifies the transfer requests to be purged when the 
                           current file transfer completes successfully. */
       *xtcgoodrel,     /* Specifies the transfer requests to be released if the 
                           current file transfer concludes successfully. */
       *xtcnet,         /* XTC network name */
       *xtcjob,         /* XTC job name */
      /* HCL end - Parameters added for XTC */

/* HCL start */
      *trust_odbc,        /* for trusted trasnfer */
      *trust_pass,        /* for trusted trasnfer user password */
      *trust_user,        /* for trusted trasnfer */
      *trust_table_pfx,   /* for trusted trasnfer */
      *cache_read_sz,     /* Block I/O */
      *cache_write_sz,    /* Block I/O */
      *mail_type,         /* Mail type SMTP/MAIL/MAPI */
      *smtp_server,       /* SMTP mail server name */

      *license_dir,       /* path for License file */
/* HCL end */

     /* *ppVersion,            Enable xcompp.bat for all transfers? */
      *api_q_entryname,     /* user001 make q_entryname/TID available to XcomAPI */
      *request_q_entryname, /* user001 make q_entryname/TID available to XcomAPI */
      *fips_mode,
      *lear_cipher,
      *lear_hash,
      *ear_hash,
      *ear_cipher,
      *lear_digest,
      *ear_digest,
      *lear_key,
      *ear_key,
     /* parameters used by CA XCOM Data Transport r11.6 only */
      *createdelete,
      *compress_pds,
      *trnencrl_cipher,   /* requested list of ciphers for password encryption */
*/
      *local_charset,
      *remote_charset,
      *mbcs_inputerror,
      *mbcs_converror,
      *local_delim,
      *remote_delim,
      *avgrec,
      *eattr;} XCOM_PARM;

typedef struct {
       char user_name[128];           /* user name */
       char array_message[128];       /* return text from multi-entries */
       char array_message2[128];      /* return text from multi-entries */
       char array_err_message[128];   /* return text from multi-entries */
} XCOM_QUEUE_ENTRY;

typedef XCOM_QUEUE_ENTRY XCOM_QUEUE[9999];

typedef struct {
       char funccode[2];          /* function code */
       char tid[7];               /* transfer id (6 characters + null) */
       char global_tid[128];      /* local transfer id */
       char remote_tid[128];      /* remote transfer id */
       int  queue_open_once;      /* allow queue open once */
       int  nMax_Queue_Entries;   /* Maximum number of queue_entry */
       int  nQueueEntries;        /* number of queue_entry returned */
       int  trace_level;          /* trace level */ 
       FILE *trace_stream;        /* file handle for trace file */
       char trace_filename[256];  /* name of the trace file */
       char start_time[128];      /* start time */
       char end_time[128];        /* end time */
       char user_name[128];       /* remote user name */
       char group_name[128];      /* group name */
       char transfer_name[128];   /* user definable id for transfer request */
       char xferdata[128];        /* user data -- transfer specific */
       char sysdata[128];         /* user data -- system dependent */
       char in_out[128];          /* in_out value */
       char pid[128];             /* process id */
       char remote_system[128];   /* remote lu name */
       char file_type[128];       /* file type */
       char transfer_type[128];   /* transfer type */
       char user_group[128];      /* owned by user from group */
       char lfile[257];           /* local file */
       char file[257];            /* temporary file */
       char rfile[257];           /* remote file */
       char file_option[128];     /* file creation option */
       char curr_cond[128];       /* current condition */
       char curr_status[128];     /* current status */
       char curr_state[128];      /* current TP state */
       char rec_read_write[128];  /* record read or written to file */
       char byte_read_write[128]; /* bytes read or written to file */
       char blocks_trans[128];    /* blocks transmitted */
       char bytes_trans[128];     /* bytes transmitted */
       char sdsmessage[160];      /* message test for SDSNOTE */
       char head_message[128];    /* title message */
       char queue_message[128];   /* return text from queue */
       char start_message[128];   /* return text from start of xcomd service */
       char start_message2[128];  /* return text from start of xcomd service */
       char end_message[128];     /* return text from end of process */
      /* HCL start - XTC */
       char hold_count[128];      /* Hold count incase of XTC */
       char xtcnet[128];          /* XTCNET name */
       char xtcjob[128];          /* XTCJOB name */
      /* HCL end - XTC */
       char neg_cipher[128];      /* Password Encryption cipher */
       XCOM_QUEUE *pQueue;        /* A array of XCOM_QUEUE structure */

} XCOM_QUEUE_PARM;

#ifdef _NO_PROTO
int XcomAPI();
#else
XCOMSHARED_API int XcomAPI(int, XCOM_PARM);
#endif

#ifdef _NO_PROTO
int XcomQAPI();
#else
XCOMSHARED_API int XcomQAPI(XCOM_QUEUE_PARM*);
#endif


#ifdef _NO_PROTO
char* msgstring();
#else
XCOMSHARED_API char *msgstring(int state, int sense);
#endif


#else /* XCOMAPI_INCLUDED */
#define XCOMAPI_INCLUDED MORE_THAN_ONCE
#endif#ifndef XCOMAPI_INCLUDED