.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$VPR15$
.tt 2 $$$
.TT 3 $$SQLDB-Program-Options$2000-11-06$
***********************************************************
.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
.nf
.sp
MODULE  : SQLDB-Program-Options
=========
.sp
Purpose : Runtime routines options.
 
.CM *-END-* purpose -------------------------------------
.sp
.cp 3
Define  :
 
        PROCEDURE
              p15optionsget (VAR sqlca : sqlcatype);
 
        PROCEDURE
              p15noptionsget (VAR sqlca : sqlcatype);
 
.CM *-END-* define --------------------------------------
.sp;.cp 3
Use     :
 
        FROM
              SQL_runtime_routinen  : VPR01E;
 
        PROCEDURE
              p01xpidpos (VAR tracefn : tsp00_VFilename;
                    VAR pidpos  : tsp00_Int2);
 
        FUNCTION
              pr01eIsEmptyFileName(filename : tsp00_VFilename) : boolean;
 
      ------------------------------ 
 
        FROM
              SQLDB-Auftrags-Schnittstelle   : VPR03;
 
        PROCEDURE
              p03encrypt (VAR pw : tsp00_Pw;
                    VAR crypt : tsp00_CryptPw);
 
      ------------------------------ 
 
        FROM
              C-Type-Checker-Module  : VPR102;
 
        PROCEDURE
              p03cseterror (sqlemp : sqlempointer;
                    error : tpr_runtime_errors);
&       ifdef TRACE
 
        PROCEDURE
              m90init;
 
        PROCEDURE
              m90setswitch_parms ( protokoll : boolean;
                    trace_schichten : tsp00_C20;
                    test_schichten : tsp00_C20 );
 
        PROCEDURE
              m90int2 (layer : tsp00_ToolLayer;
                    nam : tsp00_Sname;
                    int : tsp00_Int2);
 
        PROCEDURE
              m90int (layer : tsp00_ToolLayer;
                    nam : tsp00_Sname;
                    int : integer);
 
        PROCEDURE
              m90name  (layer : tsp00_ToolLayer;
                    nam : tsp00_Name);
 
        PROCEDURE
              m90hostname  (layer : tsp00_ToolLayer;
                    nam : tsp00_Sname;
                    h : tpr_hostname);
 
        PROCEDURE
              m90buf1 (layer : tsp00_ToolLayer;
                    VAR buf :  char;
                    pos_anf : integer;
                    pos_end : integer);
 
        PROCEDURE
              m90buf2 (layer : tsp00_ToolLayer;
                    VAR buf :  tsp4_xuserset;
                    pos_anf : integer;
                    pos_end : integer);
&       endif
 
      ------------------------------ 
 
        FROM
              Kernel_move_and_fill   : VGG101;
 
        PROCEDURE
              SAPDB_PascalForcedMove (
                    source_upb  : tsp00_Int4;
                    destin_upb  : tsp00_Int4;
                    source      : tsp00_MoveObjPtr;
                    source_pos  : tsp00_Int4;
                    destin      : tsp00_MoveObjPtr;
                    destin_pos  : tsp00_Int4;
                    length      : tsp00_Int4);
 
        PROCEDURE
              s10mv (
                    source_upb  : tsp00_Int4;       
                    destin_upb  : tsp00_Int4;
                    source      : tsp00_MoveObjPtr;    
                    source_pos  : tsp00_Int4;
                    destin      : tsp00_MoveObjPtr;    
                    destin_pos  : tsp00_Int4;
                    length      : tsp00_Int4);
 
      ------------------------------ 
 
        FROM
              RTE_driver       : VEN102;
 
        PROCEDURE
              sqlSetOptionEncodingUTF8 (isUTF8encoded : boolean);
 
        PROCEDURE
              sqlarg3 (VAR user_params : tsp4_xuser_record ;
                    VAR password : tsp00_Pw ;
                    VAR options     : tsp4_args_options ;
                    VAR xusertype   : tsp4_xuserset;
                    VAR errtext     : tsp00_ErrText;
                    VAR ok          : boolean);
