00001 /* 00002 MODULE NAME ctgclient.h 00003 00004 DESCRIPTIVE NAME CICS Transaction Gateway ECI Version 2 00005 Application Programming Interface 00006 SupportPac CA0B 00007 00008 Licensed Materials - Property of IBM 00009 00010 Supportpac CA0B 00011 00012 (c) Copyright IBM Corp. 2011, 2012 All Rights Reserved. 00013 00014 US Government Users Restricted Rights - Use, duplication or 00015 disclosure restricted by GSA ADP Schedule Contract with 00016 IBM Corp. 00017 00018 NOTES :- 00019 00020 To ensure the correct sections of this header are included, the 00021 following constant must be defined at compile time: 00022 00023 CICS_AIX - if building an AIX application 00024 */ 00031 #ifndef _CTGCLIENT_H 00032 #define _CTGCLIENT_H 00033 00034 /* Include stddef.h for size_t type definition */ 00035 #include <stddef.h> 00036 00037 #if defined (CICS_W32) || defined(CICS_WNT) 00038 #define CICSCALL __cdecl 00039 #else 00040 #define CICSCALL 00041 #endif 00042 /*********************************************************************/ 00043 /* CICS TG ECI Version 2 General constants */ 00044 /*********************************************************************/ 00049 #define CTG_API_VERSION "2.0.1.0" 00050 00054 #define CTG_DLL_VERSION "1.0.0.0" 00055 00059 #define CTG_MAX_RCSTRING 40 00060 00062 #define CTG_NULL_GWTOK NULL 00063 00064 00065 00066 /*********************************************************************/ 00067 /* CICS TG ECI Version 2 Connection functions */ 00068 /*********************************************************************/ 00073 typedef struct _CTG_ConnToken_t * CTG_ConnToken_t; 00074 00109 int CICSCALL CTG_openRemoteGatewayConnection(char * address, 00110 int port, 00111 CTG_ConnToken_t * gwTokPtr, 00112 int connTimeout); 00113 00143 int CICSCALL CTG_closeGatewayConnection(CTG_ConnToken_t * gwTokPtr); 00144 00162 int CICSCALL CTG_closeAllGatewayConnections(); 00163 00164 00165 /*********************************************************************/ 00166 /* CICS TG ECI Version 2 Utility functions */ 00167 /*********************************************************************/ 00168 00189 int CICSCALL CTG_getAPITraceLevel(int * traceStatePtr); 00190 00219 int CICSCALL CTG_setAPITraceLevel(int traceState); 00220 00246 int CICSCALL CTG_setAPITraceFile(char * traceFileNamePtr); 00247 00264 void CICSCALL CTG_setAPITraceDataLength(size_t dataLength); 00265 00282 void CICSCALL CTG_setAPITraceDataOffset(size_t dataOffset); 00283 00296 int CICSCALL CTG_dumpState(); 00297 00305 char * CICSCALL CTG_getRcString(int returnCode, char * rcString); 00306 00320 int CICSCALL CTG_getAPIVersion(char ** apiVersPtr); 00321 00335 int CICSCALL CTG_getDLLVersion(char ** dllVersPtr); 00336 00337 /*****************************************************************************/ 00344 typedef struct 00345 { 00346 /* Length of SystemName */ 00347 #define CTG_LIST_SYSTEM_LENGTH 8 00348 00353 char SystemName[CTG_LIST_SYSTEM_LENGTH+1]; 00354 00355 /* Length of the Description */ 00356 #define CTG_LIST_DESCRIPTION_LENGTH 60 00357 00363 char Description[CTG_LIST_DESCRIPTION_LENGTH+1]; 00364 } CTG_listSystem_t; 00365 00366 /*****************************************************************************/ 00401 int CICSCALL CTG_listSystems(CTG_ConnToken_t gwTok, 00402 unsigned short *Systems, 00403 CTG_listSystem_t *List); 00404 00405 /*********************************************************************/ 00406 /* CICS TG ECI Version 2 Return Code constants */ 00407 /*********************************************************************/ 00411 #define CTG_OK 0 00412 00414 #define CTG_ERR_INVALID_DATA_LENGTH -1 00415 00417 #define CTG_ERR_SYSTEM_ERROR -9 00418 00420 #define CTG_ERR_MORE_SYSTEMS -25 00421 00423 #define CTG_ERR_NO_SYSTEMS -26 00424 00428 #define CTG_ERR_NULLGWTOK -100 00429 00434 #define CTG_ERR_BADGWTOK -101 00435 00438 #define CTG_ERR_LOSTGWCON -102 00439 00442 #define CTG_ERR_NULLPARM -103 00443 00446 #define CTG_ERR_TRACELEVEL -104 00447 00451 #define CTG_ERR_BADPORT -107 00452 00455 #define CTG_ERR_NULLGWTOKPTR -108 00456 00459 #define CTG_ERR_NULLPTR -109 00460 00464 #define CTG_ERR_MALLOCFAIL -111 00465 00468 #define CTG_ERR_BADGWTOKLIST -115 00469 00472 #define CTG_ERR_CONNECTFAILED -118 00473 00480 #define CTG_ERR_LOCKFAIL -121 00481 00488 #define CTG_ERR_PIDMISMATCH -123 00489 00492 #define CTG_ERR_TIDMISMATCH -124 00493 00496 #define CTG_ERR_TRACEFILE -130 00497 00500 #define CTG_ERR_BADHOST -132 00501 00504 #define CTG_ERR_NULLADDRESS -133 00505 00508 #define CTG_ERR_CONNECTTIMEOUT -134 00509 00512 #define CTG_ERR_NULLECIPOINTER -137 00513 00516 #define CTG_ERR_INVALIDTIMEOUTPARM -138 00517 00521 #define CTG_ERR_GWTOK_CLOSED -139 00522 00525 #define CTG_ERR_UNKNOWN_REQUEST_TYPE 0xF002 00526 00529 #define CTG_ERR_GATEWAY_CLOSED 0xF004 00530 00534 #define CTG_ERR_WORK_WAS_REFUSED 0xF005 00535 00538 #define CTG_ERR_GATEWAY_EXCEPTION 0xF006 00539 00547 #define CTG_ERR_GATEWAY_BACK_LEVEL 0xF00A 00548 00552 #define CTG_ERR_INVALID_REQUEST_TYPE 0xF00B 00553 00554 /*********************************************************************/ 00555 /* CICS TG ECI Version 2 Trace constants */ 00556 /*********************************************************************/ 00560 #define CTG_TRACE_LEVEL0 0 00561 00564 #define CTG_TRACE_LEVEL1 1 00565 00569 #define CTG_TRACE_LEVEL2 2 00570 00574 #define CTG_TRACE_LEVEL3 3 00575 00579 #define CTG_TRACE_LEVEL4 4 00580 00581 00582 #endif /* ifndef _CTGCLIENT_H */ 00583 00584 /* Doxygen index page */ 00585
© Copyright IBM Corporation 2011, 2012. All rights reserved.
For legal information, see http://www.ibm.com/legal/copytrade.shtml