ctgclient.h
Go to the documentation of this file.
1 /*
2  MODULE NAME ctgclient.h
3 
4  DESCRIPTIVE NAME CICS Transaction Gateway ECI and ESI Version 2.3
5  Application Programming Interface
6 
7  Service level: V10.1.0.0
8  Licensed Materials - Property of IBM
9 
10  "Restricted Materials of IBM"
11 
12  5724-I81,5725-B65,5655-Y20,5655-ZA1
13 
14  (C) Copyright IBM Corp. 2010, 2024
15 
16  US Government Users Restricted Rights - Use, duplication or
17  disclosure restricted by GSA ADP Schedule Contract with
18  IBM Corp.
19 
20  Status: Version 10 Release 1
21 
22  NOTES :-
23 
24  This header file is provided with the CICS Transaction Gateway. These
25  products are available for a number of different operating environments
26  and to ensure the correct sections of this header are included, one of
27  the following constants must be defined prior to inclusion:
28 
29  CICS_W32 - if building a Windows application
30  CICS_AIX - if building an AIX application
31  CICS_SOL - if building a Solaris application
32  CICS_LNX - if building a Linux application
33  CICS_HPIT and CICS_HPUX -
34  if building an HPUX application on Itanium
35 */
42 #ifndef _CTGCLIENT_H
43 #define _CTGCLIENT_H
44 
45 /* Include stddef.h for size_t type definition */
46 #include <stddef.h>
47 
48 #ifdef __cplusplus
49  extern "C" {
50 #endif
51 
52 /* Ensure that a platform definition has been defined */
53 #if !(defined(CICS_W32) || defined(CICS_WNT) || defined(CICS_AIX) || \
54  defined(CICS_SOL) || defined(CICS_HPUX) || defined(CICS_LNX) )
55  #error Compiler symbol CICS_xxx is not defined (where XXX is one of W32, AIX, SOL, HPUX or LNX)
56 #endif
57 
58 #if defined (CICS_W32) || defined(CICS_WNT)
59  #define CICSCALL __cdecl
60 #else
61  #define CICSCALL
62 #endif
63 /*********************************************************************/
64 /* CICS TG ECI Version 2 General constants */
65 /*********************************************************************/
70 #define CTG_API_VERSION "2.3.0.0"
71 
76 #define CTG_DLL_VERSION "10.1.0.0"
77 
80 #define CTG_MAX_RCSTRING 40
81 
83 #define CTG_NULL_GWTOK NULL
84 
85 
86 
87 /*********************************************************************/
88 /* CICS TG ECI and ESI Version 2 Connection functions */
89 /*********************************************************************/
94 typedef struct _CTG_ConnToken_t * CTG_ConnToken_t;
95 
139  int port,
140  CTG_ConnToken_t * gwTokPtr,
141  int connTimeout);
193  int port,
194  CTG_ConnToken_t * gwTokPtr,
195  int connTimeout,
196  char * applid,
197  char * applidQualifier);
198 
228 
264  int closeTimeout);
265 
284 
285 
286 /*********************************************************************/
287 /* CICS TG ECI and ESI Version 2 Utility functions */
288 /*********************************************************************/
289 
310 int CICSCALL CTG_getAPITraceLevel(int * traceStatePtr);
311 
340 int CICSCALL CTG_setAPITraceLevel(int traceState);
341 
368 int CICSCALL CTG_setAPITraceFile(char * traceFileNamePtr);
369 
386 void CICSCALL CTG_setAPITraceDataLength(size_t dataLength);
387 
404 void CICSCALL CTG_setAPITraceDataOffset(size_t dataOffset);
405 
420 
429 char * CICSCALL CTG_getRcString(int returnCode, char * rcString);
430 
453 int CICSCALL CTG_getAPIVersion(char ** apiVersPtr);
454 
468 int CICSCALL CTG_getDLLVersion(char ** dllVersPtr);
469 
485 int CICSCALL CTG_getApplid(CTG_ConnToken_t gwTok, char ** applid);
486 
503 int CICSCALL CTG_getApplidQualifier(CTG_ConnToken_t gwTok, char ** applidQualifier);
504 /*****************************************************************************/
512 typedef struct
513 {
514  /* Length of SystemName */
515  #define CTG_LIST_SYSTEM_LENGTH 8
516 
521  char SystemName[CTG_LIST_SYSTEM_LENGTH+1];
522 
523  /* Length of the Description */
524  #define CTG_LIST_DESCRIPTION_LENGTH 60
525 
531  char Description[CTG_LIST_DESCRIPTION_LENGTH+1];
533 
534 /*****************************************************************************/
566  unsigned short *Systems,
567  CTG_listSystem_t *List);
568 
569 /*********************************************************************/
570 /* CICS TG ECI and ESI Version 2 Return Code constants */
571 /*********************************************************************/
575 #define CTG_OK 0
576 
579 #define CTG_ERR_INVALID_DATA_LENGTH -1
580 
585 #define CTG_ERR_SYSTEM_ERROR -9
586 
590 #define CTG_ERR_MORE_SYSTEMS -25
591 
594 #define CTG_ERR_NO_SYSTEMS -26
595 
598 #define CTG_ERR_NULLGWTOK -100
599 
603 #define CTG_ERR_BADGWTOK -101
604 
607 #define CTG_ERR_LOSTGWCON -102
608 
611 #define CTG_ERR_NULLPARM -103
612 
615 #define CTG_ERR_TRACELEVEL -104
616 
620 #define CTG_ERR_BADPORT -107
621 
624 #define CTG_ERR_NULLGWTOKPTR -108
625 
628 #define CTG_ERR_NULLPTR -109
629 
634 #define CTG_ERR_MALLOCFAIL -111
635 
638 #define CTG_ERR_BADGWTOKLIST -115
639 
642 #define CTG_ERR_CONNECTFAILED -118
643 
646 #define CTG_ERR_ICONV -120
647 
650 #define CTG_ERR_LOCKFAIL -121
651 
654 #define CTG_ERR_COMMSFAIL -122
655 
658 #define CTG_ERR_PIDMISMATCH -123
659 
662 #define CTG_ERR_TIDMISMATCH -124
663 
666 #define CTG_ERR_TRACEFILE -130
667 
670 #define CTG_ERR_BADHOST -132
671 
674 #define CTG_ERR_NULLADDRESS -133
675 
678 #define CTG_ERR_CONNECTTIMEOUT -134
679 
682 #define CTG_ERR_NULLECIPOINTER -137
683 
686 #define CTG_ERR_INVALIDTIMEOUTPARM -138
687 
691 #define CTG_ERR_APPLIDTOOLONG -139
692 
696 #define CTG_ERR_GWTOK_CLOSED -140
697 
700 #define CTG_ERR_UNKNOWN_REQUEST_TYPE 0xF002
701 
705 #define CTG_ERR_GATEWAY_CLOSED 0xF004
706 
710 #define CTG_ERR_WORK_WAS_REFUSED 0xF005
711 
716 #define CTG_ERR_GATEWAY_EXCEPTION 0xF006
717 
720 #define CTG_ERR_NOT_AUTHORIZED 0xF007
721 
725 #define CTG_ERR_GATEWAY_BACK_LEVEL 0xF00A
726 
731 #define CTG_ERR_INVALID_REQUEST_TYPE 0xF00B
732 
733 /*********************************************************************/
734 /* CICS TG ECI and ESI Version 2 Trace constants */
735 /*********************************************************************/
739 #define CTG_TRACE_LEVEL0 0
740 
743 #define CTG_TRACE_LEVEL1 1
744 
748 #define CTG_TRACE_LEVEL2 2
749 
753 #define CTG_TRACE_LEVEL3 3
754 
758 #define CTG_TRACE_LEVEL4 4
759 
760 #ifdef __cplusplus
761  }
762 #endif
763 
764 #endif /* ifndef _CTGCLIENT_H */
765 
766 /* Doxygen index page */
767