&       ifdef SQLODBC
 
      ------------------------------ 
 
        FROM
              COMUNICATION WITH ORDER INTERFACE   : VPA01C;
 
        PROCEDURE
              pa01sqlarg3 (VAR user_params : tsp4_xuser_record ;
                    VAR password : tsp00_Pw ;
                    VAR options     : tsp4_args_options ;
                    VAR xusertype   : tsp4_xuserset;
                    VAR errtext     : tsp00_ErrText;
                    VAR ok          : boolean);
&       endif
 
.CM *-END-* use -----------------------------------------
.sp;.cp 3
Synonym :
 
        PROCEDURE
              sqlarg3;
 
              tsp00_Pw          tsp00_Pw
              tsp00_ErrText     tsp00_ErrText
 
        PROCEDURE
              m90hostname;
 
              tsp00_VFilename   tpr_hostname
 
        PROCEDURE
              p03encrypt;
 
              tsp00_Name      tsp00_Pw
              tsp00_CryptName tsp00_CryptPw
 
        PROCEDURE
              m90buf;
 
              tsp00_Buf   tsp_varpart
 
        PROCEDURE
              m90buf1;
 
              tsp00_Buf   char
 
        PROCEDURE
              m90buf2;
 
              tsp00_Buf           tsp4_xuserset
 
.CM *-END-* synonym -------------------------------------
.sp;.cp 3
Author  :
.sp
.cp 3
Created : 1986-04-07
.sp
.cp 3
.sp
.cp 3
Release :      Date : 2000-11-06
.sp
***********************************************************
.sp
.cp 10
.fo
.oc _/1
Specification:
.sp 2
.cp 6
PROCEDURE
      p15optionsget:
.sp 2
Fetches the runtime options from sqlarg3.
Analyzes the options. Unknown options do not generate an error,
they are written into sqlca.sqlargl.
Options override anything specified in the program.
.sp
.nf
The following options are recognized:
The default Values are :
.sp 2
.nf
 
    sql_all_component :
                               |     VM-Syntax                |  default
 ------------------------------|------------------------------|--------------
                               | USER ( <username>,<password> |
                               |  <serverdb> , <servernode> ) |
        fuer dialog, query     | RUN  ( <run-input filename> )|
        fuer dialog, query     | BATCH (  <batch filename>  ) |
                               | ISOLEV ( <isolation level> ) |   = -1
                               | TIMEOUT ( <timeout> )        |   = 0
 
 
.cp 20
    sql_pc_runtime  :
                               |    VM-Syntax                 |  default
 ------------------------------|------------------------------|--------------
   opt_rtracefile    : c64;    |  TRACEF ( <trace file name> )|   blankfn
   xu_isolation      : int2;   |  ISOLEV   ( <level>   )      |    = -1
   xu_cachlimit      : int4;   |                              |    = -1
   xu_sqlmode        : c18;    |  not used                    |
   xu_timeout        : int2;   |  TIMEOUT  ( <timeout> )      |    = 0
   opt_rtrace        : int2;   |  TRACE    ::= 2              |    = 0
                               |  TRACEL   ::= 3              |
                               |  TROHNE   ::= 4              |
   opt_rprof         : int2;   |  PROFILE  ::= 1              |    = 0
                               |  PROFPCR  ::= 2              |
   opt_rmfetch       : int2;   |  MFETCH ( <anz> )            |    = 1
                               |           :: <anz>  (0..18)  |
   opt_rfiller       : int2;   |        empty                 |    = 0
   opt_rnotracetime  : boolean;|  NODATE   *******neu 27.11.90|    false
   opt_rtraceswitch  : boolean;|  TRACESW                     |    false
   opt_rnosdf        : boolean;|  NOSDF    ****neu 18.3.91    |    false
   opt_rfiller1      : boolean;|        empty                 |    false
   opt_ruser_args    : argline;|                              |
 
 
