.ll 73
.ad 8
.bm 8
.fm 4
.bt $Copyright by   Software AG, 1997$$Page %$
.tm 12
.hm 6
.hs 3
.tt 1 $SQL$Project Distributed Database System$VSP00$
.tt 2 $$$
.tt 3 $Ingo Struewing$basic_constants_and_types$1997-07-17$
***********************************************************
.nf


    ========== licence begin LGPL
    Copyright (C) 2002 SAP AG

    This library is free software; you can redistribute it and/or
    modify it under the terms of the GNU Lesser General Public
    License as published by the Free Software Foundation; either
    version 2.1 of the License, or (at your option) any later version.

    This library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    Lesser General Public License for more details.

    You should have received a copy of the GNU Lesser General Public
    License along with this library; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    ========== licence end

.fo
.nf
.sp
Module  : basic_constants_and_types
=========
.sp
Purpose : This are the constants and types of the database project
          which are the basis for all PASCAL modules.
.CM *-END-* purpose -------------------------------------
.sp
.cp 3
Define  :
 
.CM *-END-* define --------------------------------------
.sp;.cp 3
Use     :
 
.CM *-END-* use -----------------------------------------
.sp;.cp 3
Synonym :
 
.CM *-END-* synonym -------------------------------------
.sp;.cp 3
Author  :
.sp
.cp 3
Created : 1988-03-25
.sp
.cp 3
Version : 1997-10-15
.sp
.cp 3
Release :  7.0 	 Date : 1997-07-17
.sp
***********************************************************
.sp
.cp 10
.fo
.oc _/1
Specification:
 
.CM *-END-* specification -------------------------------
.sp 2
***********************************************************
.sp
.cp 10
.fo
.oc _/1
Description:
 
.CM *-END-* description ---------------------------------
.sp 2
***********************************************************
.sp
.cp 10
.nf
.oc _/1
Structure:
 
.CM *-END-* structure -----------------------------------
.sp 2
**********************************************************
.sp
.cp 10
.nf
.oc _/1
.CM -lll-
Code    :
 
 
CONST
      csp_cop1 = ' *** copyright by Software AG, 1994 - all rights';
      csp_cop2 = ' reserved - program property of Software AG *** ';
      csp_comlint           =
            '\CA\21\47\48\36\48\00\00\00\00\00\00\00\00\00\00\00\00\00\00';
      csp_maxlint           =
            '\CA\21\47\48\36\47\00\00\00\00\00\00\00\00\00\00\00\00\00\00';
      csp_minlint           =
            '\36\78\52\51\63\52\00\00\00\00\00\00\00\00\00\00\00\00\00\00';
      csp_comsint           =
            '\C5\32\76\80\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00';
      csp_maxsint           =
            '\C5\32\76\70\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00';
      csp_minsint           =
            '\3B\67\23\20\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00';
      csp_comluns           =
            '\CA\42\94\96\72\96\00\00\00\00\00\00\00\00\00\00\00\00\00\00';
      csp_maxluns           =
            '\CA\42\94\96\72\95\00\00\00\00\00\00\00\00\00\00\00\00\00\00';
      csp_minluns           =
            '\80\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00';
      csp_comsuns           =
            '\C5\65\53\60\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00';
      csp_maxsuns           =
            '\C5\65\53\50\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00';
      csp_minsuns           =
            '\80\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00';
      csp_maxsrel           =
            '\E7\34\02\82\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00';
      csp_minsrel           =
            '\9B\11\75\49\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00';
      csp_null_number       =
            '\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00';
      csp_min_number        =
            '\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00';
      csp_max_number        =
            '\FF\99\99\99\99\99\99\99\99\99\99\99\99\99\99\99\99\99\99\99';
      csp_rescnt_unknown    = '\00\3F\90\00\00\00\00';
      csp_rescnt_one        = '\00\C1\10\00\00\00\00';
      csp_rescnt_zero       = '\00\80\00\00\00\00\00';
      csp_zero_exponent     = '\80';
      csp_zero_exp_value    =   128;
&     if $COMP in [ PTOC, CLE ]
      csp_value_pi         =
            '\C1\31\41\59\26\53\58\97\93\23\84\62\64\33\83\27\95\02\88\41';
&     else
      csp_value_pi       = 'C131415926535897932384626433832795028841'xc;
