Previous Topic: Starting States in startst.h

Next Topic: Using XcomQAPI Option Parameters


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:

#ifndef __INCL_XCOMAPI_H
#define __INCL_XCOMAPI_H
#include "startst.h"
#define SEND_FILE "1"
#define SEND_REPORT "2"
#define SEND_JOB "3"
#define RECEIVE_FILE "4"
typedef struct {
char
*file_type, /* 1-file, 2-report, 3-job, 4-retreive ( 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 */
*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 */
*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 written to /tmp/<tid>.it file */
*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,
/* parameters used by xcom r11 only */
*xcomfullssl
*configssl,
*rmtntfyl,
*lclntfyl,
*storcls,
*datacls,
*mgtclas,
*dsntype,
/* Reserved for future use */
*seclabel,
*hfs_flag,

/* parameters normally taken from shared memory but may be overwritten in API */
*xlpcmd,             /* print command with full path */
*xppcmd,             /* postprocess command with full path */
*xprecmd,            /* pre-allocation exit command with full path */
*xendcmd,            /* ending exit command with full path */
*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 */
*ppVersion;          /* Enable xcompp.bat for all transfers? */
*fips_mode,          /* fips mode */
*lear_cipher,        /* local cipher */
*lear_hash,          /*  local hash */
*ear_hash,           /* remote hash */
*ear_cipher,         /* remote cipher */
*lear_digest,        /* local digest */
*ear_digest,         /* remote digest */
*lear_key,           /* local key */
*ear_key,            /* remote key */

/* parameters used by CA XCOM Data Transport r11.6 only */
*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 */
    char neg_cipher[128];      /* Password Encryption cipher */
        XCOM_QUEUE *pQueue;    /* An array of XCOM_QUEUE structure */

} XCOM_QUEUE_PARM;

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

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

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


#ifdef _NO_PROTO
int XsetSystemPriv( );
#else
int XsetSystemPriv( int type );
#endif

#endif /* __INCL_XCOMAPI_H */