.ll 73
.ad 8
.bm 3
.fm 2
.bt $Copyright (c) 2000-2005 SAP AG$$Page %$
.tm 5
.hm 2
.hs 3
.tt 1 $SQL$Project Distributed Database System$VSP001$
.tt 2 $$$
.tt 3 $ElkeZ$packet_constants_and_types$2000-06-27$
***********************************************************
.nf
    ========== licence begin  GPL
    Copyright (c) 2000-2005 SAP AG
 
    This program is free software; you can redistribute it and/or
    modify it under the terms of the GNU General Public License
    as published by the Free Software Foundation; either version 2
    of the License, or (at your option) any later version.
 
    This program 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 General Public License for more details.
 
    You should have received a copy of the GNU General Public License
    along with this program; 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  : packet_constants_and_types
=========
.sp
Purpose : This are the constants and types of the database project
          which are the basis for all PASCAL modules concerning
          the SQL packet.
.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 : 1995-04-04
.sp
.cp 3
.sp
.cp 3
Release :      Date : 2000-06-27
.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
      (* function codes as in ORACLE Call Interface *)
      csp1_nil_fc                     =   0;
      csp1_create_table_fc            =   1;
      csp1_set_role_fc                =   2;  (* unused *)
      csp1_insert_fc                  =   3;
      csp1_select_fc                  =   4;
      csp1_update_fc                  =   5;
      csp1_drop_role_fc               =   6;  (* unused *)
      csp1_drop_view_fc               =   7;
      csp1_drop_table_fc              =   8;
      csp1_delete_fc                  =   9;
      csp1_create_view_fc             =  10;
      csp1_drop_user_fc               =  11;
      csp1_create_role_fc             =  12;  (* unused *)
      csp1_create_sequence_fc         =  13;
      csp1_alter_sequence_fc          =  14;  (* unused *)
      csp1_unused1_fc                 =  15;  (* unused *)
      csp1_drop_sequence_fc           =  16;
      csp1_create_schema_fc           =  17;
      csp1_create_cluster_fc          =  18;  (* unused *)
      csp1_create_user_fc             =  19;
      csp1_create_index_fc            =  20;
      csp1_drop_index_fc              =  21;
      csp1_drop_cluster_fc            =  22;  (* unused *)
      csp1_validate_index_fc          =  23;  (* unused *)
      csp1_create_procedure_fc        =  24;
      csp1_alter_procedure_fc         =  25;  (* unused *)
      csp1_alter_table_fc             =  26;
      csp1_explain_fc                 =  27;
      csp1_grant_fc                   =  28;
      csp1_revoke_fc                  =  29;
      csp1_create_synonym_fc          =  30;
      csp1_drop_synonym_fc            =  31;
      csp1_alter_system_swith_log_fc  =  32;  (* unused *)
      csp1_set_transaction_fc         =  33;  (* unused *)
      csp1_pl_sql_execute_fc          =  34;
      csp1_lock_table_fc              =  35;
      csp1_drop_schema_fc             =  36;
      csp1_rename_fc                  =  37;
      csp1_comment_fc                 =  38;
      csp1_audit_fc                   =  39;  (* unused *)
      csp1_noaudit_fc                 =  40;  (* unused *)
      csp1_alter_index_fc             =  41;  (* unused *)
      csp1_create_external_database_fc=  42;  (* unused *)
      csp1_drop_external_database_fc  =  43;  (* unused *)
      csp1_create_database_fc         =  44;  (* unused *)
      csp1_alter_database_fc          =  45;  (* unused *)
      csp1_create_rollback_segment_fc =  46;  (* unused *)
      csp1_alter_rollback_segment_fc  =  47;  (* unused *)
      csp1_drop_rollback_segment_fc   =  48;  (* unused *)
      csp1_create_ts_tablespace_fc    =  49;  (* unused *)
      csp1_alter_ts_tablespace_fc     =  50;  (* unused *)
      csp1_drop_ts_tablespace_fc      =  51;  (* unused *)
      csp1_alter_session_fc           =  52;  (* unused *)
      csp1_alter_user_fc              =  53;
      csp1_commit_fc                  =  54;
      csp1_rollback_fc                =  55;
      csp1_savepoint_fc               =  56;
      csp1_create_control_file_fc     =  57;  (* unused *)
      csp1_alter_tracing_fc           =  58;  (* unused *)
      csp1_create_trigger_fc          =  59;
      csp1_alter_trigger_fc           =  60;  (* unused *)
      csp1_drop_trigger_fc            =  61;
      csp1_analyze_table_fc           =  62;
      csp1_analyze_index_fc           =  63;  (* unused *)
      csp1_analyze_cluster_fc         =  64;  (* unused *)
      csp1_create_profile_fc          =  65;  (* unused *)
      csp1_drop_profile_fc            =  66;  (* unused *)
      csp1_alter_profile_fc           =  67;  (* unused *)
      csp1_drop_procedure_fc          =  68;
      csp1_unused3_fc                 =  69;  (* unused *)
      csp1_alter_resource_cost_fc     =  70;  (* unused *)
      csp1_create_sl_snapshot_log_fc  =  71;
      csp1_alter_sl_snapshot_log_fc   =  72;  (* unused *)
      csp1_drop_sl_snapshot_log_fc    =  73;
      csp1_create_snapshot_fc         =  74;
      csp1_alter_snapshot_fc          =  75;  (* unused *)
      csp1_drop_snapshot_fc           =  76;  (* unused *)
      (* *)
      csp1_max_oci_fc                 =  76;  (* boundary check *)
      (* *)
      csp1_select_direct_fc           = 201;  (* DB-special *)
      csp1_select_first_fc            = 202;  (* DB-special *)
      csp1_select_last_fc             = 203;  (* DB-special *)
      csp1_select_next_fc             = 204;  (* DB-special *)
      csp1_select_prev_fc             = 205;  (* DB-special *)
      csp1_fetch_first_fc             = 206;  (* DB-special *)
      csp1_fetch_last_fc              = 207;  (* DB-special *)
      csp1_fetch_next_fc              = 208;  (* DB-special *)
      csp1_fetch_prev_fc              = 209;  (* DB-special *)
      csp1_fetch_pos_fc               = 210;  (* DB-special *)
      csp1_fetch_same_fc              = 211;  (* DB-special *)
      csp1_string_command_fc          = 212;  (* DB-special *)
      csp1_connect_fc                 = 213;  (* DB-special *)
      csp1_drop_parseid_fc            = 214;  (* DB-special *)
      csp1_close_fc                   = 215;  (* DB-special *)
      csp1_show_73_fc                 = 216;  (* do not remove version < 74 need this *)
      csp1_usage_fc                   = 217;  (* DB-special *)
      csp1_serverdb_fc                = 218;  (* DB-special *)
      csp1_monitor_fc                 = 219;  (* DB-special *)
      csp1_set_fc                     = 220;  (* DB-special *)
      csp1_link_fc                    = 221;  (* DB-special *)
      csp1_create_domain_fc           = 222;  (* DB-special *)
      csp1_drop_domain_fc             = 223;  (* DB-special *)
      csp1_describe_fc                = 224;  (* DB-special *)
      csp1_alter_password_fc          = 225;  (* DB-special *)
      (*                                226 - 232 was low level *)
      csp1_putval_fc                  = 233;  (* DB-special *)
      csp1_getval_fc                  = 234;  (* DB-special *)
      csp1_diagnose_fc                = 235;  (* DB-special *)
      csp1_unlock_fc                  = 236;  (* DB-special *)
      csp1_refresh_fc                 = 237;  (* DB-special *)
      csp1_clear_snapshot_log_fc      = 238;  (* DB-special *)
      csp1_next_stamp_fc              = 239;  (* DB-special *)
      csp1_exists_table_fc            = 240;  (* DB-special *)
      csp1_commit_release_fc          = 241;  (* DB-special *)
      csp1_rollback_release_fc        = 242;  (* DB-special *)
      csp1_drda_native_ddl_fc         = 243;  (* DB-special *)
      csp1_select_into_fc             = 244;  (* DB-special *)
      csp1_fetch_relative_fc          = 247;  (* DB-special *)
      csp1_cursor_pl_sql_execute_fc   = 248;  (* DB-special *)
      csp1_administrator_fc           = 249;  (* DB-special *)
      csp1_reset_fc                   = 250;  (* DB-special *)
      (* *)
      csp1_max_special_fc             = 250;  (* boundary check *)
      (* *)
      csp1_min_masscmd_fc             = 1000;  (* boundary check *)
      (* *)
      csp1_minsert_fc                 = 1003; (* DB-masscmd *)
      csp1_mselect_fc                 = 1004; (* DB-masscmd *)
      csp1_mupdate_fc                 = 1005; (* DB-masscmd *)
      csp1_mdelete_fc                 = 1009; (* DB-masscmd *)
      csp1_mlock_objects_fc           = 1035; (* DB-masscmd *)
      csp1_mfetch_first_fc            = 1206; (* DB-masscmd *)
      csp1_mfetch_last_fc             = 1207; (* DB-masscmd *)
      csp1_mfetch_next_fc             = 1208; (* DB-masscmd *)
      csp1_mfetch_prev_fc             = 1209; (* DB-masscmd *)
      csp1_mfetch_pos_fc              = 1210; (* DB-masscmd *)
      csp1_mfetch_same_fc             = 1211; (* DB-masscmd *)
      (* *)
      csp1_mselect_into_fc            = 1244;  (* DB-masscmd *)
      csp1_mfetch_relative_fc         = 1247;  (* DB-special *)
      csp1_max_masscmd_fc             = 1247;  (* boundary check *)
      (* *)
      csp1_masscmd_fc_offset          = 1000;
      (* ******* next to the last byte of parsid ******* *)
      csp1_p_none                     =   0;
      csp1_p_command_executed         =   1;
      csp1_p_use_adbs                 =   2;
      csp1_p_release_found            =  10;
      csp1_p_not_allowed_for_program  =  30;
      csp1_p_close_found              =  40;
      csp1_p_describe_found           =  41;
      csp1_p_fetch_found              =  42;
      csp1_p_mfetch_found             =  43;
      csp1_p_mass_select_found        =  44;
      csp1_p_select_for_update_found  =  45;
      csp1_p_reuse_mass_select_found  =  46;
      csp1_p_reuse_update_sel_found   =  47;
      csp1_p_dialog_call              =  60;
      csp1_p_mass_command             =  70;
      csp1_p_mselect_found            = 114;
      csp1_p_for_upd_mselect_found    = 115;
      csp1_p_reuse_mselect_found      = 116;
      csp1_p_reuse_upd_mselect_found  = 117;
      csp1_old_varpart_size           = 8240;
      csp1_part_align_length          =    8;
      csp1_max_packet_cnt             =    2;
      csp1_min_reply_size_per_segment = 224;  (* PTS 1116917 E.Z. *)
      (* *)
      csp1_first_sp1_version          = '62000';
      csp1_vt_empty           = 0;
      csp1_vt_null            = 1;
      csp1_vt_i2              = 2;
      csp1_vt_i4              = 3;
      csp1_vt_r4              = 4;
      csp1_vt_r8              = 5;
      csp1_vt_cy              = 6;
      csp1_vt_date            = 7;
      csp1_vt_bstr            = 8;
      csp1_vt_dispatch        = 9;
      csp1_vt_error           = 10;
      csp1_vt_bool            = 11;
      csp1_vt_variant         = 12;
      csp1_vt_unknown         = 13;
      csp1_vt_decimal         = 14;
      csp1_vt_i1              = 16;
      csp1_vt_ui1             = 17;
      csp1_vt_ui2             = 18;
      csp1_vt_ui4             = 19;
      csp1_vt_i8              = 20;
      csp1_vt_ui8             = 21;
      csp1_vt_int             = 22;
      csp1_vt_uint            = 23;
      csp1_vt_void            = 24;
      csp1_vt_hresult         = 25;
      csp1_vt_ptr             = 26;
      csp1_vt_safearrary      = 27;
      csp1_vt_carray          = 28;
      csp1_vt_userdefined     = 29;
      csp1_vt_lpstr           = 30;
      csp1_vt_lpwstr          = 31;
      csp1_vt_filetime        = 64;
      csp1_vt_blob            = 65;
      csp1_vt_stream          = 66;
      csp1_vt_storage         = 67;
      csp1_vt_streamed_object = 68;
      csp1_vt_stored_object   = 69;
      csp1_vt_blob_object     = 70;
      csp1_vt_cf              = 71;
      csp1_vt_clsid           = 72;
      csp1_vt_lc_char         = 201;
      csp1_vt_lc_wchar        = 202;
      csp1_vt_lc_byte         = 203;
      csp1_vt_lc_bool         = 204;
      csp1_vt_lc_abap_tab_handle = 205;
      csp1_vt_lc_stream_handle   = 206;
      csp1_vt_lc_int1            = 207;
      csp1_vt_lc_kb71_param_desc = 208;
      csp1_vt_lc_uint1           = 209;
      csp1_vt_lc_ascii7          = 210;
      csp1_vt_lc_wyde            = 211;
      csp1_vt_lc_numc            = 212; (* PTS 1131373, PG *)
      csp1_vt_lc_utf8              = 213; (*   PTS   *)
      csp1_vt_lc_userdefined_array = 214; (*         *)
      csp1_vt_lc_bitfields         = 215; (* 1141492 *)
      csp1_vt_lc_oid               = 216; (*         *)
      csp1_vt_lc_extoid            = 217; (*         *)
      csp1_vt_lc_varoid            = 218; (*   PG    *)
      csp1_vt_vector             = 4096;
      csp1_vt_array              = 8192;
      csp1_vt_byref              = 16384;
      (* features of SQL sessions *)
      sp1f_nil_feature           =  0;
      sp1f_multiple_drop_parseid =  1;
      sp1f_space_option          =  2;
      sp1f_variable_input        =  3;
      sp1f_optimized_streams     =  4;
      sp1f_check_scrollableoption=  5;
      sp1f_ascii_in_and_output   =  6;
      sp1f_last_feature          =  7;
      (* indicators for fields with variable length *)
      csp1_fi_max_1byte_length = 245;
      csp1_fi_ignored          = 250;
      csp1_fi_special_null     = 251;
      csp1_fi_blob_description = 252;
      csp1_fi_default_value    = 253;
      csp1_fi_null_value       = 254;
      csp1_fi_2byte_length     = 255;
      (* property names used to identify fields *)
      csp1_maxpasswordlen_tag  = 'maxpasswordlen';
 