&     endif
      csp_pw_undef          = $00000000;
      (* constants for VSP51 *)
      csp_one_number        =
            '\C1\10\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00';
      csp_epsilon_number    =
            '\B1\10\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00';
      csp_a_half_number     =
            '\C0\50\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00';
      csp_two_number        =
            '\C1\20\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00';
      (* end VSP51 *)
      (* constants for VKB78 *)
      csp_number256         =
            '\C3\25\60\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00';
      (* end VKB78 *)
      (* About Box ID's *)
      csp_dlg_aboutbox         = 100;
      csp_dlgabout_sysname     = 100;
      csp_dlgabout_cname       = 101;
      csp_dlgabout_relno       = 102;
      csp_dlgabout_dbasename   = 103;
      csp_dlgabout_username    = 104;
      csp_switch_lang_changed  = 200;
      (* Common Dialog Boxes *)
      csp_dlg_fileopenbox      = 200;
      csp_dlg_filesavebox      = 210;
      csp_dlg_printbox         = 220;
      csp_dlg_printersetupbox  = 230;
      csp_dlg_editfindbox      = 240;
      csp_dlg_editreplacebox   = 250;
      (* Error Boxes *)
      csp_dlg_fatal            = 999;
      csp_dlg_error            = 998;
      csp_dlg_warning          = 997;
      csp_dlg_info             = 996;
      csp_star1                = '\1F';  (*  in like '*', '%'  *)
      csp_any1                 = '\1E';  (*  in like '?', '_'  *)
      csp_cclass               = '\1D';  (*  in like '(,)'     *)
      csp_crange               = '\1C';  (*  in like '-'       *)
      csp_cnot                 = '\19';  (*  in like 'not'     *)
      csp_ascii_zero           = '\30';
      csp_ascii_blank          = '\20';
      csp_ascii_star           = '\2A';
      csp_ascii_question_mark  = '\3F';
      csp_ascii_underline      = '\5F';
      csp_ascii_percent        = '\25';
      csp_ascii_open_bracket   = '\28';
      csp_ascii_close_bracket  = '\29';
      csp_ascii_quote          = '\27';
      csp_ascii_double_quote   = '\22';
      csp_ascii_not            = '\AC';
      csp_ascii_tilde          = '\7E';
      csp_ascii_hyphen         = '\2D';
      csp_ebcdic_zero          = '\F0';
      csp_ebcdic_blank         = '\40';
      csp_ebcdic_star          = '\5C';
      csp_ebcdic_question_mark = '\6F';
      csp_ebcdic_underline     = '\6D';
      csp_ebcdic_percent       = '\6C';
      csp_ebcdic_open_bracket  = '\4D';
      csp_ebcdic_close_bracket = '\5D';
      csp_ebcdic_quote         = '\7D';
      csp_ebcdic_double_quote  = '\7F';
      csp_ebcdic_not           = '\5F';
      csp_ebcdic_tilde         = '\B0';
      csp_ebcdic_hyphen        = '\60';
      csp_defined_byte         = '\00';
      csp_unicode_blank        =  '\00\20';
      csp_unicode_def_byte     = '\01';
      csp_unicode_mark         = '\00';
      csp_undef_byte           = '\FF';
      csp_oflw_byte            = '\FE';
      csp_default_byte         = '\FD';
      csp_long_desc_def_byte   = '\FC';
      csp_info_fixed           = '\00';
      csp_info_float           = '\01';
      csp_info_char            = '\02';
      csp_info_byte            = '\03';
      csp_info_date            = '\04';
      csp_info_time            = '\05';
      csp_info_string          = '\06';
      csp_info_expression      = '\07';
      csp_info_timestamp       = '\08';
      csp_info_dbyte_ascii     = '\09';
      csp_info_dbyte_ebcdic    = '\0A';
      csp_info_c_oldlong_char       = '\0B';
      csp_info_b_oldlong_byte       = '\0C';
      csp_info_a_oldlong_ascii_dbyte       = '\0D';
      csp_info_e_oldlong_ebcdic_dbyte      = '\0E';
      csp_info_c_long_char         = '\13';
      csp_info_b_long_byte         = '\14';
      csp_info_a_long_ascii_dbyte  = '\15';
      csp_info_e_long_ebcdic_dbyte = '\16';
      csp_info_smallint     = '\0F';
      csp_info_integer      = '\10';
      csp_info_varchar      = '\11';
      csp_info_escape_char  = '\12';
      csp_info_boolean      = '\17';
      csp_info_otherwise    = '\18';
      csp_info_mandatory    = '\00';
      csp_info_optional     = '\01';
      csp_info_default      = '\02';
      csp_info_input        = '\00';
      csp_info_output       = '\01';
      csp_info_inout        = '\02';
      csp_kanji_out1        = '\0E';
      csp_kanji_out2        = '\28';
      csp_kanji_out3        = '\38';
      csp_kanji_in1         = '\0F';
      csp_kanji_in2         = '\29';
      csp_ascii             = 0;
      csp_ebcdic            = 1;
      csp_codeneutral       = 2;
      csp_unicode_swap      = 19;
      csp_unicode           = 20;
      bsp_c1                = ' ';
      bsp_c5                = '     ';
      bsp_c6                = '      ';
      bsp_c8                = '        ';
      bsp_c10               = '          ';
      bsp_c11               = '           ';
      bsp_c12               = '            ';
      bsp_c16               = '                ';
      bsp_c18               = '                  ';
      bsp_c20               = '                    ';
      bsp_c24               = '                        ';
      bsp_c30               = '                              ';
      bsp_c32               = '                                ';
      bsp_c34               = '                                  ';
      bsp_c40               = '                                        ';
      bsp_c42               =
            '                                          ';
      bsp_c48               =
            '                                                ';
      bsp_c64               =
            '                                                                ';
      bsp_identifier        = bsp_c18;
      bsp_knl_identifier    = bsp_c64;
      bsp_date              = bsp_c8;
      bsp_dbname            = bsp_c18;
      bsp_devname           = bsp_c40;
      bsp_errtext           = bsp_c40;
      bsp_lname             = bsp_c32;
      bsp_name              = bsp_c18;
      bsp_nodeid            = bsp_c64;
      bsp_opmsg             = bsp_c64;
      bsp_sname             = bsp_c12;
      bsp_termid            = bsp_c18;
      bsp_time              = bsp_c8;
      bsp_username          = bsp_c18;
      bsp_vfilename         = bsp_c64;
&     IF $COMP = HCR
      csp_minint2           =      -32767;
      csp_maxint2           =       32767;
      csp_minint4           = -0x7fffffff;
      csp_maxint4           =  0x7fffffff;
&     ENDIF
      (*--------------------------------------------------------------*)
      (* BEGIN COMPUTE CONSTANTS *)
      (* INCLUDE CONSTANTS FROM XSIZEK *)
      csp_minint1              =          0;
      csp_maxint1              =        255;
&     IF $COMP        =  HCR
&     ELSE
      csp_minint2              =     -32768;
      csp_maxint2              =      32767;
      csp_maxint4              = 2147483647;
&     ENDIF
      csp_max_fields           =        255; (* ak - constant *)
      csp_max_indices          =         16; (* ak - constant *)
      csp_maxvariables         =       2000; (* shall be 3000, but *)
      (* because cache can not handle buffer with more than 32KB   *)
      (* (and maxvariables+25) * 16 + something has to fit...      *)
      csp_maxgetparams         =        382; (* max. no of outputcols+*)
      (*                                        max. no of keycolumns *)
      csp_cntcachebuf          =         11;
      csp_pool_buffers         =         16;
      csp_cryptname            =          6; (* tsp_cryptname *)
&     IF $MACH = NMP
      csp_processes            =       1024;
&     ELSE
      csp_processes            =        256;
&     ENDIF
      csp_fixed                =         38;
      csp_float_frac           =         -1;
      csp_numstack             =         16;
      csp_old_fileversion      =         -8;
      csp_use_new_pars_info    =         -9;
      csp_splitted_commands    =        -10;
      mxsp_c1                  =          1;
      mxsp_c2                  =          2;
      mxsp_c3                  =          3;
      mxsp_c4                  =          4;
      mxsp_c5                  =          5;
      mxsp_c6                  =          6;
      mxsp_c8                  =          8;
      mxsp_c9                  =          9;
      mxsp_c10                 =         10;
      mxsp_c11                 =         11;
      mxsp_c12                 =         12;
      mxsp_c14                 =         14;
      mxsp_c15                 =         15;
      mxsp_c16                 =         16;
      mxsp_c18                 =         18;
      mxsp_c19                 =         19;
      mxsp_c20                 =         20;
      mxsp_c24                 =         24;
      mxsp_c28                 =         28;
      mxsp_c30                 =         30;
      mxsp_c32                 =         32;
      mxsp_c34                 =         34;
      mxsp_c35                 =         35;
      mxsp_c36                 =         36;
      mxsp_c40                 =         40;
      mxsp_c42                 =         42;
      mxsp_c48                 =         48;
      mxsp_c50                 =         50;
      mxsp_c60                 =         60;
      mxsp_c64                 =         64;
      mxsp_c66                 =         66;
      mxsp_c70                 =         70;
      mxsp_c80                 =         80;
      mxsp_c120                =        120;
      mxsp_c132                =        132;
      mxsp_c256                =        256;
      mxsp_c264                =        264;
      mxsp_c512                =        512;
      mxsp_buf                 =       4096; (* tsp_buf              *)
      mxsp_page                =       8192; (* tsp_page             *)
      mxsp_extdate             =         10;
      mxsp_exttime             =          8;
      mxsp_exttimestamp        =         26;
      mxsp_int2                =          2;
      mxsp_int4                =          4;
      mxsp_long_desc           =         40  (* &tsp_long_descriptor *);
      mxsp_long_desc_block     =         56  (* &tsp_long_desc_block *);
      mxsp_messbufstr          =       8464; (* tsp_messbufstr     *)
      mxsp_microsec            =          6;
      mxsp_8kbuf               =       8192;
&     if $OS = MSDOS
      mxsp_moveobj             =       8488;    (* tsp_moveobj        *)
      mxsp_moveint2            =       4244;    (* tsp_moveobj % 2    *)
&     else
      mxsp_moveobj             =       8192000; (* tsp_moveobj        *)
      mxsp_moveint2            =       4096000; (* tsp_moveobj % 2    *)
&     endif
      mxsp_packet              =       8488  (* &tsp_packet        *);
      csp_sfield_info          =       1028;
      csp_stringlength         =       8084;
      mxsp_sfield_info         =          8;
      mxsp_sqlstate            =          5  (* mxsp_c5   *);
      mxsp_varpart             =       8448; (* tsp_varpart       *)
      mxsp_compname            =         64  (* mxsp_c64  *);
      mxsp_cryptpw             =         24  (* mxsp_c24  *);
      mxsp_ctable              =        256  (* mxsp_c256 *);
      mxsp_date                =          8  (* mxsp_c8   *);
      mxsp_dbname              =         18  (* mxsp_c18  *);
      mxsp_decimal             =         20  (* mxsp_c20  *);
      mxsp_devname             =         40  (* mxsp_c40  *);
      mxsp_errtext             =         40  (* mxsp_c40  *);
      mxsp_execargline         =        512  (* mxsp_c512 *);
      mxsp_execline            =        512  (* mxsp_c512 *);
      mxsp_execprog            =         64  (* mxsp_c64  *);
      mxsp_key                 =        256  (* mxsp_c256 *);
      mxsp_line                =        132  (* mxsp_c132 *);
      mxsp_lname               =         32  (* mxsp_c32  *);
      mxsp_name                =         18  (* mxsp_c18  *);
      mxsp_nodeid              =         64  (* mxsp_c64  *);
      mxsp_number              =         20  (* mxsp_c20  *);
      mxsp_numstr              =         64  (* mxsp_c64  *);
      mxsp_opmsg               =         64  (* mxsp_c64  *);
      mxsp_packethead          =         40  (* mxsp_packet
            -  mxsp_varpart *);
      mxsp_prtline             =        256  (* mxsp_c256 *);
      mxsp_prtname             =         64  (* mxsp_c64  *);
      mxsp_region              =          8  (* mxsp_c8   *);
      csp_resnum_deflen        =         10;
      mxsp_resnum              =          7  (* (csp_resnum_deflen+1)div2+2*);
      mxsp_rte_comm            =         12  (* mxsp_c12  *);
      mxsp_sname               =         12  (* mxsp_c12  *);
      mxsp_pw                  =         18  (* mxsp_c18  *);
      mxsp_termid              =         18  (* mxsp_c18  *);
      mxsp_time                =          8  (* mxsp_c8   *);
      mxsp_timestamp           =         20  (* mxsp_c20  *);
      mxsp_trace               =         16  (* mxsp_c16  *);
      mxsp_uint2               =          2;
      mxsp_unload              =        264  (* mxsp_c264 *);
      mxsp_username            =         18  (* mxsp_c18  *);
      mxsp_version             =         40  (* mxsp_c40  *);
      mxsp_vfilename           =         64  (* mxsp_c64  *);
      mxsp_vtlabel             =          8  (* mxsp_c8   *);
      mxsp_vtmsg               =         80  (* mxsp_c80  *);
      mxsp_xuserkey            =         18  (* mxsp_c18  *);
      mxsp_zoned               =         20  (* mxsp_c20  *);
      mxsp_get_desc_header     =         48; (* &tak_get_desc -
      cak_sysbufferoffset - (csp_maxgetparams * &tsp_get_col_desc) *)
      mxsp_get_col_desc        =          4  (* &tsp_get_col_desc *);
&     IF $MACH = BIT64
      mxsp_addr                =          8;
&     ELSE
      mxsp_addr                =          4  (* &tsp_addr *);
&     ENDIF
      (* END COMPUTE CONSTANTS *)
      (*--------------------------------------------------------------*)
      mxsp_screenbuf            =      8488; (* tsp_screenbuf *)
      mxsp_any_packed_char      =      65535;
      csp_m_adbs                =      $0000;
      csp_m_adbsparse           =      $0001;
      csp_m_adbsexecute         =      $0002;
      csp_m_adbsinfo            =      $0003;
      csp_m_autility            =      $0004;
      csp_m_aincopy             =      $0005;
      csp_m_aendincopy          =      $0006;
      csp_m_aoutcopy            =      $0007;
      csp_m_aendoutcopy         =      $0008;
      csp_m_ahello              =      $0009;
      csp_m_afile               =      $000A;
      csp_m_adbssyntax          =      $000B;
      csp_m_adbscommit          =      $000C;
      csp_m_adbsinfocommit      =      $000D;
      csp_m_adbsload            =      $000E;
      csp_m_adbscatalog         =      $000F;
      csp_m_adbsunload          =      $0010;
      csp_m_adbsgetparse        =      $0012;
      csp_m_adbsgetexecute      =      $0013;
      csp_m_adbsansi            =      $0014;
      csp_m_adbsdb2             =      $0015;
      csp_m_adbsoracle          =      $0016;
      csp_m_adbsadabas          =      $0017;
      csp_m_aparseansi          =      $0018;
      csp_m_aparsedb2           =      $0019;
      csp_m_aparseoracle        =      $001A;
      csp_m_aparseadabas        =      $001B;
      csp_m_aputval             =      $001C;
      csp_m_agetval             =      $001D;
      csp_m_adbsex_commit_execute  =   $001E;
      csp_m_vreply              =      $5000;
      (* ******* message type : swap kind ************** *)
      csp_swap_normal        =       '\01';
      csp_swap_full          =       '\02';
      csp_swap_part          =       '\03';
      (* ******* next to the last byte of parsid ******* *)
      csp_p_none                     =   0;
      csp_p_command_executed         =   1;
      csp_p_use_adbs                 =   2;
      csp_p_release_found            =  10;
      csp_p_fast_select_dir_possible =  20;
      csp_p_not_allowed_for_program  =  30;
      csp_p_close_found              =  40;
      csp_p_describe_found           =  41;
      csp_p_fetch_found              =  42;
      csp_p_mfetch_found             =  43;
      csp_p_mass_select_found        =  44;
      csp_p_select_for_update_found  =  45;
      csp_p_reuse_mass_select_found  =  46;
      csp_p_reuse_update_sel_found   =  47;
      csp_p_fetch_without_result     =  52;
      csp_p_dialog_call              =  60;
      csp_p_mass_command             =  70;
      csp_p_mselect_found            = 114;
      csp_p_for_upd_mselect_found    = 115;
      csp_p_reuse_mselect_found      = 116;
      csp_p_reuse_upd_mselect_found  = 117;
      (* ******* last byte of parsid ******* *)
      (* see tgg_datetimeformat              *)
      (* ******* virtual terminal ******* *)
      csp_attr_byte         =          1; (* attr.-byte in front of each col*)
      csp_vt_eof            =          0; (* end_of_field            *)
      csp_vt_soncf          =          1; (* start non-continuation field *)
      csp_vt_socf           =          2; (* start of continuation field  *)
      csp_clear_before      = true;   (* clear screen     *)
      csp_without_clear     = false;  (* overwrite screen *)
      csp_lslabel           =          8;
      csp_ls_number         =          9;
      csp_sk_number         =          9;
      csp_sk_lines          =          2;
      csp_pc_screen_cols    =         80;
      mxsp_screen_chars     =      32767;
      mxsp_screen_lines     =      32767;
      mxsp_linelength       =      32767;
      (* graphic mode constants *)
      csp_vertical_bar      =     '\08';
      csp_l_right_corner    =     '\0B';
      csp_u_right_corner    =     '\0C';
      csp_l_left_corner     =     '\10';
      csp_u_left_corner     =     '\11';
      csp_left_t            =     '\12';
      csp_right_t           =     '\13';
      csp_horizontal_bar    =     '\14';
      csp_bottom_t          =     '\1C';
      csp_top_t             =     '\1D';
      csp_crossing_lines    =     '\1E';
      (*** buffer sizes between precompiler and DIALOG ***)
      mxsp_dp_code_cache    =      32760; (* >= tdg_code_cache *)
      mxsp_dp_value_cache   =      32760; (* >= tdg_value_cache *)
      mxsp_dp_dialog_global =       5500; (* >= tdg_dialog_global *)
      mxsp_dp_i_global      =      24000; (* >= tdg_i_global *)
      mxsp_dp_diapre_vars   =       5000;(*>=tdg_diapre_variable_infos*)
      mxsp_dp_precomp_dca   =        600; (* >= tdg_dca *)
      (*** buffer sizes between precompiler and QUERY / REPORT ***)
      mxsp_rp_reportpre_vars  =     5708;
      mxsp_cp_commandpre_vars =     1740;
      (* Senderid-constants of the separate Components *)
      csp_comp_adabas   = 'ADA';
      csp_comp_adabasic = 'BAS';
      csp_comp_call     = 'CAL';
      csp_comp_cpc      = 'CPC';
      csp_comp_cobpc    = 'COB';
      csp_comp_control  = 'CON';
      csp_comp_domain   = 'DOM';
      csp_comp_easy     = 'EAS';
      csp_comp_load     = 'LOA';
      csp_comp_odbc     = 'ODB';
      csp_comp_oci      = 'OCI';
      csp_comp_plrun    = 'PLR';
      csp_comp_query    = 'QUE';
      csp_comp_sqlpl    = 'SQL';
      csp_comp_tplrun   = 'TPL';
      csp_comp_util     = 'UTI';
      csp_comp_wb       = 'PLW';
      csp_comp_xci      = 'XCI';
 
TYPE
&     IF $COMP = HCR
      tsp_int1            = csp_minint1..csp_maxint1;
      tsp_int2            = csp_minint2..csp_maxint2;
      tsp_int4            = csp_minint4..csp_maxint4;
      tsp_shortreal       =         real;
      shortreal           = tsp_shortreal;
      tsp_longreal        =         real; (* double; 8 Byte *)
&     ELSE
&     IF $COMP in [ CLE, PTOC ]
      tsp_int1            = csp_minint1..csp_maxint1;
      tsp_int2            =     shortint;
      tsp_int4            =      longint;
      tsp_shortreal       =         real; (* 4 Byte *)
      shortreal           = tsp_shortreal;
      tsp_longreal        =       double;
&     ELSE
&     IF $OS = VMS
      tsp_int1            = csp_minint1..csp_maxint1;
      tsp_int2            = csp_minint2..csp_maxint2;
      tsp_int4            = integer; (* PACKED cs_minint4..cs_maxint4 *)
      tsp_shortreal       =          real; (* 4 Byte *)
      shortreal           = tsp_shortreal;
      tsp_longreal        =        double;
&     ELSE
&     IF $OS = VMSP
      tsp_int1            = PACKED csp_minint1..csp_maxint1;
      tsp_int2            = PACKED csp_minint2..csp_maxint2;
      tsp_int4            = integer; (* PACKED cs_minint4..cs_maxint4 *)
      tsp_shortreal       =          real; (* 4 Byte *)
      tsp_longreal        =          real;
&     ELSE
      tsp_int1            = csp_minint1..csp_maxint1;
      tsp_int2            = csp_minint2..csp_maxint2;
      tsp_int4            = integer; (* PACKED cs_minint4..cs_maxint4 *)
      tsp_shortreal       = real; (* 8 Byte *)
      (* shortreal <> tsp_shortreal !!! compilation with option nostd *)
      tsp_longreal        = real; (* 8 Byte *)
&     ENDIF
&     ENDIF
&     ENDIF
&     ENDIF
&     ifdef BIT64
      tsp_longint         =     long; (* 8 Byte OSF1/ALPHA *)
&     else
      tsp_longint         =     tsp_int4;
&     endif
      tsp_uint2           =     tsp_int2;  (* unsigned 2 Byte integer *)
      tsp_addr            =     ^char;     (* pointer to anything !  *)
      tsp35proc_ptr       =     ^char;     (* pointer to a function, *)
      (* will be substituted by *)
      (* ptoc to                *)
      (* tsp35proc_ptr) ()      *)
      tsp_fieldrange      =        1..20;
      tsp_isolation_level =     tsp_int2;
      tsp_linepositions   =     tsp_int2;
      tsp_process_id      =     tsp_int4;
      tsp_region_id       =     tsp_int4;
      tsp_code_type       =     tsp_int1;
      tsp_col_mode        = (
            mod_syskey,
            mod_key,
            mod_mandatory,
            mod_optional,
            mod_dropped);
      tsp_database_state  = (
            db_cold,
            db_warm);
      tsp_default         = (
            no_default,
            default_user,
            default_usergroup,
            default_date,
            default_time,
            default_stamp,
            default_timestamp,
            default_uid,
            default_true,
            default_false,
            other_default);
      tsp_data_type = (
            dfixed,
            dfloat,
            dcha,
            dche,
            dchb,
            drowid,
            dstra,
            dstre,
            dstrb,
            dstrdb,
            ddate,
            dtime,
            dvfloat,
            dtimestamp,
            dunknown,  (* used for typecheck in dml *)
            dnumber,   (*        "      " *)
            dnonumber, (*        "      " *)
            dduration, (*        "      " *)
            ddbyteebcdic,
            dlonga,
            dlonge,
            dlongb,
            dlongdb,
            dboolean,
            dunicode,
            ddtfiller1,
            ddtfiller2,
            ddtfiller3,
            ddtfiller4,
            dsmallint,
            dinteger,
            dvarchara,
            dvarchare,
            dvarcharb,
            dstruni,
            dlonguni,
            dvarcharuni,
            dudt);
      tsp_dgcallback_result = (
            dg_ok,
            dg_cancel,
            dg_again);
      tsp_dlgbox_style    = (
            dg_modal,
            dg_modeless);
      tsp_layer           = (
            cp,
            dg,
            d0,
            d1,
            d2,
            d3,
            d4,
            d5,
            d6,
            d7,
            d8,
            d9,
            fc,
            mt,
            pc,
            qu,
            sp,
            vdg,
            vin,
            vlo,
            vqu,
            wb,
            xx,
            ye,
            na);
      tsp_lcomp_result    = (
            l_less,
            l_equal,
            l_greater,
            l_undef);
      tsp_net_error       = (
            net_ok,
            net_notok,
            net_timeout,
            net_send_line_down,
            net_receive_line_down);
      tsp_num_error       = (
            num_ok,
            num_trunc,
            num_overflow,
            num_invalid,
            num_incompatible,
            num_missing_addr);
      tsp_process_state   = (
            ps_session_wait,
            ps_command_wait,
            ps_io_wait,
            ps_system_lock_wait,
            ps_user_lock_wait,
            ps_region_wait,
            ps_running,
            ps_sleeping);
      tsp_shutdown_mode   = (
            shutdown_kill,
            shutdown_normal);
      tsp_swap_kind       = (
            sw_dummy,
            sw_normal,
            sw_full_swapped,
            sw_part_swapped);
      tsp_warnings        = (
            warn0_exist,
            warn1,
            warn2_null_in_builtin_func,
            warn3_output_not_into_columns,
            warn4_nullwhere,
            warn5,
            warn6_end_of_month_adjustment,
            warn7,
            warn8_scan_or_sort,
            warn9,
            warn10_some_serverdbs_down,
            warn11_time_value_too_long,
            warn12_rowno_used,
            warn13_optional_column_indexed,
            warn14_next_invlist,
            warn15_serverdb_not_in_majority);
      tsp_warningset      = PACKED SET OF tsp_warnings;
      tsp_c1              = PACKED ARRAY [  1..mxsp_c1    ] OF char;
      tsp_c2              = PACKED ARRAY [  1..mxsp_c2    ] OF char;
      tsp_c3              = PACKED ARRAY [  1..mxsp_c3    ] OF char;
      tsp_c4              = PACKED ARRAY [  1..mxsp_c4    ] OF char;
      tsp_c5              = PACKED ARRAY [  1..mxsp_c5    ] OF char;
      tsp_c6              = PACKED ARRAY [  1..mxsp_c6    ] OF char;
      tsp_c8              = PACKED ARRAY [  1..mxsp_c8    ] OF char;
      tsp_c9              = PACKED ARRAY [  1..mxsp_c9    ] OF char;
      tsp_c10             = PACKED ARRAY [  1..mxsp_c10   ] OF char;
      tsp_c11             = PACKED ARRAY [  1..mxsp_c11   ] OF char;
      tsp_c12             = PACKED ARRAY [  1..mxsp_c12   ] OF char;
      tsp_c14             = PACKED ARRAY [  1..mxsp_c14   ] OF char;
      tsp_c15             = PACKED ARRAY [  1..mxsp_c15   ] OF char;
      tsp_c16             = PACKED ARRAY [  1..mxsp_c16   ] OF char;
      tsp_c18             = PACKED ARRAY [  1..mxsp_c18   ] OF char;
      tsp_c20             = PACKED ARRAY [  1..mxsp_c20   ] OF char;
      tsp_c24             = PACKED ARRAY [  1..mxsp_c24   ] OF char;
      tsp_c28             = PACKED ARRAY [  1..mxsp_c28   ] OF char;
      tsp_c30             = PACKED ARRAY [  1..mxsp_c30   ] OF char;
      tsp_c32             = PACKED ARRAY [  1..mxsp_c32   ] OF char;
      tsp_c34             = PACKED ARRAY [  1..mxsp_c34   ] OF char;
      tsp_c35             = PACKED ARRAY [  1..mxsp_c35   ] OF char;
      tsp_c36             = PACKED ARRAY [  1..mxsp_c36   ] OF char;
      tsp_c40             = PACKED ARRAY [  1..mxsp_c40   ] OF char;
      tsp_c42             = PACKED ARRAY [  1..mxsp_c42   ] OF char;
      tsp_c48             = PACKED ARRAY [  1..mxsp_c48   ] OF char;
      tsp_c50             = PACKED ARRAY [  1..mxsp_c50   ] OF char;
      tsp_c60             = PACKED ARRAY [  1..mxsp_c60   ] OF char;
      tsp_c64             = PACKED ARRAY [  1..mxsp_c64   ] OF char;
      tsp_c66             = PACKED ARRAY [  1..mxsp_c66   ] OF char;
      tsp_c70             = PACKED ARRAY [  1..mxsp_c70   ] OF char;
      tsp_c80             = PACKED ARRAY [  1..mxsp_c80   ] OF char;
      tsp_c120            = PACKED ARRAY [  1..mxsp_c120  ] OF char;
      tsp_c132            = PACKED ARRAY [  1..mxsp_c132  ] OF char;
      tsp_c256            = PACKED ARRAY [  1..mxsp_c256  ] OF char;
      tsp_c264            = PACKED ARRAY [  1..mxsp_c264  ] OF char;
      tsp_c512            = PACKED ARRAY [  1..mxsp_c512  ] OF char;
      tsp_any_packed_char = PACKED ARRAY [  1..mxsp_any_packed_char ] OF char;
      tsp_buf             = PACKED ARRAY [  1..mxsp_buf        ] OF char;
      tsp_page            = PACKED ARRAY [  1..mxsp_page       ] OF char;
      tsp_int2buf         = PACKED ARRAY [  1..mxsp_buf ] OF tsp_int2;
      tsp_cryptpw         = tsp_c24;
      tsp_messbufstr      = PACKED ARRAY [  1..mxsp_messbufstr ] OF char;
      tsp_8kbuf           = PACKED ARRAY [  1..mxsp_8kbuf      ] OF char;
      tsp_moveobj         = PACKED ARRAY [  1..mxsp_moveobj    ] OF char;
      tsp_resnum          = PACKED ARRAY [  1..mxsp_resnum     ] OF char;
      tsp_moveint2        = PACKED ARRAY [  1..mxsp_moveint2   ] OF tsp_int2;
      tsp_varpart         = PACKED ARRAY [  1..mxsp_varpart    ] OF char;
      tsp_copyright       = tsp_c48;
      tsp_ctable          = tsp_c256;
      tsp_cryptname       = PACKED ARRAY [ 1..csp_cryptname ] OF tsp_int4;
      tsp_decimal         = tsp_c20;
      tsp_devname         = tsp_c40;
      tsp_errtext         = tsp_c40;
      tsp_identifier      = tsp_c18;
      tsp_knl_identifier  = tsp_c64;
      tsp_key             = tsp_c256;
      tsp_line            = tsp_c132;
      tsp_lname           = tsp_c32;
      tsp_name            = tsp_c18;
      tsp_number          = tsp_c20;
      tsp_numstr          = tsp_c64;
      tsp_sname           = tsp_c12;
      tsp_compname        = tsp_c64;
      tsp_date            = tsp_c8;
      tsp_dbname          = tsp_c18;
      tsp_nodeid          = tsp_c64;
      tsp_opmsg           = tsp_c64;
      tsp_pw              = tsp_c18;
      tsp_region          = tsp_c8;
      tsp_termid          = tsp_c18;
      tsp_time            = tsp_c8;
      tsp_timestamp       = tsp_c20;
      tsp_username        = tsp_c18;
      tsp_version         = tsp_c40;
      tsp_trace           = tsp_c16;
      tsp_unload_memory   = tsp_c264;
      tsp_zoned           = tsp_c20;
      tsp_bufaddr         = ^tsp_buf;
      tsp_pageaddr        = ^tsp_page;
      tsp_objaddr         = ^tsp_any_packed_char;
      tsp_booladdr        = ^boolean;
      tsp_moveobj_ptr     = ^tsp_moveobj;
      tsp_knl_identifier_ptr = ^tsp_knl_identifier;
 
      tsp_takcachebuf     = RECORD (* used by movcc declared in VSP10 *)
            CASE boolean OF
                true :
                    (word_allignment : tsp_int4);
                false :
                    (buf : ARRAY [  1..csp_cntcachebuf  ] OF tsp_buf);
                END;
            (*ENDCASE*) 
 
 
      tsp_int_map_c2      = RECORD
            CASE boolean OF
                TRUE  :
                    (map_int : tsp_int2);
                FALSE :
                    (map_c2  : tsp_c2)
                END;
            (*ENDCASE*) 
 
 
      tsp_dataline        = RECORD
            text   : tsp_line;
            pos    : tsp_linepositions;
            length : tsp_linepositions
      END;
 
 
      tsp_string          = RECORD
            text   : tsp_line;
            length : tsp_linepositions
      END;
 
 
      tsp_ccc             = RECORD
            count : tsp_int4
      END;
 
 
      tsp_numberstack     = RECORD (* vsp50 *)
            stackpointer : integer;
            elem         : ARRAY [ 1..csp_numstack ] OF tsp_number;
            elem_err     : ARRAY [ 1..csp_numstack ] OF tsp_num_error
      END;
 
 
      tsp_sfield_info     = PACKED RECORD
            mode     : char;
            io_type  : char;
            d_type   : char;
            length   : char;
            CASE boolean OF
                true :
                    (frac        : char;
                    in_out_l     : char;
                    bufpos       : tsp_int2);
                false :
                    (longiolen   : tsp_int2;
                    bufpos_1     : tsp_int2);
                END;
            (*ENDCASE*) 
            (* records for communication between kernel and dialog *)
            (* in case of stored procedures                 *)
 
 
      tsp_mod_header      = RECORD
            spmh_modn          : tsp_knl_identifier;
            spmh_appln         : tsp_knl_identifier;
            spmh_user          : tsp_knl_identifier;
            spmh_mtype         : tsp_int1;
            spmh_state         : char; (* 'R', 'T', 'D', 'P' *)
            spmh_index         : tsp_int2;
      END;
 
      tsp_sproc = (sppr_db_proc,
            sppr_ddl_trigger,
            sppr_insert_trigger,
            sppr_update_trigger,
            sppr_delete_trigger,
            sppr_db_func );
 
      tsp_kernel_dca      = RECORD
      (* fields have no name prefix as some names   *)
      (* are shared with the type tdg_workbench_dca *)
            cancelb_ptr       : tsp_booladdr;
            msgno             : tsp_int2;
            first_call        : boolean;
            stop_msg_set      : boolean;
            curr_user         : tsp_knl_identifier;
            curr_group        : tsp_knl_identifier;
            owner_sysdba      : tsp_knl_identifier;
            system_user       : tsp_knl_identifier;
            user_system_user  : tsp_knl_identifier;
            stop_msg          : tsp_c256;
            proc_type         : tsp_sproc;
            kernel_dca_filler : tsp_c1;
            mess_type         : tsp_int2;
            firstcall         : boolean;
            lastcall          : boolean;
            value_p           : tsp_addr;
            value_size        : tsp_int4;
            code_p            : tsp_addr;
            code_size         : tsp_int4;
      END;
 
 
      tsp_pl_code_info = RECORD
            spplc_objtype   : tsp_name;
            spplc_owner     : tsp_knl_identifier;
            spplc_progn     : tsp_knl_identifier;
            spplc_modn      : tsp_knl_identifier;
            spplc_proglang  : tsp_name;
            spplc_subtype   : tsp_sname;
            spplc_version   : tsp_c4;
      END;
 
      (* End Dialog - Kernel *)
 
      tsp_rte_comm_rec    = RECORD
            to_cancel       : boolean;
            rte_fill1       : boolean;
            virt_reads      : tsp_int2;
            file_root       : tsp_int4;
            file_record_cnt : tsp_int4;
      END;
 
      tsp_rte_comm_addr   = ^tsp_rte_comm_rec;
 
      tsp_rte_relocation_rec = RECORD
            rte_acv_pointer     : tsp_objaddr;
            rte_tak_pointer     : tsp_objaddr;
            rte_relocationvalue : tsp_int4;
            rte_relocated       : boolean;
            rte_rel_fill        : boolean;
            rte_rel_fill1       : tsp_int2;
            rte_swap1_start     : tsp_objaddr;
            rte_swap1_length    : tsp_int4;
            rte_swap2_start     : tsp_objaddr;
      END;
 
      tsp_rte_relocate_addr = ^tsp_rte_relocation_rec;
      tsp_wlisttype       = (
            wls_stream,
            wls_line,
            wls_matrix);
      tsp_column_type     = (
            gc_fixkey,
            gc_fixkey_ascii,
            gc_fixkey_ebcdic,
            gc_varkey,
            gc_varkey_ascii,
            gc_varkey_ebcdic,
            gc_fixcol,
            gc_fixcol_ascii,
            gc_fixcol_ebcdic,
            gc_varcol,
            gc_varcol_ascii,
            gc_varcol_ebcdic,
            gc_longchar,
            gc_longchar_ascii,
            gc_longchar_ebcdic);
 
      tsp_get_col_desc    = RECORD
            CASE boolean OF
                true :
                    (get_coltype     : tsp_column_type;
                    get_collen_colno : char;
                    get_colpos       : tsp_int2);
                false :
                    (get_coltypeint  : tsp_int1;
                    get_colfill1     : char;
                    get_colfill2     : tsp_int2);
                END;
            (*ENDCASE*) 
            (* ******* virtual terminal ******* *)
 
      tsp_sk_label        = (
            no_sk_labels,
            short_sk_labels,
            long_sk_labels);
      tsp_vt_key          = (
            vt_unknown,
            vt_character_key,
            vt_enter,
            vt_pf01,
            vt_pf02,
            vt_pf03,
            vt_pf04,
            vt_pf05,
            vt_pf06,
            vt_pf07,
            vt_pf08,
            vt_pf09,
            vt_pf10,
            vt_pf11,
            vt_pf12,
            vt_clear,
            vt_do_key,
            vt_sk01,
            vt_sk02,
            vt_sk03,
            vt_sk04,
            vt_sk05,
            vt_sk06,
            vt_sk07,
            vt_sk08,
            vt_sk09,
            vt_help_key,
            vt_up_key,
            vt_down_key,
            vt_left_key,
            vt_right_key,
            vt_cmd_key,
            vt_pick_key,
            vt_put_key,
            vt_mark_key,
            vt_select_key,
            vt_move_key,
            vt_copy_key,
            vt_insert_key,
            vt_delete_key,
            vt_top_key,
            vt_bottom_key,
            vt_cancel_key,
            vt_undo_key,
            vt_end_key,
            vt_escape_key,
            vt_fill,
            vt_file_open,
            vt_file_save,
            vt_exit,
            vt_print,
            vt_find,
            vt_replace,
            vt_cursor_up,
            vt_cursor_down,
            vt_cursor_right,
            vt_cursor_left,
            vt_cursor_home,
            vt_cursor_end,
            vt_next_field,
            vt_prev_field,
            vt_insert_char,
            vt_delete_char,
            vt_rubout,
            vt_del_eof,
            vt_mouse_down,
            vt_mouse_up,
            vt_mouse_move,
            vt_mouse_dbl,
            vt_hscroll,
            vt_vscroll,
            vt_control_key,
            vt_cursor_bol,
            vt_cursor_eol,
            vt_last_key ); (* enter new values before the last one *)
      tsp_vt_mark         = (
            vt_mark_off,
            vt_mark_block,
            vt_mark_line,
            vt_mark_contiguous,
            vt_mark_matrix);
      tsp_vt_mode         = (
            vt_bright,
            vt_inverse,
            vt_underline,
            vt_blink,
            vt_invisible,
            vt_mixed,
            vt_grayed,
            vt_last_mode); (* enter new values before the last one *)
      tsp_vt_color        = (
            vt_default_color,
            vt_white,
            vt_black,
            vt_red,
            vt_green,
            vt_yellow,
            vt_blue,
            vt_pink,
            vt_light_blue,
            vt_last_color);(* enter new values before the last one *)
      tsp_vt_scroll       = (
            vt_horizontal_scroll,
            vt_vertical_scroll);
      tsp_scroll          = tsp_vt_scroll;
      tsp_vt_usage_mode   = ( vt_form, vt_edit );
      tsp_screenbuf       = PACKED ARRAY [ 1..mxsp_screenbuf  ] OF char;
      tsp_screenbufaddr   = ^tsp_screenbuf;
      tsp_vt_attrib       = PACKED SET OF tsp_vt_mode;
      tsp_vt_colors       = PACKED SET OF tsp_vt_color;
      tsp_vt_keys         = SET OF tsp_vt_key;
      tsp_vtlabel         = tsp_c8;
      tsp_vt_longlabel    = ARRAY [ 1..csp_sk_lines ] OF tsp_vtlabel;
      tsp_vt_llabels      = ARRAY [ 1..csp_sk_number ] OF tsp_vt_longlabel;
      tsp_vt_local_function = vt_cursor_up..vt_del_eof;
      tsp_vtmsg           = tsp_c80;
      tsp_vt_slabels      = ARRAY [ 1..csp_sk_number ] OF tsp_vtlabel;
      tsp_dbcs            = (
            no_dbcs,
            dbcs_with_shifts,
            dbcs_no_shifts);
 
      tsp_terminal_description = RECORD
            content_buf   : tsp_screenbufaddr;
            attribute_buf : tsp_screenbufaddr;
            num_of_lines  : tsp_int2;
            num_of_cols   : tsp_int2;
            colors        : tsp_vt_colors;
            has_sysline   : boolean;
            labels        : tsp_sk_label;
            returnkeys    : tsp_vt_keys;
            attributes    : tsp_vt_attrib;
            graphic_chars : boolean;
            mark          : boolean;
            windows       : boolean;
            dbcs          : tsp_dbcs;
            so_char       : tsp_c1;
            si_char       : tsp_c1;
            filler_1      : boolean;
            filler_2      : tsp_c2;
      END;
 
 
      tsp_vt_field        = RECORD
            text  : tsp_vtlabel;
            lno   : tsp_int2;
            colnr : tsp_int2;
            att   : tsp_c1;
            fill1 : boolean;
            fill2 : tsp_int2;
      END;
 
 
      tsp_hif_parms       = RECORD
            slabels      : tsp_vt_slabels;
            llabels      : tsp_vt_llabels;
            sys_text     : tsp_line;
            sys_attr     : tsp_line;
            insert_label : tsp_vt_field
      END;
 
 
      tsp_vt_keystroke    = RECORD
            key    : tsp_vt_key;
            fill1  : boolean;
            fill2  : tsp_int2;
            CASE tsp_vt_key OF
                vt_character_key,
                vt_control_key   :
                    (ch : char);
                vt_hscroll,
                vt_vscroll       :
                    (scroll_dir : tsp_int2);
                vt_mouse_down,
                vt_mouse_up,
                vt_mouse_move,
                vt_mouse_dbl     :
                    (mouse_x : tsp_int2;
                    mouse_y : tsp_int2)
                END;
            (*ENDCASE*) 
 
 
      tsp_vt_options      = RECORD
            wait_for_input        : boolean;
            usage_mode            : tsp_vt_usage_mode;
            return_on_last        : boolean;
            return_on_first       : boolean;
            returnkeys            : tsp_vt_keys;
            reject_keys           : tsp_vt_keys;
            bell                  : boolean;
            mark                  : tsp_vt_mark;
            first_line_changed    : tsp_int2;
            last_line_changed     : tsp_int2;
            screen2_first_changed : tsp_int2;
            screen2_last_changed  : tsp_int2;
            overtype              : boolean;
            fill1                 : boolean;
      END;
 
 
      tsp_vt_rectangle    = RECORD
            top    : tsp_int2; (* row ts_number *)
            left   : tsp_int2; (* column ts_number *)
            bottom : tsp_int2; (* row ts_number *)
            right  : tsp_int2; (* column ts_number *)
      END;
 
      tsp_rectangle       = tsp_vt_rectangle;
 
      tsp_vt_result       = RECORD
            num_of_lines   : tsp_int2;
            num_of_cols    : tsp_int2;
            mark_begin     : tsp_int2;
            mark_end       : tsp_int2;
            keystroke      : tsp_vt_keystroke;
            screen_changed : boolean;
            vt_res_fill1   : boolean;
            vt_res_fill2   : tsp_int2;
      END;
 
 
      tsp_vt_splitopt     = RECORD
            maximized      : boolean;
            icon           : boolean;
            pos            : tsp_rectangle;
      END;
 
      tsp_vt_splitoptaddr = ^tsp_vt_splitopt;
      (* ******* virtual printer ******* *)
      tsp_vp_linefeeds    = (
            vp_nolf,
            vp_onelf,
            vp_twolf,
            vp_threelf,
            vp_page);
      tsp_prtname         = tsp_c64;
      tsp_prtline         = tsp_c256;
      (* ******* virtual file ******* *)
      tsp_opcodes         = (
            vread,
            vwrite,
            vappend,
            voverwrite,
            vread_ora);
      tsp_vf_format       = (
            vf_plaintext,
            vf_record,
            vf_stream,
            vf_unknown,
            vf_4k_block);
      tsp_vf_return       = (
            vf_ok,
            vf_notok,
            vf_eof,
            vf_noseek);
      tsp_vf_resource     = (
            vf_stack,
            vf_bufferpool);
      tsp_vf_buf          = ARRAY [ 1..csp_pool_buffers ] OF tsp_page;
      tsp_vfilename       = tsp_c64;
      tsp_vf_bufaddr      = ^tsp_vf_buf;
      tsp_vf_type         = (
            vf_t_unknown,
            vf_t_file,
            vf_t_pipe,
            vf_t_raw,
            vf_t_tape_norew,
            vf_t_tape_rew,
            vf_t_extrenal_io);
      (* ******* SQLEXEC ******* *)
      tsp_exec_mode       = (
            async,
            sync_new_session,
            sync_same_session);
      tsp_exec_return     = (
            ex_ok,
            ex_notok,
            ex_no_exec,
            ex_no_async,
            ex_no_sync,
            ex_no_sync_new,
            ex_no_sync_same);
      tsp_execprog        = tsp_c64;
      tsp_execargline     = tsp_c512;
      tsp_execline        = tsp_c512;
      (* ******* communication ******* *)
      tsp_os              = (
            os_unix,
            os_vms,
            os_windows,
            os_win32,
            os_os2);
      tsp_service         = (
            sql_user,
            sql_async_user,
            sql_utility);
      (* *)
      tsp_rte_header = tsp_c20;
 
      tsp_packet = RECORD
            rte_header : tsp_rte_header;
            CASE boolean OF
                true :
                    (mess_code_type : tsp_code_type;
                    mess_swap_kind  : tsp_swap_kind;
                    mess_type       : tsp_int2;
                    senderid        : tsp_c8;
                    part1_length    : tsp_int2;
                    part2_length    : tsp_int2;
                    return_code     : tsp_int2;
                    error_code      : tsp_int2;
                    var_part        : tsp_varpart);
                false:
                    (mess_code      : tsp_c2;
                    mess_type_fill  : tsp_int2;
                    mbuf_str        : tsp_messbufstr);
                END;
            (*ENDCASE*) 
 
      tsp_packet_ptr      = ^tsp_packet;
      (* ******* disk io ******* *)
      tsp_dev             = (
            dev_perm,
            dev_temp);
      tsp_page_no         = tsp_int4;
      tsp_maxiobufaddr    = ^tsp_any_packed_char;
      (* ******* VGETSORT ******* *)
 
      tsp_decimal_presentation = PACKED RECORD
            thousand_token  : char;
            zero_point      : char;
            dec_pres_filler : tsp_int2
      END;
 
      tsp_xp_key_type     = tsp_c18;
      tsp_xp_key          = (
            xp_int2_type,
            xp_int4_type,
            xp_c8_type,
            xp_c18_type,
            xp_c24_type,
            xp_c40_type,
            xp_c64_type,
            xp_crypt_type);
      tsp_xp_return_code  = (
            xp_ok,
            xp_key_not_found,
            xp_eof,
            xp_not_ok) ;
 
      tsp_xp_value_rec    = RECORD
            xp_info        : tsp_int2;
            xp_fill1       : boolean ;
            xp_value_t     : tsp_xp_key ;
            CASE tsp_xp_key OF
                xp_int2_type :
                    (xp_int2 : tsp_int2);
                xp_int4_type :
                    (xp_int4 : tsp_int4);
                xp_c8_type   :
                    (xp_c8   : tsp_c8);
                xp_c18_type  :
                    (xp_c18  : tsp_c18);
                xp_c24_type  :
                    (xp_c24  : tsp_c24);
                xp_c40_type  :
                    (xp_c40  : tsp_c40);
                xp_c64_type  :
                    (xp_c64  : tsp_c64);
                xp_crypt_type:
                    (xp_crypt: tsp_cryptname);
                END;
            (*ENDCASE*) 
            (*------------------------------------*)
            (*      QUERY/REPORT interface        *)
            (* for Precompiler, EASY and DIALOG   *)
            (*------------------------------------*)
 
 
      tsp_online_header   = RECORD
            id_field    : tsp_c8;
            relno_field : tsp_c8;
            mode_field  : tsp_c12;
            text_field  : tsp_c40;
      END;
 
 
      tsp_report_values   = RECORD
            count      : tsp_number;
            CASE boolean OF
                true :
                    (sum       :   tsp_number;
                    minimum    :   tsp_number;
                    maximum    :   tsp_number;
                    val1       :   tsp_number;
                    val2       :   tsp_number;
                    val3       :   tsp_number;
                    val4       :   tsp_number);
                false :
                    (min_string : tsp_c40;
                    max_string : tsp_c40);
                END;
            (*ENDCASE*) 
 
 
      tsp_report_function_result = RECORD
            rf_used_count    : tsp_int4;
            rf_column_id     : ARRAY [ 1..16 ] OF tsp_int4;
            rf_column_type   : ARRAY [ 1..16 ] OF char;
            rf_column_result : ARRAY [ 1..16 ] OF tsp_report_values;
      END;
 
 
      tsp_report_interface = RECORD
            dp_frame_header  : tsp_online_header;
            dp_e_size        : tsp_int2;
            dp_e_length      : tsp_int2;
            dp_dbname        : tsp_dbname;
            dp_res_name      : tsp_knl_identifier;
            dp_resultcount   : tsp_int4;
            dp_rowno         : tsp_int4;
            dp_colno         : tsp_int4;
            dp_sql_rc        : tsp_int2;
            dp_count         : tsp_int2; (* only for Precompiler *)
            dp_funct_vals    : tsp_report_function_result;
      END;
 
 
      tsp_qr_pre_packet   =  RECORD
            qrp_buf        : tsp_buf;
            qrp_parms      : tsp_report_interface;
            qrp_retcode    : tsp_int2;
            qrp_mtype      : tsp_int2;
      END;
 
      tsp_sqlstate        = tsp_c5;
      tsp_sqlmode = (
            sqlm_ansi,
            sqlm_db2,
            sqlm_oracle,
            sqlm_adabas);
      tsp_valmode = (vm_datapart,
            vm_alldata,
            vm_lastdata,
            vm_nodata,
            vm_no_more_data,
            vm_last_putval,
            vm_data_trunc,
            vm_close);
      tsp_ld_info = SET OF (ld_ex_trigger, ld_with_lock, ld_no_close,
            ld_new_rec, ld_is_comment, ld_is_catalog,
            ld_unicode);
 
      tsp_long_descriptor = RECORD
            ld_descriptor              : tsp_c8;
            ld_tabid                   : tsp_c8;
            ld_serverdb_no             : tsp_c2;
            ld_replicated              : boolean;
            ld_change                  : SET OF (ld_use_termchar,
                  ld_use_conversion,
                  ld_use_toascii, ld_use_ucs_2_swap);
            ld_intern_pos              : tsp_int4;
            CASE boolean OF
                true : (* 6.1.1 *)
                    (ld_oldinfoset             : tsp_ld_info;
                    ld_oldshort_scol           : boolean;
                    ld_oldvalind               : tsp_c1;
                    ld_oldvalmode              : tsp_valmode;
                    ld_oldvalpos               : tsp_int2;
                    ld_oldvallen               : tsp_int2;
                    ld_filler_1                : tsp_int4;
                    ld_filler_2                : tsp_int4);
                false : (* 6.1.2 *)
                    (ld_infoset                : tsp_ld_info;
                    ld_short_scol              : boolean;
                    ld_unused_1                : tsp_c1;
                    ld_valmode                 : tsp_valmode;
                    ld_valind                  : tsp_int2;
                    ld_unused_2                : tsp_int2;
                    ld_valpos                  : tsp_int4;
                    ld_vallen                  : tsp_int4)
                END;
            (*ENDCASE*) 
 
 
      tsp_long_desc_block = RECORD
            ldb_descriptor  : tsp_c8;
            ldb_serverdb_no : tsp_c2;
            ldb_change      : SET OF (ldb_use_termchar,
                  ldb_use_conversion,
                  ldb_use_toascii, ldb_use_ucs_2_swap);
            ldb_replicated  : boolean;
            ldb_curr_pageno : tsp_int4;
            ldb_curr_pos    : tsp_int2;
            ldb_colno       : tsp_c1;
            ldb_show_kind   : tsp_c1;
            (* above: 20 bytes not seen by application *)
            ldb_intern_pos  : tsp_int4;
            (* above: 4 bytes may be seen by application *)
            ldb_infoset     : SET OF (ldb_ex_trigger,
                  ldb_with_lock, ldb_no_close,
                  ldb_new_rec, ldb_is_comment, ldb_is_catalog,
                  ldb_unicode);
            ldb_filler1     : boolean;
            ldb_filler1a    : tsp_c1;
            (* above: 3 byte only seen by the application *)
            ldb_valmode     : tsp_valmode;
            ldb_valind      : tsp_int2;
            ldb_oldvallen   : tsp_int2; (* unused in newlong *)
            ldb_valpos      : tsp_int4;
            ldb_vallen      : tsp_int4;
            ldb_full_len    : tsp_int4;
            (* above: 17 bytes seen by the application and kernel *)
            ldb_filler2     : tsp_c4;
            (* below: 8 bytes not seen by application *)
            ldb_last_i_pos  : tsp_int4;
            ldb_root_check  : tsp_int4;
      END;
 
      tsp_va_return = (va_ok, va_notok, va_eof, va_wait_first);
      tsp_exttimestamp = PACKED ARRAY [ 1..mxsp_exttimestamp ] OF char;
 
      tsp_param_spec = PACKED RECORD
            para_type   : char;
            para_length : char;
            CASE boolean OF
                true :
                    (para_frac : char;
                    filler     : char);
                false :
                    (para_long_length : tsp_int2);
                END;
            (*ENDCASE*) 
 
      tsp_param_spec_list = ARRAY [ 1..csp_maxvariables ] OF
            tsp_param_spec;
      tsp_uni_error = (
            spu_ok,
            spu_not_translatable,
            spu_dest_too_short);
 
      tsp_dcom_init_sink_parms = PACKED RECORD
            acv_addr  : tsp_addr;
            sink_addr : tsp_addr;
            sink_size : tsp_int4;
      END;
 
 
      tsp_dcom_co_create_instance_parms = PACKED RECORD
            coclsid        : tsp_c16;
            iid            : tsp_c16;
            ifactory       : tsp_addr;
            idispatch      : tsp_addr;
            ikernel_sink   : tsp_addr;
            ret            : tsp_int4;
            session        : tsp_c4;
            in_proc_server : boolean;
			debug_mode     : boolean;
            errtext        : tsp_c64;
      END;
 
 
      tsp_dcom_dispatch_parms = PACKED RECORD
            idispatch       : tsp_addr;
            ifactory        : tsp_addr;
            session_context : tsp_addr;
            dispid          : tsp_int4;
            hresult         : tsp_int4;
            param_stack     : tsp_moveobj_ptr;
            param_stack_len : tsp_int4;
			debug_mode      : boolean;
            errtext         : tsp_c64;
      END;
 
 
      tsp_dcom_release_instance_parms = PACKED RECORD
            session         : tsp_c4;
      END;
 
      tsp_db_obj_type = (dbo_method, dbo_dbproc, dbo_dbfunc);
 
      tsp_dcom_paraminfo_parms = PACKED RECORD
            prog_id        : tsp_c64;
            method         : tsp_knl_identifier;
            coclsid        : tsp_c16;
            iid            : tsp_c16;
            packet         : tsp_moveobj_ptr;
            typeinfo_ptr   : tsp_addr;
            dispid         : tsp_int4;
            const_dispid   : tsp_int4;
            const_type     : tsp_int2;
            const_typeid   : tsp_int2;
            func_idx       : integer;
            in_proc_server : boolean;
            db_obj_type    : tsp_db_obj_type;
            errtext        : tsp_c64;
      END;
 
.CM *-END-* code ----------------------------------------
.SP 2 
***********************************************************
*-PRETTY-*  statements    :          0
*-PRETTY-*  lines of code :       1463        PRETTY  3.09 
*-PRETTY-*  lines in file :       1625         1992-11-23 
.PA 