.cp 20
    sql_pc_runtime  :
                               |  UNIX-Syntax                 |  default
 ------------------------------|------------------------------|--------------
   opt_rtracefile    : c64;    |  -F   <trace file name>      |   blankfn
   xu_isolation      : int2;   |  -I   <isolation level>      |    = -1
   xu_cachlimit      : int4;   |  option entf?allt            |    = -1
   xu_sqlmode        : c18;    |  not used                    |
   xu_timeout        : int2;   |  -t     <timeout>            |    = 0
   opt_rtrace        : int2;   |  -T       ::= 2              |    = 0
                               |  -X       ::= 3              |
                               |  -O       ::= 4              |
   opt_rprof         : int2;   |  -R       ::= 1              |    = 0
                               |  -Z       ::= 2              |
   opt_rmfetch       : int2;   |  -B <anz> :: <anz>  (0..18)  |    = 1
   opt_rfiller       : int2;   |        empty                 |    = 0
   opt_rnotracetime  : boolean;|  -N                          |    false
   opt_rtraceswitch  : boolean;|  -W                          |    false
   opt_rnosdf        : boolean;|  -f       ****neu 18.3.91    |    false
   opt_rfiller1      : boolean;|        empty                 |    false
   opt_ruser_args    : argline;|                              |
 
 
.sp 4
.CM *-END-* specification -------------------------------
.sp 2
***********************************************************
.sp
.cp 10
.fo
.oc _/1
Description:
.sp 2
PROCEDURE p15optionsget:
.sp 2
Vor diesem Aufruf wurden alle Angaben aus der XUSER-Datei in die
 sqlgap^.gaentry eingelesen, so dass eine Vorbelegung der sqlgap^ schon
gegeben ist.
.sp 2
sqlarg3  :  xusertype  returncode
 
  -u         sql_userparms
  -x PROMPT  sql_usermask
  -x  ...    sql_userkey
   sonst     sql_userdefault
 
Defaultbelegung :
   user, password, serverdb und servernode = blank
 dh. bei sqluserparms noch Abfrage auf serverdb und servernode = blank
und dann DEFAULT user aufrufen.
 
sqlgetuser liefert aus ENV. serverdb und servernode, wenn Xuser-Datei
nicht vorhanden und not ok.
 
.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    :
 
 
(*------------------------------*) 
 
PROCEDURE
      p15optionsget (VAR sqlca : sqlcatype);
 
VAR
      password   : tsp00_Name;
      options    : tsp4_args_options;
      xuserset   : tsp4_xuserset;
      userkey    : boolean ;
      errtext    : tsp00_ErrText;
      ok         : boolean;
      optdb      : boolean;
      pidpos     : tsp00_Int2;
 
BEGIN
WITH sqlca, sqlrap^, sqlgap^, gaentry [1]^,
     sqloap^, rasqltap^,  gaopxuserrec, options  DO
    BEGIN
&   ifdef TRACE
    m90init;
    m90setswitch_parms (true, 'PC FC IN QU SP DG WB',
          'PC FC IN QU SP DG WB');
    m90int(pc,'sqlcabc     ',sqlca.sqlcabc);
    m90int2(pc,'rasqlos     ',ord(rasqlos));
    m90int2(pc,'ralang      ',ralang);
&   endif
    raactsession := 1;
    tatraceno := 0;
    tatracety := cpr_trace_empty;
    gasqlconntyp := cpr_ci_implicit;
    gauseropset    := cpr_is_false;
    gadbcodeset    := 0;
    oanosdf        := cpr_is_false;
    ranotrtimeoutp := cpr_is_false;
    raopprof       := cpr_is_false;
    oapidflag      := 0;
    oapid          := 0;  (** pid**)
    oamaxsec       := 0;      (* trace max sec command option *)
    tamaxsecno     := 0;      (* trace max sec file no = 0    *)
    oamaxtrstm     := 0;      (* trace zyklisch max   statem option *)
    tacnttrstm    := 0;       (* trace zyklisch count statem option *)
    opt_component := sp4co_sql_pc_runtime;
    optdb         := false;
    userkey       := false;
    ok            := true;
