I can do:
...
orasql $cursor \
"call part_state( :identnumber, :machine) into :state" \
-parseonly
orabinexec $cursor :identnumber 123456 :machine 000050 :state ""
...
or:
...
set plsql {BEGIN
:state := part_state( :identnumber, :machine);
END;
}
oraplexec $cursor $plsql :state "" :identnumber 123456 :machine 000050
...
perfectly well (the function works as supposed).
However, I did not find a way out for the result value (bind variable
:state), which should end up in a Tcl variable ...
Best regards
Manfred Frey
In Oratcl 4.3 you would do it this way.
set plsql {BEGIN
:state := part_state( :identnumber, :machine);
END;
}
set lda [oralogon ... ]
set cur [oraopen $lda]
oraparse $cur $plsql
orabind $cur :state "" :identnumber 123456 :machine 000050
oraexec $cur
if ([orafetch $cur -dataarray params] == 0]} {
puts $params(:state)
}
oraclose $cur
oralogoff $lda
To be honest Manfred I have not used Oratcl 3.3 in so long that I don't
remember the exact syntax, But I do remember that you need an orafetch
.
but it will probably be something like this:
orafetch $cursor {puts @1}
-Todd