CICS Transaction Gateway Statistics
API v1.1.0.1 - Statistics Protocol v1.0.0.0
Main Page
Data Structures
Files
File List
Globals
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
Licensed Materials - Property of IBM
8
9
"Restricted Materials of IBM"
10
11
5724-I81,5725-B65,5655-Y20
12
13
(C) Copyright IBM Corp. 2006, 2016
14
15
US Government Users Restricted Rights - Use, duplication or
16
disclosure restricted by GSA ADP Schedule Contract with
17
IBM Corp.
18
19
Status: Version 9 Release 2
20
*/
27
#ifndef _CTGSTATS_H
28
#define _CTGSTATS_H
29
/*********************************************************************/
30
/* Gateway Connection functions */
31
/*********************************************************************/
36
typedef
struct
_CTG_GatewayToken_t *
CTG_GatewayToken_t
;
37
43
typedef
struct
_CTG_ResultSetToken_t *
CTG_ResultSetToken_t
;
44
78
int
openGatewayConnection
(
int
port,
79
CTG_GatewayToken_t
* gwTokPtr,
80
char
** protocolVersPtr);
81
119
int
openRemoteGatewayConnection
(
char
* address,
120
int
port,
121
CTG_GatewayToken_t
* gwTokPtr,
122
char
** protocolVersPtr);
123
146
int
closeGatewayConnection
(
CTG_GatewayToken_t
* gwTokPtr);
147
165
int
closeAllGatewayConnections
();
166
167
/*********************************************************************/
168
/* Id-related functions */
169
/*********************************************************************/
170
202
int
getResourceGroupIds
(
CTG_GatewayToken_t
gwTok,
203
CTG_ResultSetToken_t
* resgrpIdRsTokPtr);
204
232
int
getStatIds
(
CTG_GatewayToken_t
gwTok,
233
CTG_ResultSetToken_t
* statIdRsTokPtr);
234
268
int
getStatIdsByStatGroupId
(
CTG_GatewayToken_t
gwTok,
269
char
* idQueryPtr,
270
CTG_ResultSetToken_t
* statIdRsTokPtr);
271
272
/*********************************************************************/
273
/* Stats queries */
274
/*********************************************************************/
275
301
int
getStats
(
CTG_GatewayToken_t
gwTok,
302
CTG_ResultSetToken_t
* statRsTokPtr);
303
335
int
getStatsByStatId
(
CTG_GatewayToken_t
gwTok,
336
char
* idQueryPtr,
337
CTG_ResultSetToken_t
* statRsTokPtr);
338
370
int
getStatsByStatGroupId
(
CTG_GatewayToken_t
gwTok,
371
char
* idQueryPtr,
372
CTG_ResultSetToken_t
* statRsTokPtr);
373
374
/*********************************************************************/
375
/* ResultSet helper functions */
376
/*********************************************************************/
381
typedef
struct
{
382
char
eyecatcher[8];
383
char
*
queryElementPtr
;
384
int
queryElementLen
;
385
int
queryElementRC
;
386
int
idLen
;
387
char
*
idPtr
;
388
}
CTG_IdData_t
;
389
394
typedef
struct
{
395
char
eyecatcher[8];
396
char
*
queryElementPtr
;
397
int
queryElementLen
;
398
int
queryElementRC
;
399
int
statIdLen
;
400
char
*
statIdPtr
;
401
int
statValueLen
;
402
char
*
statValuePtr
;
403
}
CTG_StatData_t
;
404
431
int
getIdQuery
(
CTG_ResultSetToken_t
anyRsTok,
432
char
** idQueryPtr);
433
455
int
getFirstId
(
CTG_ResultSetToken_t
idRsTok,
456
CTG_IdData_t
* idDataPtr);
457
479
int
getNextId
(
CTG_ResultSetToken_t
idRsTok,
480
CTG_IdData_t
* idDataPtr);
481
504
int
getFirstStat
(
CTG_ResultSetToken_t
statRsTok,
505
CTG_StatData_t
* statDataPtr);
506
530
int
getNextStat
(
CTG_ResultSetToken_t
statRsTok,
531
CTG_StatData_t
* statDataPtr);
532
562
int
copyResultSet
(
CTG_ResultSetToken_t
srcRsTok,
563
CTG_ResultSetToken_t
* tarRsTokPtr);
564
583
int
freeResultSet
(
CTG_ResultSetToken_t
* rsTokPtr);
584
585
586
/*********************************************************************/
587
/* Utility functions */
588
/*********************************************************************/
589
607
int
getStatsAPIVersion
(
char
** apiVersPtr);
608
629
int
getAPITraceLevel
(
int
* traceStatePtr);
630
652
int
setAPITraceLevel
(
int
traceState);
653
673
int
setAPITraceFile
(
char
* traceFileNamePtr);
674
692
int
dumpResultSet
(
CTG_ResultSetToken_t
rsTok);
693
706
int
dumpState
();
707
708
/*********************************************************************/
709
/* Return value definitions */
710
/*********************************************************************/
711
712
/* API function return codes */
716
#define CTG_STAT_OK 0
717
720
#define CTG_STAT_ERR_NULLGWTOK -100
721
726
#define CTG_STAT_ERR_BADGWTOK -101
727
731
#define CTG_STAT_ERR_LOSTGWCON -102
732
735
#define CTG_STAT_ERR_NULLPARM -103
736
739
#define CTG_STAT_ERR_TRACELEVEL -104
740
744
#define CTG_STAT_ERR_NULLVERSPTR -105
745
749
#define CTG_STAT_ERR_APIRESULTSET -106
750
754
#define CTG_STAT_ERR_BADPORT -107
755
758
#define CTG_STAT_ERR_NULLGWTOKPTR -108
759
762
#define CTG_STAT_ERR_NULLPTR -109
763
766
#define CTG_STAT_ERR_NULLRSBUFFER -110
767
771
#define CTG_STAT_ERR_MALLOCFAIL -111
772
775
#define CTG_STAT_ERR_EMPTYRESULTSET -112
776
779
#define CTG_STAT_ERR_ENDOFRESULTSET -113
780
783
#define CTG_STAT_ERR_BADGWTOKLIST -115
784
789
#define CTG_STAT_ERR_BADRSOWNER -116
790
793
#define CTG_STAT_ERR_BADRSTOKEN -117
794
797
#define CTG_STAT_ERR_CONNECTFAILED -118
798
801
#define CTG_STAT_ERR_BADRSTYPE -119
802
807
#define CTG_STAT_ERR_ICONV -120
808
812
#define CTG_STAT_ERR_LOCKFAIL -121
813
817
#define CTG_STAT_ERR_COMMSFAIL -122
818
822
#define CTG_STAT_ERR_PIDMISMATCH -123
823
827
#define CTG_STAT_ERR_TIDMISMATCH -124
828
831
#define CTG_STAT_ERR_NULLRSTOKPTR -125
832
835
#define CTG_STAT_ERR_NULLQUERYSTRING -126
836
839
#define CTG_STAT_ERR_NULLRSTOK -127
840
843
#define CTG_STAT_ERR_NULLIDDATAPTR -128
844
847
#define CTG_STAT_ERR_NULLSTATDATAPTR -129
848
852
#define CTG_STAT_ERR_TRACEFILE -130
853
857
#define CTG_STAT_ERR_NOQUERYIDS -131
858
861
#define CTG_STAT_ERR_BADHOST -132
862
865
#define CTG_STAT_ERR_NULLADDRESS -133
866
869
#define CTG_STAT_ERR_CONNECTTIMEOUT -134
870
873
#define CTG_STAT_ERR_CONNECTREFUSED -135
874
878
#define CTG_STAT_ERR_GATEWAYUNREACHABLE -136
879
880
/*********************************************************************/
881
/* CICS TG Statistics constants */
882
/*********************************************************************/
886
#define CTG_STAT_TRACE_LEVEL0 0
887
890
#define CTG_STAT_TRACE_LEVEL1 1
891
895
#define CTG_STAT_TRACE_LEVEL2 2
896
900
#define CTG_STAT_TRACE_LEVEL3 3
901
905
#define CTG_STAT_TRACE_LEVEL4 4
906
909
#define CTG_STAT_NULL_GWTOK NULL
910
913
#define CTG_STAT_NULL_RSTOK NULL
914
917
#define CTG_STAT_API_VERSION "1_1_0_1"
918
922
#define CTG_STAT_DLL_VERSION "9.2.0.2"
923
924
#endif
/* ifndef _CTGSTATS_H */
925
926
/* Doxygen index page */
927
source
h
ctgstats.h