&   ifdef TRACE
    m90name (pc,'xu_dblang         ');
    m90buf1 (pc, xu_dblang[1], 1, 64);
&   endif
&   ifdef SQLODBC /* PTS 1104559 */
    pa01sqlarg3 (gaopxuserrec, password, options,
          xuserset, errtext, ok);
&   else
    sqlSetOptionEncodingUTF8 (true);
    sqlarg3 (gaopxuserrec, password, options,
          xuserset, errtext, ok);
&   endif
&   ifdef TRACE
    m90name (pc,'xu_dblang         ');
    m90buf1 (pc, xu_dblang[1], 1, 64);
    m90int2 (pc,'ok   nach   ',ord (ok ) );
    m90buf2 (pc, xuserset , 1, 2  );
    m90buf1 (pc, xu_user [1], 1, 64);
    m90buf1 (pc, password [1], 1, 18);
    m90buf1 (pc, xu_serverdb[1], 1, 18);
    m90hostname  (pc, 'servernod   ', xu_servernode);
    m90buf1 (pc, errtext [1], 1, 20);
&   endif
    userkey := sp4xu_sql_userkey IN xuserset ;
    IF  ok
    THEN
        BEGIN
        IF  userkey OR (sp4xu_sql_userparms IN xuserset)
        THEN
            BEGIN
            IF  NOT userkey
            THEN
                BEGIN
                IF  (gaopxuserrec.xu_user <> bsp_knl_identifier)
                THEN
                    p03encrypt (password, xu_password)
                ELSE
                    p03encrypt (password, xu_passwordUCS2);
                (*ENDIF*) 
                END;
            (*ENDIF*) 
            gauseropset:= cpr_is_true;
            END
        ELSE
            BEGIN
            xu_user := bsp_knl_identifier;
            xu_userUCS2[1] := ' ';
            xu_userUCS2[2] := '\0';
            END;
        (*ENDIF*) 
        IF  userkey OR (sp4xu_sql_serverdb   IN xuserset)
        THEN
            BEGIN
            gauseropset  := cpr_is_true;
            END
        ELSE
            xu_serverdb  := bsp_dbname;
        (*ENDIF*) 
        IF  userkey OR (sp4xu_sql_dblang   IN xuserset)
        THEN
            BEGIN
            gauseropset  := cpr_is_true;
            END
        ELSE
            xu_dblang  := bsp_knl_identifier;
        (*ENDIF*) 
        (***        IF  userkey OR (sp4xu_sql_cachelimit  IN xuserset)
              THEN
              gauseropset := cpr_is_true
              ELSE  ***)
        xu_cachelimit := -1;
        IF  userkey OR (sp4xu_sql_timeout    IN xuserset)
        THEN
            gauseropset := cpr_is_true
        ELSE
            xu_timeout := -1;
        (*ENDIF*) 
        IF    sp4xu_sql_userkey IN xuserset
        THEN
            BEGIN
&           ifdef TRACE
            m90buf1 (pc, xu_key [1], 1, 18);
