| /* |
| * $Header: oraca.h 24-apr-2003.12:50:59 mkandarp Exp $ oraca.h |
| */ |
| |
| /* Copyright (c) 1985, 2003, Oracle Corporation. All rights reserved. */ |
| |
| /* |
| NAME |
| ORACA : Oracle Communications Area. |
| FUNCTION |
| Contains no code. Provides supplementary communications to/from |
| Oracle (in addition to standard SQLCA). |
| NOTES |
| ************************************************************** |
| *** *** |
| *** This file is SOSD. Porters must change the data types *** |
| *** appropriately on their platform. See notes/pcport.doc *** |
| *** for more information. *** |
| *** *** |
| ************************************************************** |
| |
| oracchf : Check cursor cache consistency flag. If set AND oradbgf |
| is set, then directs SQLLIB to perform cursor cache |
| consistency checks before every cursor operation |
| (OPEN, FETCH, SELECT, INSERT, etc.). |
| oradbgf : Master DEBUG flag. Used to turn all DEBUG options |
| on or off. |
| orahchf : Check Heap consistency flag. If set AND oradbgf is set, |
| then directs SQLLIB to perform heap consistency checks |
| everytime memory is dynamically allocated/free'd via |
| sqlalc/sqlfre/sqlrlc. MUST BE SET BEFORE 1ST CONNECT |
| and once set cannot be cleared (subsequent requests |
| to change it are ignored). |
| orastxtf: Save SQL stmt text flag. If set, then directs SQLLIB |
| to save the text of the current SQL stmt in orastxt |
| (in VARCHAR format). |
| orastxt : Saved len and text of current SQL stmt (in VARCHAR |
| format). |
| orasfnm : Saved len and text of filename containing current SQL |
| stmt (in VARCHAR format). |
| oraslnr : Saved line nr within orasfnm of current SQL stmt. |
| |
| Cursor cache statistics. Set after COMMIT or ROLLBACK. Each |
| CONNECT'd DATABASE has its own set of statistics. |
| |
| orahoc : Highest Max Open OraCursors requested. Highest value |
| for MAXOPENCURSORS by any CONNECT to this DATABASE. |
| oramoc : Max Open OraCursors required. Specifies the max nr |
| of OraCursors required to run this pgm. Can be higher |
| than orahoc if working set (MAXOPENCURSORS) was set |
| too low, thus forcing the PCC to expand the cache. |
| oracoc : Current nr of OraCursors used. |
| oranor : Nr of OraCursor cache reassignments. Can show the |
| degree of "thrashing" in the cache. Optimally, this |
| nr should be kept as low as possible (time vs space |
| optimization). |
| oranpr : Nr of SQL stmt "parses". |
| oranex : Nr of SQL stmt "executes". Optimally, the relation- |
| ship of oranex to oranpr should be kept as high as |
| possible. |
| |
| |
| If the symbol ORACA_NONE is defined, then there will be no ORACA |
| *variable*, although there will still be a struct defined. This |
| macro should not normally be defined in application code. |
| |
| If the symbol ORACA_INIT is defined, then the ORACA will be |
| statically initialized. Although this is not necessary in order |
| to use the ORACA, it is a good pgming practice not to have |
| unitialized variables. However, some C compilers/OS's don't |
| allow automatic variables to be init'd in this manner. Therefore, |
| if you are INCLUDE'ing the ORACA in a place where it would be |
| an automatic AND your C compiler/OS doesn't allow this style |
| of initialization, then ORACA_INIT should be left undefined -- |
| all others can define ORACA_INIT if they wish. |
| |
| OWNER |
| Clare |
| DATE |
| 10/19/85 |
| MODIFIED |
| apopat 05/08/02 - [2362423] MVS PE to make lines shorter than 79 |
| apopat 07/31/99 - [707588] TAB to blanks for OCCS |
| lvbcheng 10/27/98 - change long to int for oraca |
| pccint 10/03/96 - Add IS_OSD for linting |
| jbasu 12/12/94 - Bug 217878: note this is an SOSD file |
| losborne 09/04/92 - Make oraca variable optional |
| Osborne 05/24/90 - Add ORACA_STORAGE_CLASS construct |
| Clare 02/20/86 - PCC [10101l] Feature: Heap consistency check. |
| Clare 03/04/86 - PCC [10101r] Port: ORACA init ifdef. |
| Clare 03/12/86 - PCC [10101ab] Feature: ORACA cuc statistics. |
| */ |
| /* IS_OSD */ |
| #ifndef ORACA |
| #define ORACA 1 |
| |
| struct oraca |
| { |
| /* text */ char oracaid[8]; /* Reserved */ |
| /* ub4 */ int oracabc; /* Reserved */ |
| |
| /* Flags which are setable by User. */ |
| |
| /* ub4 */ int oracchf; /* <> 0 if "check cur cache consistncy"*/ |
| /* ub4 */ int oradbgf; /* <> 0 if "do DEBUG mode checking" */ |
| /* ub4 */ int orahchf; /* <> 0 if "do Heap consistency check" */ |
| /* ub4 */ int orastxtf; /* SQL stmt text flag */ |
| #define ORASTFNON 0 /* = don't save text of SQL stmt */ |
| #define ORASTFERR 1 /* = only save on SQLERROR */ |
| #define ORASTFWRN 2 /* = only save on SQLWARNING/SQLERROR */ |
| #define ORASTFANY 3 /* = always save */ |
| struct |
| { |
| /* ub2 */ unsigned short orastxtl; |
| /* text */ char orastxtc[70]; |
| } orastxt; /* text of last SQL stmt */ |
| struct |
| { |
| /* ub2 */ unsigned short orasfnml; |
| /* text */ char orasfnmc[70]; |
| } orasfnm; /* name of file containing SQL stmt */ |
| /* ub4 */ int oraslnr; /* line nr-within-file of SQL stmt */ |
| |
| /* ub4 */ int orahoc; /* highest max open OraCurs requested */ |
| /* ub4 */ int oramoc; /* max open OraCursors required */ |
| /* ub4 */ int oracoc; /* current OraCursors open */ |
| /* ub4 */ int oranor; /* nr of OraCursor re-assignments */ |
| /* ub4 */ int oranpr; /* nr of parses */ |
| /* ub4 */ int oranex; /* nr of executes */ |
| }; |
| |
| #ifndef ORACA_NONE |
| |
| #ifdef ORACA_STORAGE_CLASS |
| ORACA_STORAGE_CLASS struct oraca oraca |
| #else |
| struct oraca oraca |
| #endif |
| #ifdef ORACA_INIT |
| = |
| { |
| {'O','R','A','C','A',' ',' ',' '}, |
| sizeof(struct oraca), |
| 0,0,0,0, |
| {0,{0}}, |
| {0,{0}}, |
| 0, |
| 0,0,0,0,0,0 |
| } |
| #endif |
| ; |
| |
| #endif |
| |
| #endif |
| /* end oraca.h */ |