home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / PRECOM.ZIP / SQL.DEF < prev    next >
Text File  |  1992-09-15  |  18KB  |  434 lines

  1. DEFINITION MODULE SQL;
  2.  
  3.  
  4.  
  5. (*# call(o_a_size => off,
  6.          o_a_copy=>off,
  7.          result_optional=>on,
  8.          reg_saved => (si, di, ds, st1, st2),
  9.          reg_param => (),
  10.          seg_name => none,
  11.          near_call => off,
  12.          ds_eq_ss => off) *)
  13. (*# module(implementation=>off, init_code => off) *)
  14. (*# name(prefix => none) *)
  15. (*# data(near_ptr => off,var_enum_size=>off) *)
  16. (*# check(index=>off,range=>off,overflow=>off,nil_ptr=>off) *)
  17.  
  18.  
  19.  
  20. (****************************************************************************
  21.  
  22.    Module Name      = SQL.H                         12/10/91
  23.  
  24.    Descriptive Name = External Include File
  25.  
  26.    Copyright = nnnnnnnn (C) Copyright IBM Corp. 1987, 1988, 1989, 1990
  27.            Licensed Material - Program Property of IBM
  28.            Refer to Copyright Instructions Form Number G120-3083
  29.  
  30.    Function = Include File defining
  31.         System Constants
  32.         SQLCA/SQLDA Constants
  33.         Dynamic Link Interface to BINDER
  34.         Error Message Retrieval Interface
  35.         Authorization Constants
  36.  
  37.    Operating System = OS/2 Extended Edition
  38.  
  39. ****************************************************************************)
  40. (* Required Include Files                           *)
  41. FROM SQLCA IMPORT sqlca;
  42.  
  43. (* Operating System Control Parameters                       *)
  44. TYPE
  45.  
  46.      SQL_API_RC = CARDINAL;
  47.      SQL_API_FN = ADDRESS;
  48.      SQL_POINTER = ADDRESS;    
  49.  
  50. (* System Constants *)
  51. CONST
  52.    SQL_KEYPMAX       =      16;   (* Maximum nbr of key parts in Index *)
  53.    SQL_KEYLMAX       =     255;    (* Maximum key length             *)
  54.    SQL_SORTFLDLM     =     254;    (* Maximum size of field for sort    *)
  55.    SQL_MAXRECL       =    4005;    (* Maximum record length         *)
  56.    SQL_MAXTABLES     =    15;   (* Maximum nbr of tables in a SELECT *)
  57.    SQL_MAXSEL_ITEM   =     255;    (* Maximum nbr of items in a SELECT  *)
  58.    SQL_MAXVARS       =     880;    (* Maximum nbr of unique Host Vars   *)
  59.    SQL_MAXVARS_STT   =    1489;    (* Maximum nbr of Host Vars per stmt *)
  60.    SQL_MAXSTMTS      =     400;    (* Maximum nbr of Sections in a Plan *)
  61.    SQL_MAXCOLS       =     255;    (* Maximum nbr of columns in a table *)
  62.    SQL_MAX_STMT_SIZ  = 32765;    (* Maximum statement size         *)
  63.  
  64.    SQL_SMALL_LENGTH  =       2;    (* Size of a SMALLINT             *)
  65.    SQL_MAXSMALLVAL   =  MAX(INTEGER);    (* Maximum value of a SMALLINT         *)
  66.    SQL_MINSMALLVAL   =  MIN(INTEGER);    (* Minimum value of a SMALLINT         *)
  67.    SQL_INT_LENGTH    =       4;    (* Size of an INTEGER             *)
  68.    SQL_MAXINTVAL   =MAX(LONGINT);    (* Maximum value of an INTEGER         *)
  69.    SQL_MININTVAL   =MIN(LONGINT);    (* Minimum value of an INTEGER         *)
  70.    SQL_FLOAT_LENGTH    =   8;    (* Size of a FLOAT             *)
  71.    SQL_DEFDEC_PRECISION    =   5;    (* Default precision for DECIMAL     *)
  72.    SQL_DEFDEC_SCALE    =   0;    (* Default scale for DECIMAL         *)
  73.    SQL_MAXDECIMAL    =  31;    (* Maximum scale/prec. for DECIMAL   *)
  74.    SQL_DEFCHAR        =   1;    (* Default length for a CHAR         *)
  75.    SQL_MAXCHAR        = 254;    (* Maximum length of a CHAR         *)
  76.    SQL_MAXLSTR        = 255;    (* Maximum length of an LSTRING      *)
  77.    SQL_MAXVCHAR =(SQL_MAXRECL-5);    (* Maximum length of a VARCHAR         *)
  78.    SQL_MAXVGRAPH     =2000;    (* Maximum length of a VARGRAPHIC    *)
  79.    SQL_VCHAROH        =   4;    (* Overhead for VARCHAR in record    *)
  80.    SQL_LONGMAX           =32700;    (* Maximum length of a LONG VARCHAR  *)
  81.    SQL_LONGGRMAX       = 16350;    (* Max. length of a LONG VARGRAPHIC  *)
  82.    SQL_LVCHAROH        =  24;    (* Overhead for LONG VARCHAR in rec. *)
  83.    SQL_TIME_LENGTH    =   3;    (* Size of a TIME field          *)
  84.    SQL_TIME_STRLEN    =   8;    (* Size of a TIME field output         *)
  85.    SQL_TIME_MINSTRLEN    =   5;    (* Size of a non-USA TIME field output
  86.                        without seconds             *)
  87.    SQL_DATE_LENGTH    =   4;    (* Size of a DATE field          *)
  88.    SQL_DATE_STRLEN    =  10;    (* Size of a DATE field output         *)
  89.    SQL_STAMP_LENGTH    =  10;    (* Size of a TIMESTAMP field         *)
  90.    SQL_STAMP_STRLEN    =  26;    (* Size of a TIMESTAMP field output  *)
  91.    SQL_STAMP_MINSTRLEN    =  19;    (* Size of a TIMESTAMP field output
  92.                        without microseconds          *)
  93.    SQL_IND_LENGTH    =   2;    (* Size of a indicator value         *)
  94.  
  95.    SQL_LG_IDENT        =  18;    (* Maximum length of Long Identifer  *)
  96.    SQL_SH_IDENT        =   8;    (* Maximum length of Short Identifer *)
  97.    SQL_MN_IDENT        =   1;    (* Minimum length of Identifiers     *)
  98.    SQL_MAX_VAR_NAME    =  30;    (* Max size of Host Variable Name    *)
  99.  
  100.  
  101.  
  102. (* Codepages *)
  103.    SQL_CP_437         =437;    (* Codepage 437 - US, Europe         *)
  104.    SQL_CP_819         =819;    (* Codepage 819 - ISO 8859-1         *)
  105.    SQL_CP_850         =850;    (* Codepage 850 - International PC   *)
  106.    SQL_CP_860         =860;    (* Codepage 860 - Portuguese         *)
  107.    SQL_CP_863         =863;    (* Codepage 863 - Canadian-French    *)
  108.    SQL_CP_865         =865;    (* Codepage 865 - Norway, Denmark    *)
  109.    SQL_CP_891         =891;    (* Codepage 891 - Korean         *)
  110.    SQL_CP_897         =897;    (* Codepage 897 - Japanese         *)
  111.    SQL_CP_903         =903;    (* Codepage 903 - Chinese         *)
  112.    SQL_CP_904         =904;    (* Codepage 904 - Taiwan         *)
  113.    SQL_CP_1040        =1040;    (* Codepage 1040 - Extended Korean   *)
  114.    SQL_CP_1041        =1041;    (* Codepage 1041 - Extended Japanese *)
  115.    SQL_CP_1042        =1042;    (* Codepage 1042 - Extended Chinese  *)
  116.    SQL_CP_1043        =1043;    (* Codepage 1043 - Extended Taiwan   *)
  117.  
  118. (* DBCS Codepages *)
  119.    SQL_CP_926         =926;    (* Codepage 926 - Korean         *)
  120.    SQL_CP_301         =301;    (* Codepage 301 - Japanese         *)
  121.    SQL_CP_928         =928;    (* Codepage 928 - Chinese         *)
  122.    SQL_CP_927         =927;    (* Codepage 927 - Taiwan         *)
  123.  
  124. (* Combined Codepages *)
  125.    SQL_CP_934         =934;    (* Codepage 891 + 926 - Korean         *)
  126.    SQL_CP_932         =932;    (* Codepage 897 + 301 - Japanese     *)
  127.    SQL_CP_936         =936;  (* Codepage 903 + 928 - Chinese      *)
  128.    SQL_CP_938         =938;    (* Codepage 904 + 927 - Taiwan         *)
  129.    SQL_CP_944         =944;    (* Codepage 1040 + 926 - Ext.Korean  *)
  130.    SQL_CP_942         =942;    (* Codepage 1041 + 301 - Ext.Japanese*)
  131.    SQL_CP_946         =946;    (* Codepage 1042 + 928 - Ext.Chinese *)
  132.    SQL_CP_948         =948;    (* Codepage 1043 + 927 - Ext.Taiwan  *)
  133.  
  134. (* Datastream Types *)
  135.    SQL_JPN_PC         =1; (* Japanese-PC               *)
  136.    SQL_CHN_PC         =2; (* Chinese-PC               *)
  137.    SQL_KOR_PC         =3; (* Korean-PC                *)
  138.    SQL_SBC_PC         =0; (* Single byte PC               *)
  139.    SQL_UNKN_PC         =255; (* Unknown                   *)
  140.  
  141. (* SQLCA Constants *)
  142.  
  143.    SQL_RC_INVALID_SQLCA    = -1;    (* Invalid SQLCA address *)
  144.  
  145. (* Size of SQLCA *)
  146.    SQLCA_SIZE     =SIZE( sqlca);
  147.  
  148. (* SQL Error message token delimiter *)
  149.    SQL_ERRMC_PRES = 0FFH;        (* delimiter for string entry *)
  150.  
  151. (* Offset in SQLERRD - Diagnostic information *)
  152.    SQL_ERRD_RC     = 0;        (* return code *)
  153.    SQL_ERRD_REAS = 1;        (* reason code *)
  154.    SQL_ERRD_CNT     = 2;        (* nbr rows inserted/updated/deleted *)
  155.    SQL_ERRD_OPTM = 3;        (* optimizer information *)
  156.    SQL_ERRD_DCNT = 4;        (* nbr of cascaded deletes/updates *)
  157.    SQL_ERRD_LINE = 4;        (* line number for recompile error *)
  158.    SQL_ERRD_DIAG = 5;        (* diagnostics *)
  159.  
  160. (* Indexes in SQLWARN - Warning flags *)
  161.    SQL_WARN_ANY      =0;        (* composite - set if any warnings *)
  162.    SQL_WARN_TRUNC =1;        (* string column truncated *)
  163.    SQL_WARN_NUL      =2;        (* null values eliminated *)
  164.    SQL_WARN_MISM = 3;        (* nbr of columns/host vars mismatch *)
  165.    SQL_WARN_ALLR = 4;        (* no WHERE clause in update/delete *)
  166.    SQL_WARN_DATE = 6;        (* date has been truncated *)
  167.  
  168. (* Values for Warning flags in SQLWARN *)
  169.    SQL_WARNING     ='W';            (* warning indicator *)
  170.    SQL_NULL_TRN     ='N';            (* null terminator truncated warning *)
  171.    SQL_NO_WARN     =' ';            (* no warning indicator *)
  172.  
  173.  
  174.  
  175. (* SQLDA Constants *)
  176.  
  177. (* increment for type with null indicator *)
  178.    SQL_TYP_NULINC    =1;
  179.  
  180. (* Variable Types *)
  181.    SQL_TYP_DATE          =384;    (* DATE *)
  182.    SQL_TYP_NDATE      = (SQL_TYP_DATE+SQL_TYP_NULINC);
  183.  
  184.    SQL_TYP_TIME          =388;    (* TIME *)
  185.    SQL_TYP_NTIME      = (SQL_TYP_TIME+SQL_TYP_NULINC);
  186.  
  187.    SQL_TYP_STAMP      = 392;    (* TIMESTAMP *)
  188.    SQL_TYP_NSTAMP     = (SQL_TYP_STAMP+SQL_TYP_NULINC);
  189.  
  190.    SQL_TYP_VARCHAR    = 448;    (* VARCHAR(i) - varying length string
  191.                             (2 byte length) *)
  192.    SQL_TYP_NVARCHAR   = (SQL_TYP_VARCHAR+SQL_TYP_NULINC);
  193.  
  194.    SQL_TYP_CHAR          = 452;    (* CHAR(i) - fixed length string *)
  195.    SQL_TYP_NCHAR      = (SQL_TYP_CHAR+SQL_TYP_NULINC);
  196.  
  197.    SQL_TYP_LONG          = 456;    (* LONG VARCHAR - varying length
  198.                               string *)
  199.    SQL_TYP_NLONG      = (SQL_TYP_LONG+SQL_TYP_NULINC);
  200.  
  201.    SQL_TYP_CSTR          = 460;    (* varying length string for C
  202.                         (null terminated) *)
  203.    SQL_TYP_NCSTR      = (SQL_TYP_CSTR+SQL_TYP_NULINC);
  204.  
  205.    SQL_TYP_VARGRAPH   = 464;    (* VARGRAPHIC(i) - varying length
  206.                        graphic string (2 byte length) *)
  207.    SQL_TYP_NVARGRAPH  = (SQL_TYP_VARGRAPH+SQL_TYP_NULINC);
  208.  
  209.    SQL_TYP_GRAPHIC    = 468;    (* GRAPHIC(i) - fixed length graphic
  210.                        string *)
  211.    SQL_TYP_NGRAPHIC   = (SQL_TYP_GRAPHIC+SQL_TYP_NULINC);
  212.  
  213.    SQL_TYP_LONGRAPH   = 472;    (* LONG VARGRAPHIC(i) - varying length
  214.                        graphic string *)
  215.    SQL_TYP_NLONGRAPH  = (SQL_TYP_LONGRAPH+SQL_TYP_NULINC);
  216.  
  217.    SQL_TYP_LSTR          = 476;    (* varying length string for Pascal
  218.                         (1-byte length) *)
  219.    SQL_TYP_NLSTR      = (SQL_TYP_LSTR+SQL_TYP_NULINC);
  220.  
  221.    SQL_TYP_FLOAT      = 480;    (* FLOAT - 8-byte floating point   *)
  222.    SQL_TYP_NFLOAT     = (SQL_TYP_FLOAT+SQL_TYP_NULINC);
  223.  
  224.    SQL_TYP_DECIMAL    = 484;      (* DECIMAL (m,n)            *)
  225.    SQL_TYP_NDECIMAL   = (SQL_TYP_DECIMAL+SQL_TYP_NULINC);
  226.  
  227.  
  228.    SQL_TYP_INTEGER    = 496;    (* INTEGER - 4-byte signed integer *)
  229.    SQL_TYP_NINTEGER   = (SQL_TYP_INTEGER+SQL_TYP_NULINC);
  230.  
  231.    SQL_TYP_SMALL      = 500;    (* SMALLINT - 2-byte signed integer*)
  232.    SQL_TYP_NSMALL     = (SQL_TYP_SMALL+SQL_TYP_NULINC);
  233.  
  234.  
  235.  
  236.  
  237. (* Return Codes for sqlabind and sqlabndr *)
  238.  
  239.    SQLA_RC_BINDERROR    = -1;    (* Bind execution failed *)
  240.    SQLA_RC_BAD_BINDNAME    = -2;    (* Invalid bind file *)
  241.    SQLA_RC_BAD_DBNAME    = -3;    (* Invalid database *)
  242.    SQLA_RC_BAD_PASSWD    = -4;    (* Invalid password
  243.                        (not used after Release 2) *)
  244.    SQLA_RC_BAD_MSGNAME    = -5;    (* Invalid message file *)
  245.    SQLA_RC_BAD_FORMAT    = -6;    (* Invalid format *)
  246.    SQLA_RC_OPEN_ERROR    = -31;    (* Error opening list file *)
  247.    SQLA_RC_BAD_BNDFILE    = -39;    (* Bind file corrupted *)
  248.    SQLA_RC_LIST_ERROR    = -40;    (* Bind list errors *)
  249.    SQLA_RC_INTERRUPT    = -94;    (* Interrupt *)
  250. (* Additional return Codes for sqlabndr only *)
  251.    SQLA_RC_OPTION_LEN_BAD = -4903; (* Option array length is invalid *)
  252.    SQLA_RC_OPTION_PTR_BAD = -4904; (* Option array ptr is invalid      *)
  253.    SQLA_RC_OPTION_SIZE_BAD= -4905; (* Option array size is invalid   *)
  254.    SQLA_RC_OPTION_DATA_BAD= -4917; (* Option array data is invalid   *)
  255.  
  256. (* Values used for the date/time format parameter of sqlabind *)
  257.    SQL_FMT_DEF         =  "DEF";    (* FORMAT = Default for Country Code *)
  258.    SQL_FMT_USA         =  "USA";    (* FORMAT = USA   *)
  259.    SQL_FMT_EUR         =  "EUR";    (* FORMAT = EUR   *)
  260.    SQL_FMT_ISO         =  "ISO";    (* FORMAT = ISO   *)
  261.    SQL_FMT_JIS         =  "JIS";    (* FORMAT = JIS   *)
  262.    SQL_FMT_LOC         =  "LOC";    (* FORMAT = LOCAL *)
  263.  
  264.  
  265.  
  266. (* Structures used system wide                           *)
  267.  
  268. TYPE
  269.  
  270.  
  271. sqlchar = RECORD
  272.   Len : CARDINAL;
  273.   Data : ARRAY[0..255] OF CHAR;
  274. END;
  275.  
  276. (* Structure used to store binder options when calling sqlabndr        *)
  277.  
  278. sqloptheader = RECORD
  279.   allocated : LONGCARD;
  280.   used      : LONGCARD;
  281. END;
  282.  
  283. sqlbindopt = RECORD
  284.   type : LONGCARD;
  285.   value: LONGCARD;
  286. END;
  287.  
  288. sqlopt = RECORD
  289.   header : sqloptheader;
  290.   values : ARRAY[0..100] OF sqlbindopt;
  291. END;
  292.  
  293.  
  294. CONST
  295. (* Values used for option[n].type in the sqlopt structure of sqlabndr *)
  296.    SQL_FRMT_OPT        =  1;    (* Option for date/time format *)
  297.    SQL_ISO_OPT        =  4;    (* Option for isolation level *)
  298.    SQL_BLOCK_OPT     =  5;    (* Option for record blocking *)
  299.    SQL_GRANT_OPT     =  6;    (* Option for granting privileges *)
  300.  
  301. (* Values used for option[n].val when option[n].type is SQL_FRMT_OPT *)
  302. (* These can be also be used for the date/time format parameter of sqlabind *)
  303.    SQL_FMT_0    =     '0';    (* FORMAT = Default for Country Code *)
  304.    SQL_FMT_1    =     '1';    (* FORMAT = USA   *)
  305.    SQL_FMT_2    =     '2';    (* FORMAT = EUR   *)
  306.    SQL_FMT_3    =     '3';    (* FORMAT = ISO   *)
  307.    SQL_FMT_4    =     '4';    (* FORMAT = JIS   *)
  308.    SQL_FMT_5    =     '5';    (* FORMAT = LOCAL *)
  309.  
  310. (* Values used for option[n].val when option[n].type is SQL_ISO_OPT *)
  311.    SQL_REP_READ    =      0;    (* Repeatable read level  *)
  312.    SQL_CURSOR_STAB=      1;    (* Cursor stability level *)
  313.    SQL_UNCOM_READ=      2;    (* Uncommitted read level *)
  314.  
  315. (* Values used for option[n].val when option[n].type is SQL_BLOCK_OPT *)
  316.    SQL_BL_UNAMBIG    =  0;    (* Block Unambiguous cursors *)
  317.    SQL_BL_ALL        =  1;    (* Block All cursors *)
  318.    SQL_NO_BL        =  2;    (* Block No cursors *)
  319.  
  320.  
  321.  
  322. (* Binder Interface Parameters/Return Codes *)
  323.  
  324. (* SQL_API_RC  SQL_API_FN             BINDER *)
  325. PROCEDURE  sqlabind (VAR ProgName,     (* program name *)
  326.                          DBName: ARRAY OF CHAR;    (* database *)
  327.                      VAR C :CHAR;     (* spare *)
  328.                      VAR MessageFile : ARRAY OF CHAR;     (* message file *)
  329.                      VAR DateTime : ARRAY OF CHAR;    (* date/time format *)
  330.                      VAR SQL_CA : sqlca ): INTEGER;     (* SQLCA *)
  331.  
  332. (* SQL_API_RC  SQL_API_FN    *)(*        BINDER *)
  333. PROCEDURE      sqlabndr (VAR ProgramName,     (* program name *)
  334.                              DBName,     (* database *)
  335.                              MessageFile: ARRAY OF CHAR;(* message file *)
  336.                          VAR BinderOps  : sqlopt;     (* binder options *)
  337.                          VAR SQLCA      : sqlca ): CARDINAL;     (* SQLCA *)
  338.  
  339. (* Generic Dynamic Link Interface to the Binder *)
  340. (* SQL_API_RC  SQL_API_FN    *)        (* BINDER *)
  341. PROCEDURE  SQLGBIND (spare,        (* spare1 *)
  342.                      MsgFileLen,        (* Message file length *)
  343.                      FormatOptionLen,    (* Format option length *)
  344.                      PlanNameLen,        (* Plan name length *)
  345.                      DBNameLen : CARDINAL;        (* Database name length *)
  346.                      VAR SQLca : sqlca;     (* SQLCA *)
  347.                      VAR Spare2,     (* spare2 *)
  348.                          MsgFile,     (* Message file *)
  349.                          DateTimeFmt,     (* Date/time format *)
  350.                          ProgName,     (* Program name *)
  351.                          DBName : ARRAY OF CHAR):CARDINAL;    (* Database *)
  352.     
  353.  
  354.  
  355. (* SQL_API_RC  SQL_API_FN *)            (* BINDER *)
  356. PROCEDURE SQLGBNDR (PlanNmLen,        (* Plan name length *)
  357.                     DBNmLen,        (* Database name length *)
  358.                     MsgFileLen: CARDINAL;        (* Message file length *)
  359.                     VAR ProgName,     (* program name *)
  360.                         DbName,     (* database *)
  361.                         MsgFile : ARRAY OF CHAR;     (* message file *)
  362.                     VAR SQLOPT  : sqlopt;      (* binder options *)
  363.                     VAR SQLCA   : sqlca );     (* SQLCA *)
  364.  
  365.  
  366. (* Error Message Retrieval Interface Parameters/Return Codes *)
  367.  
  368.  
  369. PROCEDURE sqlaintp_api (VAR buff : ARRAY OF CHAR;        (* buffer for message text *)
  370.                         BufSize : CARDINAL;        (* buffer size *)
  371.                         LineWidth:CARDINAL;        (* line width *)
  372.                         MsgFile : ARRAY OF CHAR;        (* message file *)
  373.                         VAR SqlCA : sqlca ):CARDINAL;    (* SQLCA *)
  374.  
  375. (* Generic Dynamic Link Interface to Error Message Retrieval *)
  376. PROCEDURE SQLGINTP (BufSize : CARDINAL;        (* buffer size *)
  377.                     LineWidth : CARDINAL;            (* line width *)
  378.                     VAR SqlCA : sqlca;        (* SQLCA *)
  379.                     VAR Buff : ARRAY OF CHAR);    (* buffer *)
  380.  
  381.  
  382. CONST
  383. (* Return Codes for sqlaintp *)
  384.    SQLA_ERR_BADCC    = -1;    (* insufficient memory for msg file *)
  385.    SQLA_ERR_NOCOD    = -2;    (* no error code in SQLCA *)
  386.    SQLA_ERR_NOMSG    = -3;    (* requested message not found *)
  387.    SQLA_ERR_BADLL    = -4;    (* specified line length negative *)
  388.    SQLA_ERR_BADCA    = -5;    (* invalid sqlca/buffer addr/length *)
  389.  
  390.  
  391.  
  392. (* Administrative/Database Authorizations returned from Get Administrative
  393.    Authorizations function *)
  394.  
  395. (* Authorizations granted explicitly to user *)
  396.    SQL_SYSADM       =    00001H;    (* SYSADM Authority    *)
  397.    SQL_DBADM       =    00002H;    (* DBADM Authority     *)
  398.    SQL_CREATETAB   =    00004H;    (* CREATETAB Privilege *)
  399.    SQL_BINDADD       =    00008H;    (* BINDADD Privilege   *)
  400.    SQL_CONNECT       =    00010H;    (* CONNECT Privilege   *)
  401.  
  402. (* Composite of authorizations granted explicitly to user,
  403.    to groups of which user is a member, and to PUBLIC *)
  404.  
  405. (* the X 3 is to shift left 8 bits *)
  406.  
  407.    SQL_SYSADM_GRP  =    (SQL_SYSADM * 3);
  408.    SQL_DBADM_GRP   =    (SQL_DBADM  * 3);
  409.    SQL_CREATETAB_GRP=   (SQL_CREATETAB *3);
  410.    SQL_BINDADD_GRP  =   (SQL_BINDADD * 3);
  411.    SQL_CONNECT_GRP  =   (SQL_CONNECT * 3);
  412.  
  413. (* Table/View Authorizations/Dependencies Bit definitions
  414.    in SYSTABAUTH.TABAUTH and SYSPLANDEP.TABAUTH *)
  415.  
  416.  
  417.    SQL_TAB_CTL      =    00001H;    (* Control Authority           *)
  418.    SQL_TAB_ALT      =    00002H;    (* Alter Privilege           *)
  419.    SQL_TAB_DEL      =    00004H;    (* Delete Privilege/Dependency *)
  420.    SQL_TAB_IDX      =    00008H;    (* Index Privilege           *)
  421.    SQL_TAB_INS      =    00010H;    (* Insert Privilege/Dependency *)
  422.    SQL_TAB_SEL      =    00020H;    (* Select Privilege/Dependency *)
  423.    SQL_TAB_UPD      =    00040H;    (* Update Privilege/Dependency *)
  424.    SQL_TAB_REF      =    00080H;    (* Reference Privilege           *)
  425.    SQL_TAB_KEY      =    02000H;    (* Key Dependency           *)
  426.    SQL_TAB_CAS      =    04000H;    (* Cascade Dependency           *)
  427.  
  428. (* Definitions for application remote interface *)
  429.  
  430.    SQLZ_DISCONNECT_PROC    = 1;    (* Unload Progam        *)
  431.    SQLZ_HOLD_PROC        = 2;    (* Keep program loaded        *)
  432.  
  433. END SQL.
  434.