&           endif
            gauseropset  := cpr_is_true;
            END
        ELSE
            xu_key       := bsp_c18;
        (*ENDIF*) 
        IF    sp4xu_sql_userparms IN xuserset
        THEN
            BEGIN
            gauseropset  := cpr_is_true;
            END;
        (*ENDIF*) 
        IF  gauseropset  = cpr_is_true
        THEN
            gasqlconntyp := cpr_ci_program;
        (*ENDIF*) 
        IF    sp4xu_sql_params IN xuserset
        THEN
            sqlargl     := opt_ruser_args;
        (*ENDIF*) 
        IF  pr01eIsEmptyFileName(tatracefn)
        THEN
            tatracefn  := opt_rtracefile;
        (*ENDIF*) 
        tatracety  := opt_rtrace;
        p01xpidpos (tatracefn, pidpos);
        IF  pidpos > 0
        THEN
            BEGIN
            oapidflag := pidpos;
            IF  tatracety = cpr_trace_empty
            THEN
                tatracety  := cpr_trace_off;
            (*ENDIF*) 
            END
        ELSE
            IF  NOT pr01eIsEmptyFileName(tatracefn)
            THEN
                BEGIN
                oapidflag := - 1;
                (*IF  tatracety = cpr_trace_empty
                      THEN
                      tatracety  := cpr_trace_formal;*)
                END;
            (*ENDIF*) 
        (*ENDIF*) 
        oamaxtrstm := opt_rstmt_cnt;  (* trace zykl.max statem option *)
        IF  oamaxtrstm > 0
        THEN
            BEGIN
            (* default -X und time ausgabe *)
            IF  opt_rnotracetime
            THEN
                opt_rnotracetime := false;
            (*ENDIF*) 
            IF  tatracety  = 0
            THEN
                tatracety  := cpr_trace_long;
            (*ENDIF*) 
            END;
        (*ENDIF*) 
        oamaxsec  := opt_rtime_limit;
        IF  oamaxsec  > 0
        THEN
            BEGIN
            (* default -X und time ausgabe *)
            (*  -Y 0 setzen, nicht zyklisch schreiben *)
            oamaxtrstm := 0;
            IF  opt_rnotracetime
            THEN
                opt_rnotracetime := false;
            (*ENDIF*) 
            IF  tatracety  = 0
            THEN
                tatracety  := cpr_trace_long;
            (*ENDIF*) 
            END;
        (*ENDIF*) 
        gaxuserrec.xu_sqlmode := xu_sqlmode ;
        IF  opt_rprof  = 1
        THEN
            raopprof := cpr_is_true
        ELSE
            IF  opt_rprof  = 2
            THEN
                raopprof := cpr_is_only_pc;
            (*ENDIF*) 
        (*ENDIF*) 
        IF  userkey OR (sp4xu_sql_isolation  IN xuserset)
        THEN
            BEGIN
            gasqlconntyp := cpr_ci_program;
            gauseropset  := cpr_is_true;
            IF  xu_isolation <> cpr_lo_empty
            THEN
                IF  NOT (xu_isolation in [cpr_lo_isolev0, cpr_lo_isolev9,
                    cpr_lo_isolev1, cpr_lo_isolev2, cpr_lo_isolev3,
                    cpr_lo_isolev4,
                    cpr_lo_isolev10, cpr_lo_isolev15, cpr_lo_isolev20,
                    cpr_lo_isolev30])
                THEN
                    p03cseterror (sqlemp, cpr_paramlist_wrong);
                (*ENDIF*) 
            (*ENDIF*) 
            END
        ELSE
            xu_isolation := cpr_lo_empty;
        (*ENDIF*) 
        IF  opt_rnosdf
        THEN
            oanosdf  := cpr_is_true;
        (*ENDIF*) 
        IF  opt_rnotracetime
        THEN
            ranotrtimeoutp    := cpr_is_true;
        (*ENDIF*) 
        IF  (sqlmfetch = 1)
        THEN
            (* call interface immer = 18 init *)
            IF  (opt_rmfetch >= 0)
                AND  (opt_rmfetch <= mxpr_mfetchbuffer)
            THEN
                sqlmfetch := opt_rmfetch
            ELSE
                p03cseterror (sqlemp, cpr_paramlist_wrong);
            (*ENDIF*) 
