16.20 - Header File for Sample PMPC Application - Teradata Vantage NewSQL Engine

Teradata Vantageā„¢ Application Programming Reference

prodname
Teradata Database
Teradata Vantage NewSQL Engine
vrm_release
16.20
created_date
March 2019
category
Programming Reference
featnum
B035-1090-162K

This section defines the contents for all parcel flavors. Each parcel is defined in the Notes section under the definition of each parcel.

#ifndef PMPC_H
#define PMPC_H
/* These are standard CLI include files */
#include "coptypes.h"
#include "coperr.h"
#include "dbcarea.h"
#include "parcel.h"
/*****************************************************************/
/*   Purpose  To define the data type for kinds of activities
            returned in the Ok and Success parcels. */
typedef unsigned short pclstmt_t;
/* Purpose  To express the kind of activity within Ok and Success parcels. */
#define PCLSTMTNUL              (0)
#define PCLRETSTMT              (1)
#define PCLINSSTMT              (2)
#define PCLUPDSTMT              (3)  /*  UPDATE                   */
#define PCLUPDRETSTMT           (4)  /*  UPDATE ... RETRIEVING    */
#define PCLDELSTMT              (5)
#define PCLCTSTMT               (6)
#define PCLMODTABSTMT           (7)
#define PCLCVSTMT               (8)
#define PCLCMSTMT               (9)
#define PCLDROPTABSTMT          (10)
#define PCLDROPVIEWSTMT         (11)
#define PCLDROPMACSTMT          (12)
#define PCLDROPINDSTMT          (13)
#define PCLRENTABSTMTT          (14)
#define PCLRENVIEWSTMT          (15)
#define PCLRENMACSTMT           (16)
#define PCLCREINDSTMT           (17)
#define PCLCDSTMTT              (18)
#define PCLCREUSERSTMT          (19)
#define PCLGRANTSTMT            (20)
#define PCLREVOKESTMT           (21)
#define PCLGIVESTMT             (22)
#define PCLDROPDBSTMT           (23)
#define PCLMODDBSTMT            (24)
#define PCLDATABASESTMT         (25)
#define PCLBTSTMT               (26)
#define PCLETSTMT               (27)
#define PCLABORTSTMT            (28)
#define PCLNULLSTMT             (29)
#define PCLEXECSTMT             (30)
#define PCLCMNTSETSTMT          (31)  /*  COMMENT set statement       */
#define PCLCMNTGETSTMT          (32)  /*  COMMENT returning statement */
#define PCLECHOSTMT             (33)
#define PCLREPVIEWSTMT          (34)
#define PCLREPMACSTMT           (35)
#define PCLCHECKPTSTMT          (36)
#define PCLDELJRNLSTMT          (37)
#define PCLROLLBACKSTMT         (38)
#define PCLRELLOCKSTMT          (39)
#define PCLHUTCONFIGSTMT        (40)
#define PCLVCHECKPTSTMT         (41)
#define PCLDUMPJRNLSTMT         (42)
#define PCLDUMPDBSTMT           (43)
#define PCLRESTORESTMT          (44)
#define PCLROLLFORWSTMT         (45)
#define PCLDELDBSTMT            (46)
#define PCLCLEARDUMPST          (47)
#define PCLSAVEDUMPSTMT         (48)
#define PCLSHOWSTMT             (49)
#define PCLHELPSTMT             (50)
#define PCLBEGINLOADSTMT        (51)
#define PCLCHKPTLOADSTMT        (52)
#define PCLENDLOADSTMT          (53)
#define PCLLINSTMT              (54)
#define PCLGRANTLOGONSTMT       (55)
#define PCLREVOKELOGONSTMT      (56)
#define PCLBEGACCLOGSTMT        (57)
#define PCLENDACCLOGSTMT        (58)
#define PCLCOLLSTATSTMT         (59)
#define PCLDROPSTATSTMT         (60)
#define PCLSESSETSTMT           (61)
#define PCLBEGEDITSTMT          (62)
#define PCLEDITSTMT             (63)
#define PCLEXECEDITSTM          (64)
#define PCLENDEDITSTMT          (65)
#define PCLRELEDITSTMT          (66)
#define PCLEDITDELSTMT          (67)
#define PCLEDITINSSTMT          (68)
#define PCLEDITUPDSTMT          (69)
#define PCLBEGDELMLSTMT         (70)
#define PCLDATASTATUS           (71)
#define PCLBEGEXPORTSTMT        (74)
#define PCLENDEXPORTSTMT        (75)
#define PCL2PCVOTEREQ           (76)  /* 2PC vote request.           */
#define PCL2PCVOTETERM          (77)  /* 2PC vote and terminate.     */
#define PCL2PCCMMT              (78)  /* 2PC commit request.         */
#define PCL2PCABRT              (79)  /* 2PC abort request.          */
#define PCL2PCFORGET            (80)  /* Vote request yes/done       */
#define PCLSETSESSR             (83)  /* Set Session Rate            */
#define PCLMONSESS              (84)  /* Monitor Session             */
#define PCLIDENTIFY             (85)  /* Identify                    */
#define PCLABTSESS              (86)  /* Abort Session               */
#define PCLSETRESSR             (87)  /* Set Resource Rate           */
#define PCLREVALIDATERISTMT     (89)
#define PCLCOMMITSTMT           (90)
#define PCLMONVCONFIG           (91)  /* Monitor Virtual Config      */
#define PCLMONPCONFIG           (92)  /* Monitor Physical Config     */
#define PCLMONVSUMMARY          (93)  /* Monitor Virtual Summary     */
#define PCLMONPSUMMARY          (94)  /* Monitor Physical Summary    */
#define PCLMONVRES              (95)  /* Monitor Virtual Resource    */
#define PCLMONPRES              (96)  /* Monitor Physical Resource   */
#define PCLCTRIGSTMT            (97)  /* Create Trigger Statement    */
#define PCLDTRIGSTMT            (98)  /* Drop   Trigger Statement    */
#define PCLRENTRIGSTMT          (99)  /* Rename Trigger Statement    */
#define PCLREPTRIGSTMT          (100) /* Rename Trigger Statement    */
#define PCLALTTRIGSTMT          (101) /* Alter  Trigger Statement    */
#define PCLRDLSTMT              (102) /* Replication statement       */
#define PCLDROPPROCSTMT         (103) /* DROP PROCEDURE SQL          */
#define PCLCREATEPROCSTMT       (104) /* CREATE PROCEDURE SQL        */
#define PCLCALLSTMT             (105) /* CALL SQL                    */
#define PCLRENPROCSTMT          (106) /* RENAME PROCEDURE SQL        */
#define PCLREPPROCSTMT          (107) /* REPLACE PROCEDURE SQL       */
#define PCLSETACCT              (108) /* Set Session Account         */
#define PCLHULSTMT              (109) /* Arcmain Lock Request        */
#define PCLMONSQL               (110) /* MONITOR SQL                 */
#define PCLMONVER               (111) /* Monitor Version             */
#define PCLBEGINDBQLSTMT        (112) /* Begin DBQL                  */
#define PCLENDDBQLSTMT          (113) /* End DBQL                    */
#define PCLCREROLESTMT          (114) /* Create Role SQL             */
#define PCLDRPROLESTMT          (115) /* Drop Role SQL               */
#define PCLGRANTROLESTMT        (116) /* Grant Role SQL              */
#define PCLREVOKEROLESTMT       (117) /* Revoke Role SQL             */
#define PCLCREPROFILESTMT       (118) /* Create Profile SQL          */
#define PCLMODPROFILESTMT       (119) /* Modify Profile SQL          */
#define PCLDRPPROFILESTMT       (120) /* Drop Profile SQL            */
#define PCLSETROLESTMT          (121) /* Set Role SQL                */
#define PCLCREUDFSTMT           (122) /* Create UDF stmt             */
#define PCLRPLCUDFSTMT          (123) /* Replace UDF stmt            */
#define PCLDROPUDFSTMT          (124) /* Drop UDF stmt               */
#define PCLALTERUDFSTMT         (125) /* Alter UDF stmt              */
#define PCLRENUDFSTMT           (126) /* Rename UDF stmt             */
#define PCLMRGMIXEDSTMT         (127) /* Mixture of upd & ins        */
#define PCLMRGUPDSTMT           (128) /* Upds and no ins             */
#define PCLMRGINSSTMT           (129) /* Ins and no upds             */
#define PCLALTERPROCSTMT        (130) /* ALTER PROCEDURE SQL         */
#define PCLTWMSTATSSTMT         (132) /* TDQM Statistics             */
#define PCLTWMPERFGROUPSSTMT    (133) /* TDQM get Perf Groups        */
#define PCLCREUDTSTMT           (134) /* Create UDT stmt             */
#define PCLDROPUDTSTMT          (135) /* Drop UDT stmt               */
#define PCLALTERUDTSTMT         (136) /* Alter UDT stmt              */
#define PCLRPLCUDTSTMT          (137) /* Replace UDT stmt            */
#define PCLCREUDMSTMT           (138) /* Create UDM stmt             */
#define PCLALTERUDMSTMT         (139) /* Alter UDM stmt              */
#define PCLRPLCUDMSTMT          (140) /* Replace UDM stmt            */
#define PCLCRECASTSTMT          (141) /* Create Cast stmt            */
#define PCLRPLCCASTSTMT         (142) /* Replace Cast stmt           */
#define PCLDROPCASTSTMT         (143) /* Drop Cast stmt              */
#define PCLCREORDSTMT           (144) /* Create Ordering stmt        */
#define PCLRPLCORDSTMT          (145) /* Replace Ordering stmt       */
#define PCLDROPORDSTMT          (146) /* Drop Ordering stmt          */
#define PCLCREXFORMSTMT         (147) /* Create Transform stmt       */
#define PCLRPLCXFORMSTMT        (148) /* Replace Transform stmt      */
#define PCLDROPXFORMSTMT        (149) /* Drop Transform stmt         */
#define PCLCREAUTHSTMT          (150) /* Create Auth stmt            */
#define PCLDRPAUTHSTMT          (151) /* Drop Auth Stmt              */
#define PCLTWMDELRQSTCHGSTM     (155) /* TDQM Delay Request Change   */
#define PCLTWMSUMMARYSTMT       (156) /* TDQM get Summary            */
#define PCLTWMDYNBUILDSTMT      (160) /* TDWM Dynamic Build          */
#define PCLTWMLISTWDSTMT        (161) /* TDWM LIST WD                */
#define PCLSETSESISOLVLSTMT     (162) /* Set Session Isolation Level */
#define PCLINITIDXANALYSIS      (163) /* Initiate Index Analysis     */
#define PCLRPLCAUTHSTMT         (164) /* Replace Auth stmt           */
#define PCLSETQBANDSTMT         (165) /* Set QUERY_BAND stmt         */
#define PCLLOGARCONSTMT         (166) /* LOGGING ONLINE ARCHIVE ON   */
#define PCLLOGARCOFFSTMT        (167) /* LOGGING ONLINE ARCHIVE OFF  */
#define PCLMONQUERYBANDSTMT     (168) /* MONITOR QUERYBAND           */
#define PCLLOGARCONSTMT         (166) /* LOGGING ONLINE ARCHIVE ON   */
#define PCLLOGARCOFFSTMT        (167) /* LOGGING ONLINE ARCHIVE OFF  */
#define PCLCRECORRSTMT          (169)
#define PCLREPCORRSTMT          (170)
#define PCLDRPCORRSTMT          (171)
#define PCLALTCORRSTMT          (172)
#define PCLUSEREVENTCONTROLSTMT (173) /* USER EVENT CONTROL          */
#define PCLEVENTSTATUSSTMT      (174) /* EVENT STATUS                */
#define PCLMONAWTRES            (175) /* MONITOR AWT RESOURCE        */
#define PCLSPDYNRESULTSET       (176) /* SP Dynamic Result Set       */
#define MONVERSION3   3
#define MONVERSION4   4
#define MONVERSION    MONVERSION4
#define CONNECTED     0
#define NOT_CONNECTED 1
#define OK            0
#define STOP          1
#define NOT_OK       -1
#define MAXLOGONSIZE 100
#define MAXCOMMANDSIZE 50
#define MAXNAME 30
#define SYSMAXRECSIZE   64000
#define ABORTSESTXT "ABORT SESSION;"
#define SETSESSACCTTXT "SET SESSION ACCOUNT;"
#define MONSESSTXT "MONITOR SESSION;"
#define MONSQLTXT "MONITOR SQL;"
#define TDWMPERFGROUPSTXT "TDWM PERFGROUPS;"
#define TDWMSTATISTICSTXT "TDWM STATISTICS;"
#define MONVERTXT "MONITOR VERSION;"
#define SETSESSTXT "SET SESSION RATE;"
#define SETRESTXT "SET RESOURCE RATE;"
#define MONPHYSUMTXT "MONITOR PHYSICAL SUMMARY;"
#define MONVIRSUMTXT "MONITOR VIRTUAL SUMMARY;"
#define MONVIRRESTXT "MONITOR VIRTUAL RESOURCE;"
#define MONPHYRESTXT "MONITOR PHYSICAL RESOURCE;"
#define MONVIRCONTXT "MONITOR VIRTUAL CONFIG;"
#define MONPHYCONTXT "MONITOR PHYSICAL CONFIG;"
#define IDENTSESTXT "IDENTIFY SESSION;"
#define IDENTDBTXT "IDENTIFY DATABASE;"
#define IDENTTABLETXT "IDENTIFY TABLE;"
#define IDENTUSERTXT "IDENTIFY USER;"
#define HELPTXT "HELP;"
typedef short SysInt32[2];
typedef double fltreal64_t;
typedef unsigned short tosprocnum_t;
typedef short Integer;
typedef enum Request_t
{
    ABORTSESSREQ,
    SETSESSACCTREQ,
    MONSESSREQ,
    MONSQLREQ,
    TDWMPERFGROUPSREQ,
    TDWMSTATISTICSREQ,
    MONVERREQ,
    MONPHYSUM,
    MONVIRSUM,
    MONVIRRES,
    MONPHYRES,
    MONVIRCON,
    MONPHYCON,
    SETSESSREQ,
    SETRESREQ,
    IDENTSESREQ,
    IDENTDBREQ,
    IDENTTABLEREQ,
    IDENTUSERREQ
} Request_t;
#pragma pack(1)
/* Input parcel structure for PMPC requests */
typedef struct
{
    char  indicbyte;
    Int16 version;
} monheader_t;
typedef struct
{
    monheader_t monheader;
    Int16 hostid;
    Int32 session;
    char  user[30];
    char  listsess;
    char  logoffsess;
    char  override;
} abortsess_t;
typedef struct
{
   monheader_t monheader;
   Int16 hostid;
   Int32 session;
   char  acct[30];
   char  entiresess;
} setsessacct_t;
typedef struct
{
    monheader_t monheader;
    Int16 hostid;
    Int32 session;
    char  user[30];
} monsess_t;
typedef struct
{
    monheader_t monheader;
    Int16 hostid;
    Int32 session;
} monsql_t;
typedef struct
{
    monheader_t monheader;
    Int16 samplerate;
    char  LocalChange;
    char  VirtualChange;
} setrate_t;
typedef struct
{
    Int16 hostid;
    Int32 sessionno;
} identses_t;
typedef struct
{
    monheader_t monheader;
    union
    {
        Int32 objid;
        identses_t identses;
    } UU;
} identify_t;
/* Output record parcel structures */
typedef struct
{
    Int16    HostId;       /* Logical Host Identifier */
    char     UserName[30]; /* User (database) Name of this session */
    SysInt32 SessionNo;    /* Session Number of session */
    char     AbortStatus;  /* Status of aborted session */
} MonAbtSes_t;
typedef struct
{
   Int16 HostId; /* Logical Host Identifier */
   Int16 LogonProcId; /* Processor number session logged on to */
   Int16 RunProcId; /* Procnum the session initiates requests to */
   Int32 SessionNo; /* Session Number of session */
   char UserName[30]; /* User (database) Name of this session */
   char UserAccount[30]; /* Acct name that this User logged in with */
   Int32 UserID; /* User (database) Identifier for this session */
   Int32 LSN; /* Logon Sequence Number */
   double LogonTime; /* Logon Time for this session */
   Int32 LogonDate; /* Logon Date */
   char PartName[16]; /* Session Partition Name this session is associated with */
   char Priority[2]; /* DBC run priority (Low, Medium, High, Rush) */
   char PEState[18]; /* Current state of this session in the PE */
   double PECPUSec; /* Current elapsed cpu usage in PE for sess */
   double XactCount; /* Number of transactions processed by a DBC SQL session */
   double ReqCount; /* Number of requests processed by a session */
   double ReqCacheHits; /* Number of Request Cache uses inDBC/SQL sess */
   char AMPState[18]; /* Current state of associated session in AMP processors */
   double AMPCPUSec; /* Current elapsed cpu usage in AMP ( TOTAL ) */
   double AMPIO; /* Current Total Logical I/O count for associated session */
   double Delta_AMPSpool; /* Total Spool space change for the associated session */
   Int16 Blk_1_HostId; /* Logical HostId of a session causing block */
   Int32 Blk_1_SessNo; /* Session Number of a session causing block */
   Int32 Blk_1_UserID; /* User Identifier of a Host Utility Job causing block */
   char Blk_1_LMode; /* Mode (Severity) of lock involved in causing a block */
   char Blk_1_OType; /* Type (Database/Table/Row Hash) of object being locked */
   Int32 Blk_1_ObjDBId; /* DB Identifier of object being locked */
   Int32 Blk_1_ObjTId; /* TBID (If applicable) of object being locked */
   char Blk_1_Status;
   Int16 Blk_2_HostId;
   Int32 Blk_2_SessNo;
   Int32 Blk_2_UserID;
   char Blk_2_LMode;
   char Blk_2_OType;
   Int32 Blk_2_ObjDBId;
   Int32 Blk_2_ObjTId;
   char Blk_2_Status;
   Int16 Blk_3_HostId;
   Int32 Blk_3_SessNo;
   Int32 Blk_3_UserID;
   char Blk_3_LMode;
   char Blk_3_OType;
   Int32 Blk_3_ObjDBId;
   Int32 Blk_3_ObjTId;
   char Blk_3_Status;
   char MoreBlockers; /* Indicates there are more lock conflicts */
   Int16 LogonSourceLen; /* Logon source length (Variable Length) */
   char LogonSource[128];/* Logon source info (Variable Length) */
} MonSesRec2_t;
typedef struct
{
   double TempSpaceUsage; /* Temporary space usage for the associated session */
   fltreal64_t HotAmp1CPU;
   fltreal64_t HotAmp2CPU;
   fltreal64_t HotAmp3CPU;
   fltreal64_t HotAmp1IO;
   fltreal64_t HotAmp2IO;
   fltreal64_t HotAmp3IO;
   Word HotAmp1CPUId;
   Word HotAmp2CPUId;
   Word HotAmp3CPUId;
   Word HotAmp1IOId;
   Word HotAmp2IOId;
   Word HotAmp3IOId;
   fltreal64_t LowAmp1CPU;
   fltreal64_t LowAmp2CPU;
   fltreal64_t LowAmp3CPU;
   fltreal64_t LowAmp1IO;
   fltreal64_t LowAmp2IO;
   fltreal64_t LowAmp3IO;
   Word LowAmp1CPUId;
   Word LowAmp2CPUId;
   Word LowAmp3CPUId;
   Word LowAmp1IOId;
   Word LowAmp2IOId;
   Word LowAmp3IOId;
   Word AmpCount;
   fltreal64_t AvgAmpCPUSec;
   fltreal64_t AvgAmpIOCnt;
} MonSesRecV3_t;
typedef struct
{
   double ReqStartTime;
   Int32 ReqStartDate;
   fltreal64_t ReqCPU;
   fltreal64_t ReqIO;
} MonSesRecV4_t;
typedef struct
{
   Int32 ReqNo;
   Int32 WlcId;
   Int16 DontReclassifyFlag;
} MonSesRecV5_t;
typedef struct
{
    fltreal64_t    AvgCPU;
    fltreal64_t    AvgDisk;
    fltreal64_t    AvgDiskIO;
    fltreal64_t    HighCPUUse;
    tosprocnum_t   HighCPUProcId;
    fltreal64_t    LowCPUUse;
    tosprocnum_t   LowCPUProcId;
    fltreal64_t    HighDisk;
    tosprocnum_t   HighDiskProcId;
    fltreal64_t    LowDisk;
    tosprocnum_t   LowDiskProcId;
    fltreal64_t    HighDiskIO;
    tosprocnum_t   HighDiskIOProcId;
    fltreal64_t    LowDiskIO;
    tosprocnum_t   LowDiskIOProcId;
    fltreal64_t    NetUse;
    char           NetAUp;
    char           NetBUp;
    Integer        ResLogging;
    Integer        ResMonitor;
    char           Release[29];
    char           Version[32];
} MonPhySum_t;
typedef struct
{
    fltreal64_t    AMPAvgCPU;
    fltreal64_t    AMPAvgDisk;
    fltreal64_t    AMPAvgDiskIO;
    fltreal64_t    HiCPUAMPUse;
    tosprocnum_t   HiCPUAMPNo;
    tosprocnum_t   HiCPUAMPProc;
    fltreal64_t    LoCPUAMPUse;
    tosprocnum_t   LoCPUAMPNo;
    tosprocnum_t   LoCPUAMPProc;
    fltreal64_t    HiDiskAMP;
    tosprocnum_t   HiDiskAMPNo;
    tosprocnum_t   HiDiskAMPProc;
    fltreal64_t    LoDiskAMP;
    tosprocnum_t   LoDiskAMPNo;
    tosprocnum_t   LoDiskAMPProc;
    fltreal64_t    HiDiskAMPIO;
    tosprocnum_t   HiDiskAMPIONo;
    tosprocnum_t   HiDiskAMPIOProc;
    fltreal64_t    LoDiskAMPIO;
    tosprocnum_t   LoDiskAMPIONo;
    tosprocnum_t   LoDiskAMPIOProc;
    fltreal64_t    PEAvgCPU;
    fltreal64_t    HiCPUPEUse;
    tosprocnum_t   HiCPUPENo;
    tosprocnum_t   HiCPUPEProc;
    fltreal64_t    LoCPUPEUse;
    tosprocnum_t   LoCPUPENo;
    tosprocnum_t   LoCPUPEProc;
    fltreal64_t    SessionCount;
    Integer        SesMonitorSys;
    Integer        SesMonitorLoc;
    Integer        ResLogging;
    Integer        ResMonitor;
    char           Release[29];
    char           Version[32];
} MonVirSum_t;
typedef struct 
{
    char           NetAUp;
    char           NetBUp;
    Int16          SampleRate;
} MonVirRes1_t;
typedef struct 
{
    char           NetAUp;
    char           NetBUp;
    char           SystemType[7];
} MonConfig_t;
typedef struct
{
    Integer        ProcId;
    Integer        VProcNo;
    char           VprocType[3];
    Int16          HostId;
    char           Status;
    Int16          DiskSlice;
} MonVirConfig_t;
typedef struct
{
    Integer        ProcId;
    char           Status;
    char           CpuType[7];
    Integer        CpuCount;    
} MonPhyConfig_t;
typedef struct
{
    char           VprocType[3];
    Integer        ProcId;
    Integer        VProcNo;
    Integer        ClusterNo;
    fltreal64_t    CPUUse;
    char           Status;
    Integer        SessLogCount;
    Integer        SessRunCount;
    fltreal64_t    DiskUse;
    fltreal64_t    DiskReads;
    fltreal64_t    DiskWrites;
    fltreal64_t    DiskOutReqAvg;
    fltreal64_t    HostBlockReads;
    fltreal64_t    HostBlockWrites;
    fltreal64_t    MemAllocates;
    fltreal64_t    MemAllocateKB;
    fltreal64_t    PctService;
    fltreal64_t    PctAMPWT;
    fltreal64_t    PctParser;
    fltreal64_t    PctDispatcher;
    fltreal64_t    NetReads;
    fltreal64_t    NetWrites;
    fltreal64_t    NVMemAllocSegs;
} MonVirRes2_t;
typedef struct
{
    Integer        ProcId;
    Integer        AmpCount;
    Integer        PECount;
    fltreal64_t    CPUUse;
    fltreal64_t    PercentKernel;
    fltreal64_t    PercentService;
    fltreal64_t    PercentUser;
    char           Status;
    fltreal64_t    NetAUse;
    fltreal64_t    NetBUse;
    fltreal64_t    DiskUse;
    fltreal64_t    CICUse;
    fltreal64_t    DiskReads;
    fltreal64_t    DiskWrites;
    fltreal64_t    DiskOutReqAvg;
    fltreal64_t    HostBlockReads;
    fltreal64_t    HostBlockWrites;
    fltreal64_t    SwapReads;
    fltreal64_t    SwapWrites;
    fltreal64_t    SwapDrops;
    fltreal64_t    MemAllocates;
    fltreal64_t    MemAllocateKB;
    fltreal64_t    MemFailures;
    fltreal64_t    MemAgings;
    fltreal64_t    NetReads;
    fltreal64_t    NetWrites;
} MonPhyRes2_t;
typedef struct 
{
    Integer        NumOfSteps;
    Integer        CurStepBegNum;
    Integer        CurStepEndNum;
} MonSqlStepInfo_t;
typedef struct
{
    fltreal64_t    EstRowCount;
    fltreal64_t    ActRowCount;
    fltreal64_t    EstElapTime;
    fltreal64_t    ActElapTime;
} MonSqlStepStats_t;
typedef struct
{
    char          OldAcct[MAXNAME] ;
    Int16         ErrorCode;
} SetSessAcct_t;
typedef struct ERROR_FAIL_Type {
    Word         StatementNo;
    Word         Info;
    Word         Code;
    Word         Length;
    char         Msg[255];
} Error_Fail_t;
#define MAXFIELDS 100
typedef struct InfoPairs
{
    short FType;
    short FSize;
} InfoPairs;
typedef struct DataInfo_t
{
    short field_count;
    InfoPairs FieldData[MAXFIELDS];
       
} DataInfo_t; 
#pragma pack()
#endif