source/h/ctgclient.h

Go to the documentation of this file.
00001 /*
00002    MODULE NAME        ctgclient.h
00003 
00004    DESCRIPTIVE NAME   CICS Transaction Gateway ECI Version 2  
00005                       Application Programming Interface
00006 
00007    V7.2.0.1  
00008                                        
00009    Licensed Materials - Property of IBM
00010    
00011    "Restricted Materials of IBM"
00012    
00013    5724-I81 5655-R25
00014    
00015    (c) Copyright IBM Corp. 2008 All Rights Reserved.
00016    
00017    US Government Users Restricted Rights - Use, duplication or
00018    disclosure restricted by GSA ADP Schedule Contract with
00019    IBM Corp.
00020    
00021    Status: Version 7 Release 2
00022                                      
00023 
00024    NOTES :-
00025 
00026    This header file is provided with the CICS Transaction Gateway. These
00027    products are available for a number of different operating environments
00028    and to ensure the correct sections of this header are included, one of
00029    the following constants must be defined prior to inclusion:
00030 
00031      CICS_W32  -  if building a Windows application
00032      CICS_AIX  -  if building an AIX application
00033      CICS_SOL  -  if building a Solaris application
00034      CICS_HPUX -  if building an HPUX application
00035      CICS_LNX     if building a Linux application
00036      CICS_HPIT and CICS_HPUX -
00037                   if building an HPUX application on Itanium 
00038 */
00039 
00040 #ifndef _CTGCLIENT_H
00041 #define _CTGCLIENT_H
00042 
00043 #if defined (CICS_W32) || defined(CICS_WNT)
00044   #define CICSCALL __cdecl
00045 #else
00046   #define CICSCALL
00047 #endif
00048 /*********************************************************************/
00049 /*             CICS TG ECI Version 2 General constants               */
00050 /*********************************************************************/
00055 #define CTG_API_VERSION           "2.0.0.0"  
00056 
00060 #define CTG_DLL_VERSION           "7.2.0.1"   
00061 
00065 #define CTG_MAX_RCSTRING           40
00066 
00068 #define CTG_NULL_GWTOK             NULL
00069 
00070 
00071 
00072 /*********************************************************************/
00073 /*           CICS TG ECI Version 2 Connection functions              */
00074 /*********************************************************************/
00079 typedef struct _CTG_ConnToken_t * CTG_ConnToken_t;
00080 
00117 int CTG_openRemoteGatewayConnection(char * address, 
00118                                 int port,
00119                                 CTG_ConnToken_t * gwTokPtr,
00120                                 int connTimeout);
00121 
00140 int CTG_closeGatewayConnection(CTG_ConnToken_t * gwTokPtr);
00141 
00156 int CTG_closeAllGatewayConnections();
00157 
00158 
00159 /*********************************************************************/
00160 /*             CICS TG ECI Version 2 Utility functions               */
00161 /*********************************************************************/
00162 
00184 int CTG_getAPITraceLevel(int * traceStatePtr);
00185 
00214 int CTG_setAPITraceLevel(int traceState);
00215 
00242 int CTG_setAPITraceFile(char * traceFileNamePtr);
00243 
00258 int CTG_dumpState();
00259 
00268 char * CTG_getRcString(int returnCode, char * rcString);
00269 
00284 int CTG_getAPIVersion(char ** apiVersPtr);
00285 
00300 int CTG_getDLLVersion(char ** dllVersPtr); 
00301 
00302 /*****************************************************************************/
00310 typedef struct
00311 {
00312    /* Length of SystemName */
00313    #define CTG_LIST_SYSTEM_LENGTH        8
00314 
00320    char SystemName[CTG_LIST_SYSTEM_LENGTH+1];
00321 
00322    /* Length of the Description */
00323    #define CTG_LIST_DESCRIPTION_LENGTH  60
00324 
00331    char Description[CTG_LIST_DESCRIPTION_LENGTH+1];
00332 } CTG_listSystem_t;
00333 
00334 /*****************************************************************************/
00368 int CICSCALL CTG_listSystems(CTG_ConnToken_t gwTok,
00369                              unsigned short *Systems,
00370                              CTG_listSystem_t *List);
00371 
00372 /*********************************************************************/
00373 /*          CICS TG ECI Version 2 Return Code constants              */
00374 /*********************************************************************/
00378 #define CTG_OK                        0
00379 
00381 #define CTG_ERR_INVALID_DATA_LENGTH  -1
00382 
00384 #define CTG_ERR_SYSTEM_ERROR         -9        
00385 
00387 #define CTG_ERR_MORE_SYSTEMS         -25                                      
00388 
00390 #define CTG_ERR_NO_SYSTEMS           -26                                      
00391 
00395 #define CTG_ERR_NULLGWTOK          -100
00396 
00401 #define CTG_ERR_BADGWTOK           -101
00402 
00405 #define CTG_ERR_LOSTGWCON          -102
00406 
00409 #define CTG_ERR_NULLPARM           -103
00410 
00413 #define CTG_ERR_TRACELEVEL         -104
00414 
00418 #define CTG_ERR_BADPORT            -107
00419 
00422 #define CTG_ERR_NULLGWTOKPTR       -108
00423 
00426 #define CTG_ERR_NULLPTR            -109
00427 
00431 #define CTG_ERR_MALLOCFAIL         -111
00432 
00435 #define CTG_ERR_BADGWTOKLIST       -115
00436 
00439 #define CTG_ERR_CONNECTFAILED      -118
00440 
00447 #define CTG_ERR_LOCKFAIL           -121
00448 
00455 #define CTG_ERR_PIDMISMATCH        -123
00456 
00459 #define CTG_ERR_TIDMISMATCH        -124
00460 
00463 #define CTG_ERR_TRACEFILE          -130
00464 
00467 #define CTG_ERR_BADHOST            -132
00468 
00471 #define CTG_ERR_NULLADDRESS        -133
00472 
00475 #define CTG_ERR_CONNECTTIMEOUT     -134
00476 
00479 #define CTG_ERR_NULLECIPOINTER     -137
00480 
00483 #define CTG_ERR_INVALIDTIMEOUTPARM -138
00484 
00487 #define CTG_ERR_UNKNOWN_REQUEST_TYPE 0xF002
00488 
00491 #define CTG_ERR_GATEWAY_CLOSED 0xF004
00492 
00496 #define CTG_ERR_WORK_WAS_REFUSED 0xF005
00497 
00500 #define CTG_ERR_GATEWAY_EXCEPTION 0xF006
00501 
00509 #define CTG_ERR_GATEWAY_BACK_LEVEL 0xF00A 
00510 
00514 #define CTG_ERR_INVALID_REQUEST_TYPE 0xF00B 
00515 
00516 /*********************************************************************/
00517 /*            CICS TG ECI Version 2 Trace constants                  */
00518 /*********************************************************************/
00522 #define CTG_TRACE_LEVEL0              0
00523 
00526 #define CTG_TRACE_LEVEL1              1
00527 
00531 #define CTG_TRACE_LEVEL2              2
00532 
00536 #define CTG_TRACE_LEVEL3              3
00537 
00541 #define CTG_TRACE_LEVEL4              4
00542 
00543 
00544 #endif /* ifndef _CTGCLIENT_H */
00545 
00546 /* Doxygen index page  */
00547 

© Copyright IBM Corporation 2006, 2009. All rights reserved.
For legal information, see http://www.ibm.com/legal/copytrade.shtml