&       ifdef TRACE
        (*ENDIF*) 
        m90int2 (pc,'xu_isol(par)', xu_isolation );
        m90int2 (pc,'actual_sess ',raactsession);
        m90int2 (pc,'xu_isolat(1)',gaxuserrec.xu_isolation);
        m90int2 (pc,'xuopisolatio',xu_isolation);
        m90int2 (pc,'xu_timeout  ',xu_timeout);
        m90int2 (pc,'raoppof     ',raopprof );
        m90int2 (pc,'sqlmfetch   ',sqlmfetch );
        m90int2 (pc,'gaopmax_trst', oamaxtrstm);
        m90int2 (pc,'oamaxsec    ', oamaxsec);
        m90int2 (pc,'tatracety   ',tatracety);
        m90int2 (pc,'ranotrtimeou',ranotrtimeoutp);
        m90buf1 (pc, gaxuserrec.xu_user[1], 1, 64);
        m90buf1 (pc, xu_user[1], 1, 64);
        m90buf1 (pc, xu_key [1], 1, 64);
        m90buf1 (pc, gaxuserrec.xu_serverdb[1], 1, 18);
        m90hostname  (pc, 'ga_severnode', gaxuserrec.xu_servernode);
        m90hostname  (pc, 'tatracefn   ', tatracefn);
        m90buf1 (pc, sqlargl[1], 1, sizeof(sqlargl));
&       endif
        END
    ELSE
        BEGIN
        (* error handling *)
        p03cseterror (sqlemp, cpr_paramlist_wrong);
        s10mv (ERRTEXT_MXSP00, mxsp_c70, @errtext, 1,
              @sqlca.sqlerrmc, 30, mxsp_c40);
        sqlca.sqlerrml := mxsp_c70;
        END;
    (*ENDIF*) 
    END;
(*ENDWITH*) 
END;
 
(*------------------------------*) 
 
PROCEDURE
      p15noptionsget (VAR sqlca : sqlcatype);
 
VAR
      password   : tsp00_Name;
      options    : tsp4_args_options;
      xuserset   : tsp4_xuserset;
      userkey    : boolean ;
      errtext    : tsp00_ErrText;
      ok         : boolean;
 
BEGIN
WITH sqlca, sqlrap^, sqlgap^, gaentry [1]^,
     sqloap^, rasqltap^,  gaopxuserrec, options  DO
    BEGIN
    raactsession := 1;
    opt_component := sp4co_sql_pc_runtime;
    ok            := true;
    sqlarg3 (gaopxuserrec, password, options,
          xuserset, errtext, ok);
&   ifdef TRACE
    m90int2 (pc,'ok          ',ord (ok ) );
    m90buf1 (pc, xu_user [1], 1, 64);
    m90buf1 (pc, password [1], 1, 18);
    m90buf1 (pc, xu_serverdb[1], 1, 18);
    m90hostname  (pc, 'servernod   ', xu_servernode);
    m90buf1 (pc, errtext [1], 1, 20);
&   endif
    userkey := sp4xu_sql_userkey IN xuserset ;
    IF  ok
    THEN
        BEGIN
        IF  userkey OR (sp4xu_sql_userparms IN xuserset)
        THEN
            BEGIN
            IF  NOT userkey
            THEN
                p03encrypt (password, xu_password);
            (*ENDIF*) 
            gauseropset:= cpr_is_true;
            END;
        (*ENDIF*) 
        IF  userkey OR (sp4xu_sql_servernode IN xuserset)
        THEN
            BEGIN
            gauseropset    := cpr_is_true;
            END;
        (*ENDIF*) 
        IF  userkey OR (sp4xu_sql_serverdb   IN xuserset)
        THEN
            BEGIN
            gauseropset  := cpr_is_true;
            END;
        (*ENDIF*) 
        IF  userkey OR (sp4xu_sql_dblang   IN xuserset)
        THEN
            BEGIN
            gauseropset  := cpr_is_true;
            END;
        (***        IF  userkey OR (sp4xu_sql_cachelimit  IN xuserset)
              THEN
              gauseropset := cpr_is_true
              ELSE
              ***)
        (*ENDIF*) 
        xu_cachelimit := -1;
        IF  userkey OR (sp4xu_sql_timeout    IN xuserset)
        THEN
            gauseropset := cpr_is_true
        ELSE
            xu_timeout := -1;
        (*ENDIF*) 
        IF    sp4xu_sql_userkey IN xuserset
        THEN
            BEGIN
