.ad 8
.bm 8
.fm 4
.bt $Copyright (c) 2000-2004 SAP AG$$Page %$
.tm 12
.hm 6
.hs 3
.tt 1 $SQL$Project Distributed Database System$VPC00$
.tt 2 $$$
.TT 3 $$Typen und Konstanten Runtime System$2000-11-17$
***********************************************************
.nf

.nf


    ========== licence begin  GPL
    Copyright (c) 2000-2004 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


.fo
.pb '#'
.nf
.sp
MODULE  : Runtime-System_Typen_und_Konstanten + VSP00
=========
.sp
Purpose : Defined precompiler const and types.
 
.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 : 1986-04-02
.sp
.cp 3
Version : 2000-11-16
.sp
.cp 3
Release :      Date : 2000-11-17
.sp
***********************************************************
.sp
.cp 10
.fo
.oc _/1
Specification:
 
siehe vpc00.deu
.sp 4
.fo
.CM *-END-* specification -------------------------------
.sp 2
***********************************************************
.sp
.cp 10
.fo
.oc _/1
Description:
.sp 2
sp
.CM *-END-* description ---------------------------------
.sp 2
***********************************************************
.sp
.cp 10
.nf
.oc _/1
Structure:
 
.CM *-END-* structure -----------------------------------
.pa
**********************************************************
.sp
.cp 10
.nf
.oc _/1
.CM -lll-
Code    :
(* PRETTY *)
 
 
CONST
 
     (*****************************************)
     (* from vpc00c   cpcCconst  *)
        cpc_cconst = 8;
 
 (* 2. C  tokens*)
 
        cpc_cs_leftbrc               =  25;
        cpc_cs_rightbrc              =  26;
        cpc_cs_prepcom               =  27;
        cpc_cs_unknown               = cpr_s_unknown;
        cpc_cs_identifier            = cpr_s_identifier;
        cpc_cs_parameter             = cpr_s_parameter_name;
        cpc_cs_unsigned              = cpr_s_unsigned_integer;
        cpc_cs_char                  = cpr_s_string_literal;
        cpc_cs_string                = cpr_s_cstring_literal;
        cpc_cs_comma                 = cpr_s_comma;
        cpc_cs_period                = cpr_s_point;
        cpc_cs_equal                 = cpr_s_equal;
        cpc_cs_leftpar               = cpr_s_leftpar;
        cpc_cs_rightpar              = cpr_s_rightpar;
        cpc_cs_leftbrk               = cpr_s_leftindpar;
        cpc_cs_rightbrk              = cpr_s_rightindpar;
        cpc_cs_asterisk              = cpr_s_asterisk;
        cpc_cs_colon                 = cpr_s_colon;
        cpc_cs_macro                 = cpr_s_macro;
        cpc_cs_minus                 = cpr_s_minus;
        cpc_cs_divide                = cpr_s_divide;
        cpc_cs_greater               = cpr_s_greater;
        cpc_cs_eof                   = cpr_s_eof;
        cpc_cs_bufeof                = cpr_s_bufeof;
 
 (* COBOL tokens*)
 
        cpc_cbs_percent              = cpr_s_macro;
        cpc_cbs_unknown              = cpr_s_unknown;
        cpc_cbs_identifier           = cpr_s_identifier;
        cpc_cbs_parameter            = cpr_s_parameter_name;
        cpc_cbs_unsigned             = cpr_s_unsigned_integer;
        cpc_cbs_string               = cpr_s_string_literal;
        cpc_cbs_comma                = cpr_s_comma;
        cpc_cbs_period               = cpr_s_point;
        cpc_cbs_semicolon            = cpr_s_semicolon;
        cpc_cbs_equal                = cpr_s_equal;
        cpc_cbs_plus                 = cpr_s_plus;
        cpc_cbs_minus                = cpr_s_minus;
        cpc_cbs_leftpar              = cpr_s_leftpar;
        cpc_cbs_rightpar             = cpr_s_rightpar;
        cpc_cbs_leftbrk              = cpr_s_leftindpar;
        cpc_cbs_rightbrk             = cpr_s_rightindpar;
        cpc_cbs_colon                = cpr_s_colon;
        cpc_cbs_divide               = cpr_s_divide;
        cpc_cbs_eof                  = cpr_s_eof;
        cpc_cbs_bufeof               = cpr_s_bufeof;
 
 (* p11getchar input status *)
 
        cpc_ch_ok  =  0;
        cpc_ch_eof = -1; (* logical end of file reached,*)
                         (* no more characters read *)
        cpc_ch_eol = -2; (* end of line reached,*)
                     (* a new line is input and a new character read *)
        cpc_ch_eob = -3; (* during repeated scan of the same buffer *)
                      (* buflen is reached (the 2nd, 3rd, ... time) *)
 
    (* ----------------------------------------------- *)
 
              (* werte fuer den typen tpc_cob_section *)
              cpc_cob_none = 0;  (* initialzustand                   *)
              cpc_cob_file = 1;  (* FILE SECTION gefunden            *)
              cpc_cob_work = 2;  (* WORKING-STORAGE SECTION gefunden *)
              cpc_cob_link = 3;  (* LINKAGE SECTION gefunden         *)
              cpc_cob_proc = 4;  (* PRODEDURE DIVISION gefunden      *)
              cpc_cob_usin = 5;  (* innerhalb USING der PROCEDURE DIV*)
              cpc_cob_decl = 6;  (* DECLARATIVES gefunden            *)
              cpc_cob_decen= 7;  (* DECLRATIVES Ende                 *)
              cpc_cob_init = 8;  (* SQLINIT SECTION einfuegen        *)
              cpc_cob_scre = 9;  (* SCREEN SECTION gefunden          *)
              cpc_cob_p_id =10;  (* PROGRAM-ID gefunden              *)
              cpc_f_goback =11;  (* GOBACK     found                 *)
              cpc_cob_insp =12;  (* INSPECT found (runtime args)     *)
              cpc_cob_argl =13;  (* MOVE TO SQLARGL found            *)
 
 
      (*------------------------------------------*)
      (* Konstanten f?ur enumeration typen        *)
      (*------------------------------------------*)
 
      cpc_as_var            = 0;     (* symbolic values for asclause in *)
      cpc_as_type           = 1;     (* record dclgen *)
      cpc_as_struct         = 2;
      cpc_as_record         = 3;     (* nur fortran *)
      cpc_as_empty          =99;
 
      cpc_oc_empty          = 0;    (* c++ optoin *)
      cpc_oc_cansi          = 1;
      cpc_oc_cplus          = 2;
 
      cpc_imm_no            = 0;    (* immediate  *)
      cpc_imm_variable      = 1;
      cpc_imm_string        = 2;
 
      cpc_notp                    = 0;  (* Werte fuer optpmon *)
      cpc_pseudoconvers           = 1;
      cpc_convers                 = 2;
      cpc_aim                     = 3;
      cpc_utm                     = 4;
      cpc_utmconvers              = 5;
 
      cpc_static_link             = 0;  (* Werte fuer opdyn *)
      cpc_dynamic_link            = 1;
 
      (*----------------------------------------------------------*)
      (*  constanten der precompiler                              *)
      (*----------------------------------------------------------*)
      mxpc_const_sec     = 100;
      mxpc_vffiles       = 8;
 
      mxpc_varent        = 1000;
      mxpc_typent        = 1000;
      mxpc_ndarray       =    4;     (* indices pro hostvariable *)
      mxpc_sqlnd         =  100;
      mxpc_sqlva1        = mxpr_sqlva1;     (* host-variables addr *)
      mxpc_sqlva2        = mxpr_sqlva2;     (* variable datatypes *)
      mxpc_sqlva3        = mxpr_sqlva3;     (* variable names *)
 
      cpc_pclistfile      = 1;
      cpc_inputfile       = 2;
      cpc_work1file       = 3;
      cpc_work2file       = 4;
      cpc_work3file       = 5;
      cpc_lnoinput        = 6;
      cpc_lnooutput       = 7;
      cpc_includefile     = 8;
 
      (* =================================== *)
 
      cpc_se_off     = 0;       (* tsp00_Int2*)
      cpc_se_const   = 1;
      cpc_se_type    = 2;
      cpc_se_var     = 3;
      cpc_se_record  = 4;
      cpc_se_declare = 5;
      cpc_se_structure = 6;
      (* =================================== *)
      cpc_ch_no      = 0;       (* tsp00_Int2    *)
      cpc_ch_syntax  = 1;
      cpc_ch_all     = 2;
      (* =================================== *)
      cpc_usage_empty = 0;       (* usage add    *)
      cpc_usage_comm  = 1;
      cpc_usage_prep  = 2;
      cpc_usage_cancel= 3;
      (* =================================== *)
 
 
 (*  constants for runtime interface code generation *)
 
  cpc_c_sqllatab          =  1;
  cpc_c_prtscall          =  1;
  cpc_c_fircon            =  1;
  cpc_c_conv              =  1;
  cpc_c_tptstcode         =  1;
  cpc_c_loadl             =  1;
  cpc_c_savel             =  1;
  cpc_c_keeputm           =  1;
  cpc_c_dosal             =  1;
  cpc_c_deletl            =  1;
  cpc_c_allocca           =  1;
  cpc_c_rlsrc             =  1;
  cpc_c_ca_end            =  1;
 
 cpc_c_g_sqllatab        =  20;
 cpc_c_g_sqlcheck        =  4;
 cpc_c_g_sqladext        =  4;
 cpc_c_g_sqladpa         =  4;
 cpc_c_g_sql2adpa        =  4;
 cpc_c_g_sqladkast       =  14;
 cpc_c_g_perfutm         =  4;
 cpc_c_g_sqlprts         =  4;
 cpc_c_g_tptst           =  4;
 cpc_c_g_inheader        =  10;
 cpc_c_g_inlowval        =  15;
 cpc_c_g_incaenv         =  4;
 cpc_c_g_invarinit       =  10;
 cpc_c_g_intail          =  10;
 cpc_c_g_loadl           =  4;
 cpc_c_g_endloadl        =  4;
 cpc_c_g_savel           =  4;
 cpc_c_g_dosal           =  4;
 cpc_c_g_rlsrc           =  4;
 cpc_c_g_ca_end          =  4;
 cpc_c_g_ca_do           =  4;
 cpc_c_g_deletl          =  4;
 cpc_c_g_ltheader        =  10;
 cpc_c_g_ltsqlext        =  10;
 cpc_c_g_ltsqlpa         =  10;
 cpc_c_g_lt2sqlpa        =  10;
 cpc_c_g_ltkastate       =  15;
 cpc_c_g_lttail          =  10;
 cpc_c_g_hpgt            =  24;
 
 
 (*-------------------------------------------- *)
 
