zOs/SQL/STPR

$>.fEdit('~wk.texv(out)')
$<=[
set current sqlid = 's100447' ;
   drop   procedure A540769.P1;
   drop   procedure A540769.P2;
   drop   procedure A540769.P22;
   drop   procedure A540769.P3;
   drop   procedure A540769.P4;
commit;
terminator    } ;
create procedure A540769.P1(in fnd varchar(100), in src varchar(100),
                            out  cnt int)
        deterministic contains sql
    begin
    set cnt = length(strip(fnd)) + length(strip(src));
    end
}
create procedure A540769.P2(in fnd varchar(100), in src varchar(100),
            out cnt int,    out  dat date)
        deterministic contains sql
    begin
    declare cnt int;
    call A540769.P1(fnd, src, cnt);
    set dat = '01.04.1956';
    end
}
create procedure A540769.P22(in ci varchar(100), out co varchar(200))
        deterministic contains sql
    begin
    set co = 'abc def ci=<' || strip(ci) || '>' ;
    end
}
create procedure A540769.P3(out ve char(4))
        version v1 deterministic contains sql
    set ve = 'p3V1'
}
alter  procedure A540769.P3 add version v2 (out ve char(4))
                   deterministic contains sql
    set ve = 'p3V2'
}
create procedure A540769.P4(in ci varchar(100), out da date,
                            out ve varchar(100))
        version v1
        deterministic contains sql
    begin
    set da = current date + 1 day;
    call A540769.P3(ve);
    set ve = 'p4 v1 - curr=''' || current routine version|| ''', '||ve;

    end
}
alter  procedure A540769.P4 add version v2
        (in ci varchar(100), out da date,
                            out ve varchar(100))
        deterministic contains sql
    begin
    set da = current date + 2 day;
    call A540769.P3(ve);
    set ve = 'p4 v2 - curr=''' || current routine version||''', '||ve;
    end
}
alter  procedure A540769.P4 add version v3
        (in ci varchar(100), out da date,
                            out ve varchar(100))
        deterministic contains sql
    begin
    set da = current date + 3 day;
    call A540769.P3(ve);
    set ve = 'p4 v3 - curr=''' || current routine version || ''', '||ve;
    end
}
terminator ; }
$=eins=wie geht es dir?
call A540769.P4(wie geht es Dir Konstäntchen?   oder   , :res,);
set current routine version v1;
call A540769.P4(wie geht es Dir v1?   , :res,);
set current routine version v2;
call A540769.P4(wie geht es Dir v2?   , :res,);
set current routine version v3;
call A540769.P4(wie geht es Dir v3?   , :res,);
set current routine version = '';
call A540769.P4(wie geht es Dir v empty?   , :res,);
alter  procedure A540769.P4 activate version v3;
call A540769.P4(wie geht es Dir Konstäntchen?   oder   , :res,);
set current routine version v1;
call A540769.P4(wie geht es Dir v1?   , :res,);
set current routine version v2;
call A540769.P4(wie geht es Dir v2?   , :res,);
set current routine version v3;
call A540769.P4(wie geht es Dir v3?   , :res,);
set current routine version = '';
call A540769.P4(wie geht es Dir v empty?   , :res,);
alter  procedure A540769.P4 activate version v2;
call A540769.P4(wie geht es Dir Konstäntchen?   oder   , :res,);
set current routine version v1;
call A540769.P4(wie geht es Dir v1?   , :res,);
set current routine version v2;
call A540769.P4(wie geht es Dir v2?   , :res,);
set current routine version v3;
call A540769.P4(wie geht es Dir v3?   , :res,);
set current routine version = '';
call A540769.P4(wie geht es Dir v empty?   , :res,);
set current routine version = 'V9';
call A540769.P4(wie geht es Dir v empty?   , :res,);
--call A540769.P1(?, ?, ?);
--call A540769.P1(WIE geht es dir konstante? , :zwei, :res);
rollback;
$] call sqlStmtsOpt
$#out                                              20110725 16:36:00
$#out                                              20110725 16:28:47
$#out                                              20110524 16:54:03
$#out                                              20110524 16:53:44
*** run error sqlCode -204 A540769.P22 IS AN UNDEFINED NAME
warnings
state 42704
stmt =  execSql drop   procedure A540769.P22
$#out                                              20110524 16:53:31
*** run error sqlCode -204 A540769.P1 IS AN UNDEFINED NAME
warnings
state 42704
stmt =  execSql drop   procedure A540769.P1
$#out                                              20110524 16:52:58
*** run error sqlCode -204 A540769.P3 IS AN UNDEFINED NAME
warnings
state 42704
stmt =  execSql drop   procedure A540769.P3
$#out                                              20110524 16:52:41
*** run error sqlCode -601 THE NAME (VERSION OR VOLUME SERIAL NUMBER) OF THE OBJ
warnings
state 42710
stmt =  execSql create procedure A540769.P22(in ci varchar(100), out co varchar(
$#out                                              20110524 16:51:49
*** run error sqlCode -713 THE REPLACEMENT VALUE FOR CURRENT ROUTINE VERSION IS
warnings
state 42815
stmt =  execSql execute immediate :ggSrc
with ggSrc = set current routine version = 'v9'
$#out                                              20110524 16:47:57
$#out                                              20110524 16:45:38
$#out                                              20110524 15:37:55
$#out                                              20110524 15:33:45