&           ifdef TRACE
            m90buf1 (pc, xu_key [1], 1, 18);
&           endif
            gauseropset  := cpr_is_true;
            END;
        (*ENDIF*) 
        IF    sp4xu_sql_userparms IN xuserset
        THEN
            BEGIN
            gauseropset  := cpr_is_true;
            END;
        (*ENDIF*) 
        IF  gauseropset  = cpr_is_true
        THEN
            gasqlconntyp := cpr_ci_program;
        (*ENDIF*) 
        IF    sp4xu_sql_params IN xuserset
        THEN
            sqlargl     := opt_ruser_args;
        (*ENDIF*) 
        gaxuserrec.xu_sqlmode := xu_sqlmode ;
        IF  userkey OR (sp4xu_sql_isolation  IN xuserset)
        THEN
            BEGIN
            gasqlconntyp := cpr_ci_program;
            gauseropset  := cpr_is_true;
            IF  xu_isolation <> cpr_lo_empty
            THEN
                IF  NOT (xu_isolation in [cpr_lo_isolev0, cpr_lo_isolev9,
                    cpr_lo_isolev1, cpr_lo_isolev2, cpr_lo_isolev3,
                    cpr_lo_isolev4,
                    cpr_lo_isolev10, cpr_lo_isolev15, cpr_lo_isolev20,
                    cpr_lo_isolev30])
                THEN
                    p03cseterror (sqlemp, cpr_paramlist_wrong);
                (*ENDIF*) 
            (*ENDIF*) 
            END
        ELSE
            xu_isolation := cpr_lo_empty;
        (*ENDIF*) 
        IF  (sqlmfetch = 1)
        THEN
            (* call interface immer = 18 init *)
            IF  (opt_rmfetch >= 0)
                AND  (opt_rmfetch <= mxpr_mfetchbuffer)
            THEN
                sqlmfetch := opt_rmfetch
            ELSE
                p03cseterror (sqlemp, cpr_paramlist_wrong);
            (*ENDIF*) 
&       ifdef TRACE
        (*ENDIF*) 
        m90int2 (pc,'xu_isol(par)', xu_isolation );
        m90int2 (pc,'actual_sess ',raactsession);
        m90int2 (pc,'xu_isolat(1)',gaxuserrec.xu_isolation);
        m90int2 (pc,'xuopisolatio',xu_isolation);
        m90int2 (pc,'xu_timeout  ',xu_timeout);
        m90int2 (pc,'raoppof     ',raopprof );
        m90int2 (pc,'sqlmfetch   ',sqlmfetch );
        m90int2 (pc,'gaopmax_trst', oamaxtrstm);
        m90int2 (pc,'oamaxsec    ', oamaxsec);
        m90int2 (pc,'tatracety   ',tatracety);
        m90int2 (pc,'ranotrtimeou',ranotrtimeoutp);
        m90buf1 (pc, gaxuserrec.xu_user[1], 1, 64);
        m90buf1 (pc, xu_user[1], 1, 64);
        m90buf1 (pc, xu_key [1], 1, 64);
        m90buf1 (pc, gaxuserrec.xu_serverdb[1], 1, 18);
        m90hostname  (pc, 'ga_severnode', gaxuserrec.xu_servernode);
        m90hostname  (pc, 'tatracefn   ', tatracefn);
        m90buf1 (pc, sqlargl[1], 1, sizeof(sqlargl));
&       endif
        END
    ELSE
        BEGIN
        (* error handling *)
        p03cseterror (sqlemp, cpr_paramlist_wrong);
        s10mv (ERRTEXT_MXSP00, mxsp_c70, @errtext, 1,
              @sqlca.sqlerrmc, 30, mxsp_c40);
        sqlca.sqlerrml := mxsp_c70;
        END;
    (*ENDIF*) 
    END;
(*ENDWITH*) 
END;
 
.CM *-END-* code ----------------------------------------
.SP 2 
***********************************************************
.PA 