TYPE
 
      tpc_prelinetype    = PACKED ARRAY [ 1..mxpr_preline ]  OF char;
 
      tpc_local_areas    = (
      a_sqlat,
      a_sqlcu,
      a_sqlda,
      a_sqldi,
      a_sqlfa,
      a_sqlfn,
      a_sqlka,
      a_sqlna,
      a_sqlop,
      a_sqlpa,
      a_sqlpr,
      a_sqlsa,
      a_sqlsd,
      a_sqlsd1,
      a_sqlst,
      a_sqlva,
      a_sqlva1,
      a_sqlva2,
      a_sqlva3,
      a_sqlxa);
 
 
 
      (*----------------------------------------------------------*)
      (*  typen      der precompiler                              *)
      (*----------------------------------------------------------*)
 
 
 
    tpc_pre_errors = (
                  cpc_pre_ok,
                  cpc_buffer_overflow,            (* -706 *)
                  cpc_connect_no_syntax_check,    (* -735 *)
                  cpc_const_declare_wrong,        (* -822 *)
                  cpc_const_too_large,            (* -832 *)
                  cpc_datatyp_not_compatible,     (* -817 *)
                  cpc_del_oracle_statement,       (* -762 *)
                  cpc_duplicate_fielddef,         (* -825 *)
                  cpc_duplicate_statementname,    (* -826 *)
                  cpc_duplicate_substructure_name,(* -724 *)
                  cpc_duplicate_typedef,          (* -827 *)
                  cpc_duplicate_vardef,           (* -828 *)
                  cpc_end_of_lineno_input,        (* -741 *)
                  cpc_extra_block_closure,        (* -738 *)
                  cpc_file_close_error,           (* -829 *)
                  cpc_file_open_error,            (* -830 *)
                  cpc_file_read_error,            (* -831 *)
                  cpc_file_write_error,           (* -832 *)
                  cpc_forloop_not_allowed,        (* -824 *)
                  cpc_include_area_on_wrong_position, (* -833 *)
                  cpc_include_file_exist,         (* -758 *)
                  cpc_include_file_produced,      (* -759 *)
                  cpc_includefile_allready_open,  (* -834 *)
                  cpc_includefile_open_error,     (* -835 *)
                  cpc_init_keyword_wrong,         (* -899 *)
                  cpc_invalid_cprep_command,      (* -836 *)
                  cpc_invalid_datatype,           (* -837 *)
                  cpc_invalid_declarator,         (* -838 *)
                  cpc_invalid_listname_expansion, (* -731 *)
                  cpc_invalid_macro_string,       (* -839 *)
                  cpc_invalid_macronumber,        (* -840 *)
                  cpc_invalid_option,             (* -841 *)
                  cpc_invalid_param_indicator,    (* -842 *)
                  cpc_invalid_parametername,      (* -843 *)
                  cpc_invalid_recordname,         (* -844 *)
                  cpc_invalid_rlistname_range,    (* -732 *)
                  cpc_invalid_section_begin_or_end,(* -886 *)
                  cpc_invalid_sql_command,        (* -845 *)
                  cpc_invalid_stmt_in_section,    (* -846 *)
                  cpc_invalid_type_definition,    (* -847 *)
                  cpc_invalid_unsignedinteger,    (* -848 *)
                  cpc_invalid_var_definition,     (* -849 *)
                  cpc_long_column_exist_in_table, (* -771 *)
                  cpc_loop_error_count,           (* -740 *)
                  cpc_macro_in_fetch,             (* -770 *)
                  cpc_missing_array,              (* -855 *)
                  cpc_missing_connect_user,       (* -882 *)
                  cpc_missing_dbsname,            (* -857 *)
                  cpc_missing_endsign,            (* -850 *)
                  cpc_missing_indicatorvariable,  (* -884 *)
                  cpc_missing_modulname,          (* -852 *)
                  cpc_nested_comment_not_closed,  (* -730 *)
                  cpc_no_macro_init,              (* -721 *)
                  cpc_no_output_variable,         (* -753 *)
                  cpc_no_pointer_allowed,         (* -734 *)
                  cpc_no_sql_statement_check,     (* -853 *)
                  cpc_only_question_marks_allowed,(* -854 *)
                  cpc_p_loop_init_wrong,          (* -856 *)
                  cpc_pointer_variable,           (* -733 *)
                  cpc_pre_cmd_not_available,      (* -101 *)
                  cpc_pre_not_implemented,        (* -808 *)
                  cpc_pre_reflex_start_required,
                  cpc_pre_request_area_overflow,  (* -706 *)
                  cpc_ptr_comp_not_allowed,       (* -769 *)
                  cpc_session_not_allowed,        (* -806 *)
                  cpc_source_code_truncated,      (* -729 *)
                  cpc_storage_class_not_allowed,  (* -858 *)
                  cpc_too_long_paramlist,         (* -859 *)
                  cpc_too_long_readline,          (* -889 *)
                  cpc_too_long_wheneverstring,    (* -887 *)
                  cpc_too_many_const_declared,    (* -860 *)
                  cpc_too_many_type_declared,     (* -870 *)
                  cpc_too_many_var_declared,      (* -871 *)
                  cpc_too_short_marend,           (* -890 *)
                  cpc_too_short_paramlist,        (* -872 *)
                  cpc_trace_param_no_struc_allowed,(* -894 *)
                  cpc_unknown_constname,           (* -873 *)
                  cpc_unknown_cursorname,          (* -874 *)
                  cpc_unknown_macronumber,         (* -876 *)
                  cpc_unknown_parametername,       (* -877 *)
                  cpc_unknown_recordname,          (* -878 *)
                  cpc_unknown_sql_command,         (* -879 *)
                  cpc_unknown_statementname,       (* -880 *)
                  cpc_unknown_typename,            (* -881 *)
                  cpc_usage_add_error,             (*-9809 *)
                  cpc_usage_on_off_error,          (*-9805 *)
                  cpc_variable_may_overflow,       (* -892 *)
                  cpc_variable_not_allowed_as_array,(* -763 *)
                  cpc_variable_will_be_truncated,   (* -885 *)
                  cpc_whole_table_del_upd,          (* -895 *)
                  cpc_macros_not_allowed            (* -780 *)
                  );
 
      tpc_cob_section = tsp00_Int2;
 
      tpc_vffileentry  = RECORD           (* 92 B *)
            vffileno  : tsp00_Int4;
            vffilen   : tsp00_VFilename;
            vffilemode : tsp05_RteFileMode;
            vfbinary  : boolean;
            vffeof    : boolean;
            vfreclen2 : tsp00_Int2;
            vfcnt     : tsp00_Int2;      (* line z?ahler *)
        (**** 3.0.00 lzu  neu *****)
            vfform    : tsp00_VfFormat;
            vfbufcount: tsp00_Int2;
            vffiller  : tsp00_Int2;
            vfblock   : tpr_intaddr;
            vfreclen4 : tsp00_Int4;
      END;
 
      tpc_vfentries   = ARRAY [ 1..mxpc_vffiles ] OF tpc_vffileentry;
 
      tpc_vffiletype = RECORD             (* 744 B *)
            vfacc     : tsp00_Int2;    (* actueller writefile index *)
            vfpoolprt : tsp00_Int4;
            vffn      : tpc_vfentries;
      END;
 
 
 
      tpc_tprelinerec  = RECORD
          llen    : tsp00_Int2;    (* gesamte l?ange *)
          lbegpos : tsp00_Int2;    (* zu untersuchende anf position *)
          lendpos : tsp00_Int2;    (* zuuntersuchende end position  *)
          laccpos : tsp00_Int2;    (* actuelle pos bei outpline     *)
          lline   : tpc_prelinetype; (* zeile *)
      END;
 
      tpc_analysetype  = RECORD      (* analyse informationen*)
          ancomtyp   : tsp00_Int2;     (* sql, dia, report *)
          ansection  : tsp00_Int2; (* actuelle section *)
          anbegin    : boolean;
          ansuccstatem : boolean;      (* folgestatement inpline *)
          ancheck    : tsp00_Int2;       (* opcheck angabe        *)
          anusage    : array [ 1..mxpr_sqlga ] of boolean;
                                        (* true : usage on sess 1 *)
      END;
 
      tpc_wheneverentry  = RECORD      (* whenever informationen*)
            whlen   : tsp00_Int2;    (* string length    *)
            whact   : tsp00_Int2;    (* sqlaction art stop, go, call  *)
            whstr   : tsp00_C50;     (* sqlaction string    *)
            whfiller: tsp00_Int2;
      END;
 
      (*** 1:warning,  2:error,  3:excep,  4:not found ****)
      (*** 5:sqlbegin, 6:sqlend,                       ****)
      tpc_whenevertype = ARRAY [ 1..6 ]  of tpc_wheneverentry;
     (*********************************)
     (*  const sections angaben       *)
     (*********************************)
 
      tpc_endsentry   = RECORD      (* search ende type   *)
            ename : tsp00_Sname;
            enaml : tsp00_Int2;
      END;
 
      tpc_endstype   = RECORD      (* search end array  *)
            ecnt    : tsp00_Int4;  (* count            *)
            eend    : ARRAY  [ 1..5 ] of tpc_endsentry;
      END;
 
 
     (*********************************)
     (*  const sections angaben       *)
     (*********************************)
 
      tpc_const_entry   = RECORD      (* const section array  *)
            cname : tsp00_Lname;
            cwert : tsp00_Int2;
      END;
 
      tpc_csectionp = ARRAY [1..mxpc_const_sec] OF tpc_const_entry;
 
      tpc_const_sec  = RECORD      (* const section array  *)
            ccnt    : tsp00_Int2;    (* count            *)
            cbot    : tsp00_Int2;    (* first index      *)
            csec    : ^tpc_csectionp;
      END;
 
     (***********************************)
     (*  lno lineno auf source quelle   *)
     (***********************************)
 
     tpc_lnorecord  =  RECORD
         lnoinp  : tsp00_Int2;     (* cpr_is_true : input datei existiert *)
         lnoout  : tsp00_Int2;     (* cpr_is_true : output auf ur-quelle  *)
         lnoind  : tsp00_Int2; (* workfile  output actuell        *)
         lnolast : tsp00_Int2; (* workfile  output last           *)
         lnosrc  : tsp00_Int2; (* source line-no                  *)
         lnoexp  : tsp00_Int2; (* expandierte line-no             *)
         lnochr  : tsp00_C12;  (* lnosrc, lnoexp als char       *)
      end;
 
 (* types for runtime interface code generation *)
 
 tpc_sqllatab          = record
 srccode : array [1..cpc_c_sqllatab         ] of tsp00_C66;
 srclen  : array [1..cpc_c_sqllatab         ] of tsp00_Int4;
 end;
 tpc_prtscall          = record
 srccode : array [1..cpc_c_prtscall         ] of tsp00_C66;
 srclen  : array [1..cpc_c_prtscall         ] of tsp00_Int4;
 end;
 tpc_fircon            = record
 srccode : array [1..cpc_c_fircon           ] of tsp00_C66;
 srclen  : array [1..cpc_c_fircon           ] of tsp00_Int4;
 end;
 tpc_conv              = record
 srccode : array [1..cpc_c_conv             ] of tsp00_C66;
 srclen  : array [1..cpc_c_conv             ] of tsp00_Int4;
 end;
 tpc_tptstcode         = record
 srccode : array [1..cpc_c_tptstcode        ] of tsp00_C66;
 srclen  : array [1..cpc_c_tptstcode        ] of tsp00_Int4;
 end;
 tpc_loadl             = record
 srccode : array [1..cpc_c_loadl            ] of tsp00_C66;
 srclen  : array [1..cpc_c_loadl            ] of tsp00_Int4;
 end;
 tpc_savel             = record
 srccode : array [1..cpc_c_savel            ] of tsp00_C66;
 srclen  : array [1..cpc_c_savel            ] of tsp00_Int4;
 end;
 tpc_keeputm           = record
 srccode : array [1..cpc_c_keeputm          ] of tsp00_C66;
 srclen  : array [1..cpc_c_keeputm          ] of tsp00_Int4;
 end;
 tpc_dosal             = record
 srccode : array [1..cpc_c_dosal            ] of tsp00_C66;
 srclen  : array [1..cpc_c_dosal            ] of tsp00_Int4;
 end;
 tpc_deletl            = record
 srccode : array [1..cpc_c_deletl           ] of tsp00_C66;
 srclen  : array [1..cpc_c_deletl           ] of tsp00_Int4;
 end;
 tpc_allocca           = record
 srccode : array [1..cpc_c_allocca          ] of tsp00_C66;
 srclen  : array [1..cpc_c_allocca          ] of tsp00_Int4;
 end;
 tpc_rlsrc             = record
 srccode : array [1..cpc_c_rlsrc            ] of tsp00_C66;
 srclen  : array [1..cpc_c_rlsrc            ] of tsp00_Int4;
 end;
 tpc_ca_end            = record
 srccode : array [1..cpc_c_ca_end           ] of tsp00_C66;
 srclen  : array [1..cpc_c_ca_end           ] of tsp00_Int4;
 end;
 
 tpc_g_sqllatab        = record
 srccode : array [1..cpc_c_g_sqllatab       ] of tsp00_C66;
 srclen  : array [1..cpc_c_g_sqllatab       ] of tsp00_Int4;
 srcflag : array [1..cpc_c_g_sqllatab       ] of char ;
 end;
 tpc_g_sqlcheck        = record
 srccode : array [1..cpc_c_g_sqlcheck       ] of tsp00_C66;
 srclen  : array [1..cpc_c_g_sqlcheck       ] of tsp00_Int4;
 end;
 tpc_g_sqladext        = record
 srccode : array [1..cpc_c_g_sqladext       ] of tsp00_C66;
 srclen  : array [1..cpc_c_g_sqladext       ] of tsp00_Int4;
 end;
 tpc_g_sqladpa         = record
 srccode : array [1..cpc_c_g_sqladpa        ] of tsp00_C66;
 srclen  : array [1..cpc_c_g_sqladpa        ] of tsp00_Int4;
 end;
 tpc_g_sql2adpa         = record
 srccode : array [1..cpc_c_g_sql2adpa        ] of tsp00_C66;
 srclen  : array [1..cpc_c_g_sql2adpa        ] of tsp00_Int4;
 srcflag : array [1..cpc_c_g_sql2adpa        ] of char;
 end;
 tpc_g_sqladkast       = record
 srccode : array [1..cpc_c_g_sqladkast      ] of tsp00_C66;
 srclen  : array [1..cpc_c_g_sqladkast      ] of tsp00_Int4;
 end;
 tpc_g_perfutm         = record
 srccode : array [1..cpc_c_g_perfutm        ] of tsp00_C66;
 srclen  : array [1..cpc_c_g_perfutm        ] of tsp00_Int4;
 end;
 tpc_g_sqlprts         = record
 srccode : array [1..cpc_c_g_sqlprts        ] of tsp00_C66;
 srclen  : array [1..cpc_c_g_sqlprts        ] of tsp00_Int4;
 end;
 tpc_inlowval        = record
 srccode : array [1..cpc_c_g_inlowval       ] of tsp00_C66;
 srclen  : array [1..cpc_c_g_inlowval       ] of tsp00_Int4;
 end;
 tpc_incaenv         = record
 srccode : array [1..cpc_c_g_incaenv        ] of tsp00_C66;
 srclen  : array [1..cpc_c_g_incaenv        ] of tsp00_Int4;
 end;
 tpc_inheader        = record
 srccode : array [1..cpc_c_g_inheader       ] of tsp00_C66;
 srclen  : array [1..cpc_c_g_inheader       ] of tsp00_Int4;
 srcflag : array [1..cpc_c_g_inheader       ] of char;
 end;
 tpc_invarinit       = record
 srccode : array [1..cpc_c_g_invarinit      ] of tsp00_C66;
 srclen  : array [1..cpc_c_g_invarinit      ] of tsp00_Int4;
 srcflag : array [1..cpc_c_g_invarinit      ] of char;
 end;
 tpc_intail          = record
 srccode : array [1..cpc_c_g_intail         ] of tsp00_C66;
 srclen  : array [1..cpc_c_g_intail         ] of tsp00_Int4;
 srcflag : array [1..cpc_c_g_intail         ] of char;
 end;
 tpc_g_appinit         = record
                       inheader   : tpc_inheader    ;
                       inlowval   : tpc_inlowval    ;
                       incaenv    : tpc_incaenv     ;
                       invarinit  : tpc_invarinit   ;
                       intail     : tpc_intail      ;
 end;
 tpc_g_tptst           = record
 srccode : array [1..cpc_c_g_tptst          ] of tsp00_C66;
 srclen  : array [1..cpc_c_g_tptst          ] of tsp00_Int4;
 end;
 tpc_g_endloadl        = record
 srccode : array [1..cpc_c_g_endloadl       ] of tsp00_C66;
 srclen  : array [1..cpc_c_g_endloadl       ] of tsp00_Int4;
 end;
 tpc_g_loadl           = record
 srccode : array [1..cpc_c_g_loadl          ] of tsp00_C66;
 srclen  : array [1..cpc_c_g_loadl          ] of tsp00_Int4;
 end;
 tpc_g_savel           = record
 srccode : array [1..cpc_c_g_savel          ] of tsp00_C66;
 srclen  : array [1..cpc_c_g_savel          ] of tsp00_Int4;
 end;
 tpc_g_dosal           = record
 srccode : array [1..cpc_c_g_dosal          ] of tsp00_C66;
 srclen  : array [1..cpc_c_g_dosal          ] of tsp00_Int4;
 end;
 tpc_g_deletl          = record
 srccode : array [1..cpc_c_g_deletl         ] of tsp00_C66;
 srclen  : array [1..cpc_c_g_deletl         ] of tsp00_Int4;
 end;
 tpc_ltheader          = record
 srccode : array [1..cpc_c_g_ltheader       ] of tsp00_C66;
 srclen  : array [1..cpc_c_g_ltheader       ] of tsp00_Int4;
 srcflag : array [1..cpc_c_g_ltheader       ] of char;
 end;
 tpc_ltsqlext          = record
 srccode : array [1..cpc_c_g_ltsqlext       ] of tsp00_C66;
 srclen  : array [1..cpc_c_g_ltsqlext       ] of tsp00_Int4;
 srcflag : array [1..cpc_c_g_ltsqlext       ] of char;
 end;
 tpc_ltsqlpa           = record
 srccode : array [1..cpc_c_g_ltsqlpa        ] of tsp00_C66;
 srclen  : array [1..cpc_c_g_ltsqlpa        ] of tsp00_Int4;
 srcflag : array [1..cpc_c_g_ltsqlpa        ] of char;
 end;
 tpc_lt2sqlpa          = record
 srccode : array [1..cpc_c_g_lt2sqlpa       ] of tsp00_C66;
 srclen  : array [1..cpc_c_g_lt2sqlpa       ] of tsp00_Int4;
 srcflag : array [1..cpc_c_g_lt2sqlpa       ] of char;
 end;
 tpc_ltkastate         = record
 srccode : array [1..cpc_c_g_ltkastate      ] of tsp00_C66;
 srclen  : array [1..cpc_c_g_ltkastate      ] of tsp00_Int4;
 srcflag : array [1..cpc_c_g_ltkastate      ] of char;
 end;
 tpc_lttail            = record
 srccode : array [1..cpc_c_g_lttail         ] of tsp00_C66;
 srclen  : array [1..cpc_c_g_lttail         ] of tsp00_Int4;
 srcflag : array [1..cpc_c_g_lttail         ] of char;
 end;
 tpc_g_latabind        = record
                       ltheader   : tpc_ltheader   ;
                       ltsqlext   : tpc_ltsqlext   ;
                       ltsqlpa    : tpc_ltsqlpa    ;
                       lt2sqlpa   : tpc_lt2sqlpa   ;
                       ltkastate  : tpc_ltkastate  ;
                       lttail     : tpc_lttail     ;
 end;
 tpc_g_rlsrc           = record
 srccode : array [1..cpc_c_g_rlsrc          ] of tsp00_C66;
 srclen  : array [1..cpc_c_g_rlsrc          ] of tsp00_Int4;
 end;
 tpc_g_ca_end          = record
 srccode : array [1..cpc_c_g_ca_end         ] of tsp00_C66;
 srclen  : array [1..cpc_c_g_ca_end         ] of tsp00_Int4;
 end;
 tpc_g_ca_do           = record
 srccode : array [1..cpc_c_g_ca_do          ] of tsp00_C66;
 srclen  : array [1..cpc_c_g_ca_do          ] of tsp00_Int4;
 end;
 tpc_g_hpgt            = record
 srccode : array [1..cpc_c_g_hpgt           ] of tsp00_C66;
 srclen  : array [1..cpc_c_g_hpgt           ] of tsp00_Int4;
 end;
 
 tpc_pass1codestruc = record
                  sqllatab  : tpc_sqllatab  ;
                  prtscall  : tpc_prtscall  ;
                  fircon    : tpc_fircon    ;
                  conv      : tpc_conv      ;
                  tptstcode : tpc_tptstcode ;
                  loadl     : tpc_loadl     ;
                  savel     : tpc_savel     ;
                  dosal     : tpc_dosal     ;
                  deletl    : tpc_deletl    ;
                  rlsrc     : tpc_rlsrc     ;
                  ca_end    : tpc_ca_end    ;
                  allocca   : tpc_allocca   ;
                  keeputm   : tpc_keeputm   ;
                  end;
 
 tpc_tpcodestruc =    record
                  stmt_sep  : char          ;
                  str_delim : char          ;
                  sqllatab  : tpc_g_sqllatab  ;
                  sqlcheck  : tpc_g_sqlcheck  ;
                  sqladext  : tpc_g_sqladext  ;
                  sqladpa   : tpc_g_sqladpa   ;
                  sql2adpa  : tpc_g_sql2adpa  ;
                  sqladkast : tpc_g_sqladkast ;
                  perfutm   : tpc_g_perfutm   ;
                  sqlprts   : tpc_g_sqlprts   ;
                  appinit   : tpc_g_appinit   ;
                  tptst     : tpc_g_tptst     ;
                  endloadl  : tpc_g_endloadl  ;
                  loadl     : tpc_g_loadl     ;
                  savel     : tpc_g_savel     ;
                  dosal     : tpc_g_dosal     ;
                  deletl    : tpc_g_deletl    ;
                  latabind  : tpc_g_latabind  ;
                  rlsrc     : tpc_g_rlsrc     ;
                  ca_end    : tpc_g_ca_end    ;
                  ca_do     : tpc_g_ca_do     ;
                  hpgt      : tpc_g_hpgt      ;
                  end;
 
 tpc_varent = record     (* Eintrag in Variablentabelle,  48 B *)
      vaname : tsp00_Lname;(* Name der Variablen *)
      vanaml : tsp00_Int2; (* Laenge des Namens  *)
      vacnt  : tsp00_Int2; (*Gesamtzahl der skal.Komp. einer Variablen *)
      vastrix: tsp00_Int2; (*Index in typtable: Vater-Struktur Komp.,0 *)
      vatypix: tsp00_Int2; (*Index in typtable: Typ-Beschr.der Variabln*)
      vasqlix: tsp00_Int2; (*Index in sqlva1  : sqlva beschr.der Variab*)
      vaglobl: tsp00_Int2; (* cpc_cconst= statische Var., 0 sonst*)
      vablockid: tsp00_Int2;   (* Block index der Variablen  *)
      vafiller : tsp00_Int2;   (*    empty                   *)
 end;
 
 tpc_typent = record (* Eintrag in Typ-Tabelle *)     (* 16 B *)
         tyref    : tsp00_Int2; (* Reference-Indikator: 1/0 falls *)
                   (* Variablen-Deklaration existiert oder nicht *)
         typtr    : tsp00_Int2; (* Pointer Kennung *)
         tydigit  : tsp00_Int2;
    case
    tyindi: tsp00_Int2 of  (* Typ-Indikator *)
      cpr_vstruct :           (* Struktur *)
           (
           tycmcnt: tsp00_Int2; (*Anzahl der Komponenten der Struktur *)
           tycmpix: tsp00_Int2; (*Ind.des ersten Komp-Index in cmpindex*)
           tyvacnt: tsp00_Int2; (*Gesamtzahl der skalaren Komponenten *)
           tyfill1: tsp00_Int2;
           );
      cpr_varray:  (* Array - Deskriptor fuer jede Dimension *)
           (
           tydim  : tsp00_Int4; (* Anzahl der Komponenten *)
           tyfix  : tsp00_Int2; (* Anfangsindex *)
           tytypix: tsp00_Int2; (*Index in typtable:Typ-Beschr.der Komp*)
           );
      cpr_vint2, cpr_vint4, cpr_vreal4, cpr_vreal8, cpr_vdecimal,
      cpr_vzoned, cpr_vuns2, cpr_vuns4,
      cpr_vchar, cpr_vcharc, cpr_vstring, cpr_vstring1, cpr_vlzone,
      cpr_vlszon, cpr_vtszon, cpr_vreal8sun, cpr_vucs2, cpr_vutf16,
      cpr_vunicode, cpr_vunicodec :
          (
           tysize : tsp00_Int4;(*Laenge des DB-Typs wie altes tlen *)
           tyfrac : tsp00_Int2;(*Skalier.des DB-Typs wie altest tfrac *)
           tyfill3: tsp00_Int2;
           );
 end;
 
 tpc_vartable = array [1..mxpc_varent] (* Variablentabelle *)
      of tpc_varent;    (* Eintrag von "echten" Variab.und Struk-komp. *)
 
 tpc_typtable = array [1..mxpc_typent] (* Typ-Tabelle *)
      of tpc_typent;    (*Eintrag der skalaren DB-Typen und Strukturen *)
 
 tpc_cmpindex = array [1..mxpc_varent]
                      (* Indizes der Strukturkomp.in vartab *)
      of tsp00_Int2;    (* wird nur ueber typtable referenziert *)
 
 tpc_vartablep = ^tpc_vartable;
 tpc_typtablep = ^tpc_typtable;
 tpc_cmpindexp = ^tpc_cmpindex;
 
 tpc_symtab = record (* Allgemeine Symboltabelle *)
         varcnt: tsp00_Int2; (* Aktuelle Belegungen *)
         varsav: tsp00_Int2; (* .. vor der letzten declare section *)
         varbot: tsp00_Int2; (* ..einer Variablen-Stack-Schicht (VPC32)*)
         typcnt: tsp00_Int2;
         cmpcnt: tsp00_Int2;
         pcfiller : tsp00_Int2;
         vartablep: tpc_vartablep; (* Zeiger zu Tablellen *)
         typtablep: tpc_typtablep;
         cmpindexp: tpc_cmpindexp;
 end;
     (***************************)
     (**    sqlnd entry        **)
     (**  NameDescriptor entry **)
     (**  neu hostvar analyse  **)
     (** alte ex_table erweitert*)
     (***************************)
 
   tpc_nd_entry  = RECORD
        ndvarmainix : tsp00_Int2; (* vartable index main structure *)
        ndvararrix  : tsp00_Int2; (* vartable index in array structure *)
        ndvarentix  : tsp00_Int2; (* vartable index sub structure  *)
        ndtypentix  : tsp00_Int2; (* typtable index of last struct *)
        ndmaintyindi: tsp00_Int2; (* typindi des varmain entry's   *)
        ndcompexpan : tsp00_Int2; (* componenten expansion is_true *)
        ndarraycnt  : tsp00_Int2; (*numb.of array indices in arrayix *)
        ndarrayix   : packed array [1..mxpc_ndarray] of tsp00_Int2;
        ndsqlva1st  : tsp00_Int4; (* sqlva1 index to struct  *)
        ndsqlva1ix  : tsp00_Int4; (* sqlva1 index of first element *)
        ndsqlva1cnt : tsp00_Int4; (* numb.of sqlva1 entries needed *)
        ndBlockId  : tsp00_Int2;
        ndkano     : tsp00_Int2;
        ndLoopPar  : tsp00_Int2;
        ndExpanlen : tsp00_Int2;  (* l?ange f?uer expansion *)
        ndCompIx   : tsp00_Int2;
        ndNamelen  : tsp00_Int2;
        ndNamePtr  : tpr_intaddr;
    END;
 
     tpc_arrndtype =  ARRAY [ 1..mxpc_sqlnd ] OF tpc_nd_entry;
 
     tpc_nd_entryp  =  ^tpc_arrndtype;
 
 
 tpc_pc_sqlva = RECORD    (* allgemeine sqlva_areas tables *)
         va1cnt   : tsp00_Int2; (* maximale belegung sqlva1 *)
         va2cnt   : tsp00_Int2; (* maximale belegung sqlva2 *)
         va3cnt   : tsp00_Int2; (* maximale belegung sqlva3 *)
         ndmax    : tsp00_Int2; (* maximale belegung sqlnd*)
         ndcnt    : tsp00_Int2; (* letzter nd entry f?ur vararbeitung *)
         ndfiller : tsp00_Int2;
         ndtabp   : tpc_nd_entryp;  (* pointer to tpc_nd_entry array *)
  END;
 
 tpc_dclclause = record
        dclattr : tsp00_C132;
        dclattrl: tsp00_Int2;
        dclfnlen: tsp00_Int2;  (* file name length in [1] *)
 end;
 
 tpc_dclgen = record
        tabclause : tsp00_Int2;  (* cpc_i_table::table, i_dbproc::dbproc*)
        asclause : tsp00_Int2;
        indclause: tsp00_Int2;
        dcluser   : tsp00_KnlIdentifier;
        dcltab    : tsp00_KnlIdentifier;
        dclmodul  : tsp00_KnlIdentifier;
        dcltabl   : tsp00_Int2;
        clause    : array [1..2] of tpc_dclclause;
 end;
 
 tpc_a_dclen   = array [1..2] of tsp00_Int2;
 
 tpc_pc_cics = RECORD          (* contains all variables needed in 1. *)
         progid   : tsp00_Name;(*an 2.pass.name of an extern.proced. *)
         partptst : tsp00_Name;(*name for a special test in cobol. *)
         cicscount : tsp00_Int4;
         iscics    : boolean;
         pass1     : boolean;
  END;
 
    tpc_pc_usage = RECORD        (* contains usage add infos *)
         uscom    : tsp00_Int2;     (* command nr us_empty = 0 *)
         usdobjn1 : tsp00_KnlIdentifier;     (* defobjectname1  *)
         usfiller : tsp00_Int2;     (* empty           *)
         usdobjn2 : tsp00_KnlIdentifier;     (* defobjectname2  *)
      END;
 
 
    tpc_partbuffer =  ARRAY [ 1..mxpr_partbuf ] OF char;
    tpc_partbufptr =  ^tpc_partbuffer;
 
    tpc_cmd_part = RECORD        (* record analyse kommando  *)
         part1len   : tsp00_Int4;     (* part1len  cmd len *)
         part2len   : tsp00_Int4;     (* part2len  zwischen len *)
         partmaxlen : tsp00_Int4;
         partsizlen : tsp00_Int4;
         partbufp   : tpc_partbufptr;  (* pointer auf partmaxlen buffer *)
      END;
 
 
   tpc_globals = RECORD    (* apc  19980 B *)
         pcerror   : tpc_pre_errors;      (* error *)
         pcerrcnt  : tsp00_Int2;        (* anzahl error z?ahler     *)
         pcwrncnt  : tsp00_Int2;        (* anzahl warnings z?ahler  *)
         pcxuserset: tsp4_xuserset;    (* 2B sqlarg3 xuserset for*.pcl*)
         pcendsymlen: tsp00_Int2;       (* ende sql_kommando    *)
         pcendsym  : tsp00_Sname;       (* ende sql_kommando    *)
         pcendcmd  : tsp00_C2;          (* ende einer codezeile in 1*)
                                      (* gefundenes endzeich. in 2*)
         pcendse   :tpc_endstype;     (* 76B, end_search f?ur sqlstt*)
         pclineperpage: tsp00_Int4;     (* ausgabe listing         *)
         pccharperline: tsp00_Int4;     (* ausgabe listing         *)
         pcfilen   : tsp00_KnlIdentifier;        (* parameter filename      *)
         pcfilet   : tsp00_Name;        (* parameter filetype      *)
         pcfilem   : tsp00_Name;        (* parameter filemodus     *)
         pcargs    : tsp4_argline;     (* 132B, args parameter inpline  *)
         pcexecsql : tsp00_Int2;         (* = 0 kein execsql command*)
         pcstmax    : tsp00_Int2;        (* maximal sqlst -area  *)
         pcststm    : tsp00_Int2;        (* max st-area of statem *)
         pcpaloop   : tsp00_Int4;        (* max-index for loop   *)
         pckaatind  : tsp00_Int2;        (* at index bevor ka found *)
         pckacuind  : tsp00_Int2;        (* cu index bevor ka found *)
         pcat       : tsp00_Int2;        (* sqlat-index          *)
         pccu       : tsp00_Int2;        (* sqlcu-index          *)
         pcatgacnt  : tsp00_Int2;        (* number of possible ga_entrys*)
         pcpa       : tsp00_Int2;        (* sqlpa-index  max     *)
         pcsa       : tsp00_Int2;        (* sqlsa-index  max     *)
         pcka       : tsp00_Int2;        (* sqlka-index  max     *)
         pcpr       : tsp00_Int2;        (* sqlpr-index  max     *)
         pcst       : tsp00_Int2;        (* sqlst-index  max     *)
         pcfa       : tsp00_Int2;        (* sqlfa-index  max     *)
         pcfn       : tsp00_Int2;        (* sqlfn-index  max     *)
         pcdi       : tsp00_Int2;        (* sqldi-index  max     *)
         pcna       : tsp00_Int2;        (* sqlna-index  max     *)
         pcop       : tsp00_Int2;        (* sqlop-index  max     *)
         pcda       : tsp00_Int2;        (* sqlda-index  max     *)
         pcbnddsc   : tsp00_Int2;        (* bnddsc-index max     *)
         pcseldsc   : tsp00_Int2;        (* seldsc-index max     *)
         pcopts    : tsp4_args_options; (* precompiler optionen *)
         pcvf      : tpc_vffiletype;   (* 744B, interne  files   *)
         pccodeind : tsp00_Int2;         (* actueller codefileindex *)
         pcinpind  : tsp00_Int2;         (* actueller inputfileindex*)
         pcinpline : tpc_tprelinerec;  (* 522B, eine programmzeile   *)
         pcoutline : tpc_tprelinerec;  (* 522B,eine code outputline *)
         pcinpeof  : boolean;          (* inpmodule eof        *)
         pcsqlcom  : boolean;          (* true read reflex_com *)
         pccomment : boolean;          (* true comment in nextline *)
         pcscan    : tpr_scannertype;  (* 14B, syntaxerkennung      *)
         pcan      : tpc_analysetype;  (* 16B, analyse informationen*)
         pccobsect : tpc_cob_section;  (* 2B, Info, ueber die Sektion *)
                                       (* eines COBOL-Programms *)
         pcwhe     : tpc_whenevertype; (* 336B, whenever informationen*)
         pcwheset  : tsp00_Int2;         (* whenever true : set   *)
         pcwheno   : tsp00_Int2;         (* whenever nummer       *)
         pccse     : tpc_const_sec;    (* 8B, const section array   *)
         pccmcnt   : tsp00_Int2;         (* nested comment count  *)
         pclno     : tpc_lnorecord;    (* lno output record    *)
         sqlca     : sqlcatype;        (* 448B *)
         sqlxa     : sqlxatype;        (* 236B *)
         pcsymtab  : tpc_symtab;       (* 24B, general tpr_symbol table *)
         pcsqlva   : tpc_pc_sqlva;     (* 16B, general sqlva_areas tables *)
         pcdclgen  : tpc_dclgen;       (* 230B, param.struc. for incl.table *)
         pccics    : tpc_pc_cics ;     (* 44B, comnicat.between 1.and 2.pass*)
         pcusage   : tpc_pc_usage;     (* 40B, usage add record  *)
         pccmdpart : tpc_cmd_part;     (* 32776B, for analyse kommando *)
   END;
 
 
.CM *-END-* code ----------------------------------------
.SP 2 
***********************************************************
*-PRETTY-*  statements    :        906
*-PRETTY-*  lines of code :        906        PRETTYX 3.10 
*-PRETTY-*  lines in file :        997         1997-12-10 
.PA 