TYPE
      tsp1_cmd_mess_type = (
            sp1m_nil,
            sp1m_cmd_lower_bound,
            sp1m_dbs,
            sp1m_parse,
            sp1m_cfill0,
            sp1m_syntax,
            sp1m_cfill1,
            sp1m_cfill2,
            sp1m_cfill3,
            sp1m_cfill4,
            sp1m_cfill5,
            sp1m_cmd_upper_bound,
            sp1m_no_cmd_lower_bound,
            sp1m_execute,
            sp1m_ncfill0,
            sp1m_putval,
            sp1m_getval,
            sp1m_load,
            sp1m_unload,
            sp1m_ncfill1,
            sp1m_ncfill2,
            sp1m_ncfill3,
            sp1m_ncfill4,
            sp1m_ncfill5,
            sp1m_no_cmd_upper_bound,
            sp1m_hello,
            sp1m_util_lower_bound,
            sp1m_utility,
            sp1m_incopy,
            sp1m_ufill1,
            sp1m_outcopy,
            sp1m_diag_outcopy,
            sp1m_ufill3,
            sp1m_ufill4,
            sp1m_ufill5,
            sp1m_ufill6,
            sp1m_ufill7,
            sp1m_util_upper_bound,
            sp1m_specials_lower_bound,
            sp1m_switch,
            sp1m_switchlimit,
            sp1m_buflength,
            sp1m_minbuf,
            sp1m_maxbuf,
            sp1m_state_utility,
            sp1m_get_challenge,
            sp1m_sfill3,
            sp1m_sfill4,
            sp1m_sfill5,
            sp1m_specials_upper_bound,
            sp1m_wait_for_event,
            sp1m_procserv_lower_bound,
            sp1m_procserv_call,
            sp1m_procserv_reply,
            sp1m_procserv_fill1,
            sp1m_procserv_fill2,
            sp1m_procserv_fill3,
            sp1m_procserv_fill4,
            sp1m_procserv_fill5,
            sp1m_procserv_upper_bound,
            sp1m_last_cmd_mess_type);
      (* *)
      tsp1_comm_error = (
            sp1ce_ok,
            sp1ce_notok,
            sp1ce_tasklimit,
            sp1ce_timeout,
            sp1ce_crash,
            sp1ce_start_required,
            sp1ce_shutdown,
            sp1ce_send_line_down,
            sp1ce_receive_line_down,
            sp1ce_packet_limit,
            sp1ce_released);
      (* *)
      tsp1_utility_startup = (
            sp1us_connect,
            sp1us_restart,
            sp1us_shutdown);
      (* *)
      tsp1_intern_warning = (
            sp1iw_warn0_resultset_closed,
            sp1iw_warn1,
            sp1iw_warn2,
            sp1iw_warn3,
            sp1iw_warn4,
            sp1iw_warn5,
            sp1iw_warn6,
            sp1iw_warn7,
            sp1iw_warn8,
            sp1iw_warn9,
            sp1iw_warn10,
            sp1iw_warn11,
            sp1iw_warn12,
            sp1iw_warn13,
            sp1iw_warn14,
            sp1iw_warn15);
      (* *)
      tsp1_warningset_intern = PACKED SET OF tsp1_intern_warning;
      (* *)
      tsp1_command_option = (
            sp1co_selfetch_off,
            sp1co_scrollable_cursor_on,
            sp1co_no_resultset_close_needed,
            sp1co_not_used2,
            sp1co_not_used3,
            sp1co_not_used4,
            sp1co_not_used5,
            sp1co_not_used6);
      (* *)
      tsp1_command_options = SET OF tsp1_command_option;
      (* *)
      tsp1_part_kind = (
            sp1pk_nil,
            sp1pk_appl_parameter_description,
            sp1pk_columnnames,
            sp1pk_command,
            sp1pk_conv_tables_returned,
            sp1pk_data,
            sp1pk_errortext,
            sp1pk_getinfo,
            sp1pk_modulname,
            sp1pk_page,
            sp1pk_parsid,
            sp1pk_parsid_of_select,
            sp1pk_resultcount,
            sp1pk_resulttablename,
            sp1pk_shortinfo,
            sp1pk_user_info_returned,
            sp1pk_surrogate,
            sp1pk_bdinfo,
            sp1pk_longdata,
            sp1pk_tablename,
            sp1pk_session_info_returned,
            sp1pk_output_cols_no_parameter,
            sp1pk_key,
            sp1pk_serial,
            sp1pk_relative_pos,
            sp1pk_abap_istream,
            sp1pk_abap_ostream,
            sp1pk_abap_info,
            sp1pk_checkpoint_info,
            sp1pk_procid,
            sp1pk_long_demand, (* PTS 1122546 D.T. *)
            sp1pk_message_list,
            sp1pk_vardata_shortinfo,
            sp1pk_vardata,
            sp1pk_feature,
            sp1pk_clientid,
            sp1pk_last_part_kind);
      (* *)
      tsp1_part_attributes = (
            sp1pa_last_packet,
            sp1pa_next_packet,   (* h.b. CR 1000072 *)
            sp1pa_first_packet,
            sp1pa_fill3,
            sp1pa_fill4,
            sp1pa_fill5,
            sp1pa_fill6,
            sp1pa_fill7);
      (* *)
      tsp1_part_attr = SET OF tsp1_part_attributes;
      (* *)
      tsp1_producer = (
            sp1pr_nil,
            sp1pr_user_cmd,
            sp1pr_internal_cmd,
            sp1pr_kernel,
            sp1pr_installation,
            sp1pr_view_optimizer,
            sp1pr_complex_view_handling,
            sp1pr_queryrewrite);
      (*                sp1pr_internal_cmd given for example by LOAD, *)
      (*                if command was not given by the user but      *)
      (*                needed by LOAD for internal use               *)
      (* *)
      tsp1_segment_kind = (
            sp1sk_nil,
            sp1sk_cmd,
            sp1sk_return,
            sp1sk_proccall,
            sp1sk_procreply,
            sp1sk_last_segment_kind);
      (* *)
      tsp1_sqlmode = (
            sp1sm_nil,
            sp1sm_session_sqlmode,
            sp1sm_internal,
            sp1sm_ansi,
            sp1sm_db2,
            sp1sm_oracle);
 
      tsp1_part_header = RECORD
            sp1p_part_kind   : tsp1_part_kind;
            sp1p_attributes  : tsp1_part_attr;
            sp1p_arg_count   : tsp00_Int2;
            sp1p_segm_offset : tsp00_Int4;
            (* *)
            sp1p_buf_len     : tsp00_Int4;
            sp1p_buf_size    : tsp00_Int4
      END;
 
 
      tsp1_part = RECORD
            CASE integer OF
                1:
                    (sp1p_part_header : tsp1_part_header;
                    sp1p_buf          : tsp00_MoveObj);
                2:
                    (sp1p_part_kind   : tsp1_part_kind;
                    sp1p_attributes   : tsp1_part_attr;
                    sp1p_arg_count    : tsp00_Int2;
                    sp1p_segm_offset  : tsp00_Int4;
                    sp1p_buf_len      : tsp00_Int4;
                    sp1p_buf_size     : tsp00_Int4;
                    sp1p_resnum       : tsp00_ResNum);
                END;
            (*ENDCASE*) 
 
      tsp1_part_ptr = ^tsp1_part;
 
      tsp1_segment_header = RECORD
            CASE integer OF
                1:
                    (sp1s_segm_len          : tsp00_Int4;
                    sp1s_segm_offset        : tsp00_Int4;
                    (*  *)
                    sp1s_no_of_parts        : tsp00_Int2;
                    sp1s_own_index          : tsp00_Int2;
                    sp1s_segm_kind          : tsp1_segment_kind;
                    sp1c_mess_type          : tsp1_cmd_mess_type;
                    sp1c_sqlmode            : tsp1_sqlmode;
                    sp1c_producer           : tsp1_producer;
                    (*  *)
                    sp1c_commit_immediately : boolean;
                    sp1c_ignore_costwarning : boolean;
                    sp1c_prepare            : boolean;
                    sp1c_with_info          : boolean;
                    sp1c_mass_cmd           : boolean;
                    sp1c_parsing_again      : boolean;
                    sp1c_command_options    : tsp1_command_options;
                    sp1c_filler1            : boolean;
                    (*  *)
                    sp1c_filler2            : tsp00_C8;
                    sp1c_filler3            : tsp00_C8);
                2:
                    (sp1s_space2            : tsp00_C8;
                    (*  *)
                    sp1s_space3             : tsp00_C4;
                    sp1s_space4             : tsp1_segment_kind;
                    sp1r_sqlstate           : tsp00_SqlState; (* 5 bytes*)
                    sp1r_returncode         : tsp00_Int2;
                    sp1r_errorpos           : tsp00_Int4;
                    (*  *)
                    sp1r_extern_warning     : tsp00_WarningSet;
                    sp1r_intern_warning     : tsp1_warningset_intern;
                    sp1r_function_code      : tsp00_Int2; (* csp1_.._fc *)
                    sp1r_tracelevel         : tsp00_Uint1;
                    sp1r_filler1            : boolean;
                    sp1r_filler2            : tsp00_C8)
                END;
            (*ENDCASE*) 
 
 
      tsp1_segment = RECORD
            CASE integer OF
                1:
                    (sp1s_segm_header       : tsp1_segment_header;
                    sp1p_part               : tsp1_part);
                2:
                    (sp1s_space1            : tsp1_segment_header;
                    sp1p_part_header        : tsp1_part_header;
                    sp1p_buf                : tsp00_MoveObj);
                3:
                    (sp1s_segm_len          : tsp00_Int4;
                    sp1s_segm_offset        : tsp00_Int4;
                    sp1s_no_of_parts        : tsp00_Int2;
                    sp1s_own_index          : tsp00_Int2;
                    sp1s_segm_kind          : tsp1_segment_kind;
                    (* --- cmd segment header --- *)
                    sp1c_mess_type          : tsp1_cmd_mess_type;
                    sp1c_sqlmode            : tsp1_sqlmode;
                    sp1c_producer           : tsp1_producer;
                    sp1c_commit_immediately : boolean;
                    sp1c_ignore_costwarning : boolean;
                    sp1c_prepare            : boolean;
                    sp1c_with_info          : boolean;
                    sp1c_mass_cmd           : boolean;
                    sp1c_parsing_again      : boolean;
                    sp1c_command_options    : tsp1_command_options;
                    sp1c_filler1            : boolean;
                    sp1c_filler2            : tsp00_C8;
                    sp1c_filler3            : tsp00_C8);
                4:
                    (sp1s_space2            : tsp00_C8;
                    sp1s_space3             : tsp00_C4;
                    sp1s_space4             : tsp1_segment_kind;
                    (* --- return segment header --- *)
                    sp1r_sqlstate           : tsp00_SqlState; (* 5 bytes*)
                    sp1r_returncode         : tsp00_Int2;
                    sp1r_errorpos           : tsp00_Int4;
                    sp1r_extern_warning     : tsp00_WarningSet;
                    sp1r_intern_warning     : tsp1_warningset_intern;
                    sp1r_function_code      : tsp00_Int2; (* csp1_.._fc *)
                    sp1r_tracelevel         : tsp00_Uint1;
                    sp1r_filler1            : boolean;
                    sp1r_filler2            : tsp00_C8;
                    (* --- first part --- *)
                    sp1p_part_kind          : tsp1_part_kind;(* |     *)
                    sp1p_attributes         : tsp1_part_attr;(* |first*)
                    sp1p_arg_count          : tsp00_Int2;      (* |part *)
                    sp1p_segm_offset        : tsp00_Int4;      (* |head *)
                    sp1p_buf_len            : tsp00_Int4;      (* |     *)
                    sp1p_buf_size           : tsp00_Int4;      (* |     *)
                    sp1p_resnum             : tsp00_ResNum)
                END;
            (*ENDCASE*) 
 
      tsp1_segment_ptr = ^tsp1_segment;
      (* *)
 
      tsp1_packet_header = RECORD
            sp1h_mess_code    : tsp00_CodeType; (* code of old packet *)
            sp1h_mess_swap    : tsp00_SwapKind; (* swap of old packet *)
            sp1h_filler1      : tsp00_Int2;
            sp1h_appl_version : tsp00_C5;        (* | senderid of      *)
            sp1h_application  : tsp00_C3;        (* |    old packet    *)
            sp1h_varpart_size : tsp00_Int4;
            (*  *)
            sp1h_varpart_len  : tsp00_Int4;
            sp1h_filler2      : tsp00_Int2;
            sp1h_no_of_segm   : tsp00_Int2;
            sp1h_filler3      : tsp00_C8
      END;
 
 
      tsp1_packet = RECORD
            sp1_header           : tsp1_packet_header;
            CASE integer OF
                1:
                    (sp1_varpart : tsp00_MoveObj);
                2:
                    (sp1_segm    : tsp1_segment);
                END;
            (*ENDCASE*) 
 
      tsp1_packet_ptr  = ^tsp1_packet;
      (* *)
      tsp1_packet_list =  ARRAY [1..csp1_max_packet_cnt] OF tsp1_packet_ptr;
      (* *)
      tsp1_param_opt_type = (
            sp1ot_mandatory,
            sp1ot_optional,
            sp1ot_default,
            sp1ot_escape_char);
      (* *)
      tsp1_param_opt_set = SET OF tsp1_param_opt_type;
      (* *)
      tsp1_param_io_type = (
            sp1io_input,
            sp1io_output,
            sp1io_inout);
 
      tsp1_param_info = PACKED RECORD
            sp1i_mode      : tsp1_param_opt_set;
            sp1i_io_type    : tsp1_param_io_type;
            sp1i_data_type  : tsp00_DataType;
            sp1i_frac       : tsp00_Uint1;
            sp1i_length     : tsp00_Int2;
            sp1i_in_out_len : tsp00_Int2;
            CASE boolean OF
                true :
                    (sp1i_bufpos : tsp00_Int4);
                false :
                    (sp1i_param_no : tsp00_Int2;
                    sp1i_read_only : boolean;
                    sp1i_serial    : boolean);
                END;
            (*ENDCASE*) 
            (* die beiden naechsten Typen ersetzen die vsp00-Typen *)
 
 
      tsp1_dcom_param_info = PACKED RECORD
            sp1i_dcom_mode           : tsp1_param_opt_set;
            sp1i_dcom_io_type        : tsp1_param_io_type;
            sp1i_dcom_datatype       : tsp00_Int2;
            sp1i_dcom_sub_datatype   : tsp00_Int2;
            sp1i_dcom_length         : tsp00_Int2;
            sp1i_dcom_dim            : tsp00_Int2;
            sp1i_dcom_frac           : tsp00_Uint1;
            sp1i_dcom_filler         : boolean;
            sp1i_dcom_cpp_offset     : tsp00_Int4;
            sp1i_dcom_ascii_offset   : tsp00_Int4;
            sp1i_dcom_unicode_offset : tsp00_Int4;
            sp1i_dcom_type_uid       : tsp00_C16;
      END;
 
 
      tsp1_param_spec = PACKED RECORD
            para_type   : tsp00_DataType;
            para_frac   : char;
            para_length : tsp00_Int2;
      END;
 
      tsp1_param_spec_list = ARRAY [ 1..csp_maxvariables ] OF
            tsp1_param_spec;
      (* *)
      tsp1_feature =  tsp00_Uint1;
 
      tsp1_one_feature = PACKED RECORD
            of_feature  : tsp1_feature;
            of_value    : tsp00_Uint1;
      END;
 
      tsp1_features = PACKED ARRAY [sp1f_nil_feature..sp1f_last_feature] OF tsp1_one_feature;
 
.CM *-END-* code ----------------------------------------
.SP 2 
***********************************************************
.PA 
