home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / cicspa2.zip / PA2XXBIN.H < prev   
Text File  |  1995-07-02  |  9KB  |  265 lines

  1. /*********************************************************************/
  2. /*   CONTROL BLOCK NAME= PA2XXBIN                                    */
  3. /*                                                                   */
  4. /*   NAME OF MATCHING COBOL CONTROL BLOCK = PA2XXBIN                 */
  5. /*                                                                   */
  6. /*   DESCRIPTIVE NAME = PA/2 binary  record layout                   */
  7. /*                                             (C version)           */
  8. /*                                                                   */
  9. /*                                                                   */
  10. /*   COPYRIGHT        =                                              */
  11. /*                                                                   */
  12. /*   STATUS       Version 1 Release 01                               */
  13. /*                                                                   */
  14. /*                                                                   */
  15. /*   FUNCTION =  Defines layout of PA2 binary file.                  */
  16. /*     It is variable in length.                                     */
  17. /*                                                                   */
  18. /*   LIFTIME  = DSECT used within various programs, overlaying       */
  19. /*     working storage                                               */
  20. /*                                                                   */
  21. /*   STORAGE CLASS = GENERAL                                         */
  22. /*                                                                   */
  23. /*   LOCATION      = Working storage                                 */
  24. /*                                                                   */
  25. /*   INNER CONTOL BLOCKS = None                                      */
  26. /*                                                                   */
  27. /*   NOTES :-                                                        */
  28. /*     DEPENDENCIES = C  Compiler                                    */
  29. /*     RESTRICTIONS = none                                           */
  30. /*     MODULE TYPE  = Control Block Definition                       */
  31. /*     PROCESSOR    = PS/2 and PC                                    */
  32. /*                                                                   */
  33. /*********************************************************************/
  34.  
  35. /* Record version number definition                                   */
  36. #define VER_100                0x100C
  37. /* Below added for compatability with COBOL programs reading the value
  38.    of this in non byte-swapped form! */
  39. #define VER_100_BYTE_SWAPPED   0x0C10
  40.  
  41. #include "pa2allen.h"
  42.  
  43. /****************************\
  44. *                            *
  45. *   Record data structures   *
  46. *                            *
  47. \****************************/
  48.  
  49. /**************\
  50. *   DATA_SIT   *
  51. \**************/
  52.  
  53. typedef struct
  54. {
  55.   char   key[4];
  56.   char   filler[48];
  57. } DATA_SIT;
  58.  
  59. /**************\
  60. *   DATA_PID   *
  61. \**************/
  62.  
  63. typedef struct
  64. {
  65.   char   key[KEYLEN];
  66.    ULONG    pidnotran;                 /* Offset= 16 */
  67.    ULONG    pidtotaltime;                /* Offset= 20 */
  68.    ULONG    pidacttotaltime;                /* Offset=    */
  69.    ULONG    pidtaskn;                /*Task number Offset=    */
  70.    short    pidprty;                  /* Offset=    */
  71.    short    pidprogramno;                  /* Offset=    */
  72.    char     pidprogram[PIDSTACKNO][PROGRAMLEN]; /* Offset=    */
  73.    char     pidtran[TRANLEN];                /* Offset= 28 */
  74.    unsigned pidglbl : 1;                  /* Global Process */
  75.    char pidfiller[9];                /* Offset=    */
  76. } DATA_PID;
  77.  
  78. /**************\
  79. *   DATA_BUK   *
  80. \**************/
  81.  
  82. typedef struct
  83. {
  84.   char   key[KEYLEN];
  85. ULONG kctran;                       /* Number of times transaction run */
  86. ULONG kcbucketno[NOCLOCKS];         /* Number of times Bucket[i] started */
  87. ULONG kcbucketstopno[NOCLOCKS];     /* Number of times Bucket[i] stopped */
  88. ULONG kcbuckettot[NOCLOCKS];        /* Total time in millisecs in Bucket[i] */
  89. char  filler[12];
  90. } DATA_BUK;
  91.  
  92. /**************\
  93. *   DATA_PCT   *
  94. \**************/
  95.  
  96. typedef struct
  97. {
  98.   char   key[KEYLEN];
  99. ULONG kctran;                       /* Number of times transaction run */
  100. ULONG kctrantotaltime;              /* Sum of response times in millisecs */
  101. ULONG kctranshortesttime;           /* Shortest response time in millisecs */
  102. ULONG kctranlongesttime;            /* Longest response time in millisecs */
  103. ULONG kcnoabend;                    /* Number of ABENDs */
  104. ULONG kcsync;                       /*Number of SYNCPOINTs */
  105. ULONG kcsynctotaltime;              /* Total time in SYNCPOINT in millisecs */
  106. ULONG kcbtsync;                     /*Number of System File Manager calls in SYNCPOINT */
  107. ULONG kcsyncbttotaltime;            /* Total time in System File Manager SYNCPOINT in millisecs */
  108. double kcsq;                        /* Sum of squares of response times in millisecs */
  109. char filler[4];                     /* Filler */
  110. } DATA_PCT;
  111.  
  112. /**************\
  113. *   DATA_SNT   *
  114. \**************/
  115.  
  116. typedef struct
  117. {
  118.   char   key[KEYLEN];
  119.   char  filler[48];
  120. } DATA_SNT;
  121.  
  122. /**************\
  123. *   DATA_FCT   *
  124. \**************/
  125.  
  126. typedef struct
  127. {
  128.   char   key[KEYLEN];
  129.    ULONG fctran;        /* Number of times transaction run */
  130.    ULONG fcread;        /* Number of READs */
  131.    ULONG fcwrite;       /* Number of WRITEs */
  132.    ULONG fcrewrite;     /* Number of REWRITEs */
  133.    ULONG fcdelete;      /* Number of DELETEs */
  134.    ULONG fcunlock;      /* Number of UNLOCKs */
  135.    ULONG fcstartbr;     /* Number of STARTBRowses */
  136.    ULONG fcresetbr;     /* Number of RESETBRowses */
  137.    ULONG fcendbr;       /* Number of ENDBRowses */
  138.    ULONG fcreadnext;    /* Number of READNEXTs */
  139.    ULONG fcreadprev;    /* Number of READPREVious */
  140.    ULONG fcbtread;      /* Number of System File Manager calls forREADs */
  141.    ULONG fcbtwrite;     /* Number of System File Manager calls forWRITEs */
  142.    ULONG fcbtrewrite;   /* Number of System File Manager calls forREWRITEs */
  143.    ULONG fcbtdelete;    /* Number of System File Manager calls forDELETEs */
  144.    ULONG fcbtunlock;    /* Number of System File Manager calls forUNLOCKs */
  145.    ULONG fcbtstartbr;   /* Number of System File Manager calls forSTARTBRowses */
  146.    ULONG fcbtresetbr;   /* Number of System File Manager calls forRESETBRowses */
  147.    ULONG fcbtendbr;     /* Number of System File Manager calls forENDBRowses */
  148.    ULONG fcbtreadnext;  /* Number of System File Manager calls forREADNEXTs */
  149.    ULONG fcbtreadprev;  /* Number of System File Manager calls forREADPREVious */
  150.    ULONG fctotread;     /* Total time in millisecs for READs */
  151.    ULONG fctotwrite;    /* Total time in millisecs for WRITEs */
  152.    ULONG fctotrewrite;  /* Total time in millisecs for REWRITEs */
  153.    ULONG fctotdelete;   /* Total time in millisecs for DELETEs */
  154.    ULONG fctotunlock;   /* Total time in millisecs for UNLOCKs */
  155.    ULONG fctotstartbr;  /* Total time in millisecs for STARTBRowses */
  156.    ULONG fctotresetbr;  /* Total time in millisecs for RESETBRowses */
  157.    ULONG fctotendbr;    /* Total time in millisecs for ENDBRowses */
  158.    ULONG fctotreadnext; /* Total time in millisecs for READNEXTs */
  159.    ULONG fctotreadprev; /* Total time in millisecs for READPREVious */
  160. } DATA_FCT;
  161.  
  162. /**************\
  163. *   DATA_TCT   *
  164. \**************/
  165.  
  166. typedef struct
  167. {
  168.   char   key[KEYLEN];
  169.   char  filler[48];
  170. } DATA_TCT;
  171.  
  172. /**************\
  173. *   DATA_TCS   *
  174. \**************/
  175.  
  176. typedef struct
  177. {
  178.   char   key[KEYLEN];
  179.   char  filler[48];
  180. } DATA_TCS;
  181.  
  182. /**************\
  183. *   DATA_TST   *
  184. \**************/
  185.  
  186. typedef struct
  187. {
  188.   char   key[KEYLEN];
  189.   char  filler[48];
  190. } DATA_TST;
  191.  
  192. /**************\
  193. *   DATA_DCT   *
  194. \**************/
  195.  
  196. typedef struct
  197. {
  198.   char   key[KEYLEN];
  199.   char  filler[48];
  200. } DATA_DCT;
  201.  
  202. /**************\
  203. *   DATA_PPT   *
  204. \**************/
  205.  
  206. typedef struct
  207. {
  208.   char   key[KEYLEN];
  209.   char  filler[48];
  210. } DATA_PPT;
  211.  
  212. /*******************************\
  213. *                               *
  214. *   Composite data structures   *
  215. *                               *
  216. \*******************************/
  217. /*******************\
  218. *   PA2TABLE_DATA   *
  219. \*******************/
  220.  
  221. typedef union
  222. {
  223.   DATA_SIT sit;
  224.   DATA_PCT pct;
  225.   DATA_FCT fct;
  226.   DATA_SNT snt;
  227.   DATA_TCT tct;
  228.   DATA_TCS tcs;
  229.   DATA_TST tst;
  230.   DATA_DCT dct;
  231.   DATA_PPT ppt;
  232.   DATA_BUK buk;
  233.   DATA_PID pid;
  234. } PA2TABLE_DATA;
  235.  
  236. /*******************\
  237. *   PA2TABLE_AREA   *
  238. \*******************/
  239.  
  240. typedef struct
  241. {
  242.   PA2TABLE_DATA data[5];
  243. } PA2TABLE_AREA;
  244.  
  245. /**************\
  246. *   PA2TABLE   *
  247. \**************/
  248.  
  249. typedef struct
  250. {
  251.   char applid[8];    /* applid as defined in sit, right aligned */
  252.   ULONG kctrantot;   /* total transactions run */
  253.   ULONG tottime;     /* total run time in seconds */
  254.   char date[4];      /* date in packed decimal 00yyddd+ */
  255.   char time[4];      /* time in packed decimal 0hhmmss+ */
  256.   short length;      /* length of real data returned */
  257.   short noitems;     /* number of items in array */
  258.   short maxcurrenttran; /* maximum con-current tran */
  259.   char entry_type[1];
  260.   char end[1];
  261.   char spare[16];     /* Reserved for future expansion */
  262.   /* align to multiple of 16 */
  263.   PA2TABLE_AREA record;
  264. } PA2TABLE;
  265.