ctgstats.h
Go to the documentation of this file.
1 /*
2  MODULE NAME ctgstats.h
3 
4  DESCRIPTIVE NAME CICS Transaction Gateway Statistics
5  Application Programming Interface
6 
7  <copyright
8 notice="rm-source-program"
9 pids="5724-I81,5725-B65"
10 years="2006,2012"
11 crc="583511916" >
12 Licensed Materials - Property of IBM
13 
14 "Restricted Materials of IBM"
15 
16 5724-I81,5725-B65
17 
18 (C) Copyright IBM Corp. 2006, 2012
19 
20 US Government Users Restricted Rights - Use, duplication or
21 disclosure restricted by GSA ADP Schedule Contract with
22 IBM Corp.
23 </copyright>
24 
25  Status: Version 9 Release 0
26 */
33 #ifndef _CTGSTATS_H
34 #define _CTGSTATS_H
35 /*********************************************************************/
36 /* Gateway Connection functions */
37 /*********************************************************************/
42 typedef struct _CTG_GatewayToken_t * CTG_GatewayToken_t;
43 
49 typedef struct _CTG_ResultSetToken_t * CTG_ResultSetToken_t;
50 
84 int openGatewayConnection(int port,
85  CTG_GatewayToken_t * gwTokPtr,
86  char ** protocolVersPtr);
87 
125 int openRemoteGatewayConnection(char * address,
126  int port,
127  CTG_GatewayToken_t * gwTokPtr,
128  char ** protocolVersPtr);
129 
153 
172 
173 /*********************************************************************/
174 /* Id-related functions */
175 /*********************************************************************/
176 
209  CTG_ResultSetToken_t * resgrpIdRsTokPtr);
210 
239  CTG_ResultSetToken_t * statIdRsTokPtr);
240 
275  char * idQueryPtr,
276  CTG_ResultSetToken_t * statIdRsTokPtr);
277 
278 /*********************************************************************/
279 /* Stats queries */
280 /*********************************************************************/
281 
307 int getStats(CTG_GatewayToken_t gwTok,
308  CTG_ResultSetToken_t * statRsTokPtr);
309 
342  char * idQueryPtr,
343  CTG_ResultSetToken_t * statRsTokPtr);
344 
377  char * idQueryPtr,
378  CTG_ResultSetToken_t * statRsTokPtr);
379 
380 /*********************************************************************/
381 /* ResultSet helper functions */
382 /*********************************************************************/
387 typedef struct {
388  char eyecatcher[8];
392  int idLen;
393  char * idPtr;
394 } CTG_IdData_t;
395 
400 typedef struct {
401  char eyecatcher[8];
406  char * statIdPtr;
408  char * statValuePtr;
410 
437 int getIdQuery(CTG_ResultSetToken_t anyRsTok,
438  char ** idQueryPtr);
439 
461 int getFirstId(CTG_ResultSetToken_t idRsTok,
462  CTG_IdData_t * idDataPtr);
463 
485 int getNextId(CTG_ResultSetToken_t idRsTok,
486  CTG_IdData_t * idDataPtr);
487 
510 int getFirstStat(CTG_ResultSetToken_t statRsTok,
511  CTG_StatData_t * statDataPtr);
512 
536 int getNextStat(CTG_ResultSetToken_t statRsTok,
537  CTG_StatData_t * statDataPtr);
538 
569  CTG_ResultSetToken_t * tarRsTokPtr);
570 
589 int freeResultSet(CTG_ResultSetToken_t * rsTokPtr);
590 
591 
592 /*********************************************************************/
593 /* Utility functions */
594 /*********************************************************************/
595 
613 int getStatsAPIVersion(char ** apiVersPtr);
614 
635 int getAPITraceLevel(int * traceStatePtr);
636 
658 int setAPITraceLevel(int traceState);
659 
679 int setAPITraceFile(char * traceFileNamePtr);
680 
699 
712 int dumpState();
713 
714 /*********************************************************************/
715 /* Return value definitions */
716 /*********************************************************************/
717 
718 /* API function return codes */
722 #define CTG_STAT_OK 0
723 
726 #define CTG_STAT_ERR_NULLGWTOK -100
727 
732 #define CTG_STAT_ERR_BADGWTOK -101
733 
737 #define CTG_STAT_ERR_LOSTGWCON -102
738 
741 #define CTG_STAT_ERR_NULLPARM -103
742 
745 #define CTG_STAT_ERR_TRACELEVEL -104
746 
750 #define CTG_STAT_ERR_NULLVERSPTR -105
751 
755 #define CTG_STAT_ERR_APIRESULTSET -106
756 
760 #define CTG_STAT_ERR_BADPORT -107
761 
764 #define CTG_STAT_ERR_NULLGWTOKPTR -108
765 
768 #define CTG_STAT_ERR_NULLPTR -109
769 
772 #define CTG_STAT_ERR_NULLRSBUFFER -110
773 
777 #define CTG_STAT_ERR_MALLOCFAIL -111
778 
781 #define CTG_STAT_ERR_EMPTYRESULTSET -112
782 
785 #define CTG_STAT_ERR_ENDOFRESULTSET -113
786 
789 #define CTG_STAT_ERR_BADGWTOKLIST -115
790 
795 #define CTG_STAT_ERR_BADRSOWNER -116
796 
799 #define CTG_STAT_ERR_BADRSTOKEN -117
800 
803 #define CTG_STAT_ERR_CONNECTFAILED -118
804 
807 #define CTG_STAT_ERR_BADRSTYPE -119
808 
813 #define CTG_STAT_ERR_ICONV -120
814 
818 #define CTG_STAT_ERR_LOCKFAIL -121
819 
823 #define CTG_STAT_ERR_COMMSFAIL -122
824 
828 #define CTG_STAT_ERR_PIDMISMATCH -123
829 
833 #define CTG_STAT_ERR_TIDMISMATCH -124
834 
837 #define CTG_STAT_ERR_NULLRSTOKPTR -125
838 
841 #define CTG_STAT_ERR_NULLQUERYSTRING -126
842 
845 #define CTG_STAT_ERR_NULLRSTOK -127
846 
849 #define CTG_STAT_ERR_NULLIDDATAPTR -128
850 
853 #define CTG_STAT_ERR_NULLSTATDATAPTR -129
854 
858 #define CTG_STAT_ERR_TRACEFILE -130
859 
863 #define CTG_STAT_ERR_NOQUERYIDS -131
864 
867 #define CTG_STAT_ERR_BADHOST -132
868 
871 #define CTG_STAT_ERR_NULLADDRESS -133
872 
875 #define CTG_STAT_ERR_CONNECTTIMEOUT -134
876 
879 #define CTG_STAT_ERR_CONNECTREFUSED -135
880 
884 #define CTG_STAT_ERR_GATEWAYUNREACHABLE -136
885 
886 /*********************************************************************/
887 /* CICS TG Statistics constants */
888 /*********************************************************************/
892 #define CTG_STAT_TRACE_LEVEL0 0
893 
896 #define CTG_STAT_TRACE_LEVEL1 1
897 
901 #define CTG_STAT_TRACE_LEVEL2 2
902 
906 #define CTG_STAT_TRACE_LEVEL3 3
907 
911 #define CTG_STAT_TRACE_LEVEL4 4
912 
915 #define CTG_STAT_NULL_GWTOK NULL
916 
919 #define CTG_STAT_NULL_RSTOK NULL
920 
923 #define CTG_STAT_API_VERSION "1_1_0_1"
924 
928 #define CTG_STAT_DLL_VERSION "9.0.0.2"
929 
930 #endif /* ifndef _CTGSTATS_H */
931 
932 /* Doxygen index page */
933