Operating System - HP-UX
1753776 Members
7485 Online
108799 Solutions
New Discussion юеВ

Pass IN OUT variable parameter

 
la_cool
Occasional Advisor

Pass IN OUT variable parameter

Hi,

I'm executing the Shell script with IN OUT PARAMETERS, Im UNABLE TO return the values:

Here is the exectuion os shell script:

define sTicket='A456';

define sUtime=$Utime

execute sp_aloghistorydw2($Time,:sTicket,:sUtime);

$Ticket=:sTicket

$Utime=:sUtime

I'm getting "no value", when I expect to see the value in ":sTicket" and ":sUtime" variable.

Please shed some ideas on this ..




6 REPLIES 6
harry d brown jr
Honored Contributor

Re: Pass IN OUT variable parameter


WHat shell are you using?

what does sp_aloghistorydw2 do ??

live free or die
harry d brown jr
Live Free or Die
Jdamian
Respected Contributor

Re: Pass IN OUT variable parameter

Is it a Korn-shell script or a SQL script ?
A. Clay Stephenson
Acclaimed Contributor

Re: Pass IN OUT variable parameter

What shell is this? It's certainly not obvious to me.

One thing I notice is that you seem to be trying to change the value in a parent process by executing something as a child process -- that's never going to work in UNIX.
If it ain't broke, I can fix that.
A. Clay Stephenson
Acclaimed Contributor

Re: Pass IN OUT variable parameter

The more I look at this, it appears to be some sort of SQL script although you called it an OS shell script. You really need to identify the OS, Database, and scripting language.
If it ain't broke, I can fix that.
la_cool
Occasional Advisor

Re: Pass IN OUT variable parameter

I apologize for not sending the complete info.

The parent script is Shell script called using C shell.

Passing the parameter is for using Oracle SQL script .

Please see the attachment .
It has shell script calling .sql Script
A. Clay Stephenson
Acclaimed Contributor

Re: Pass IN OUT variable parameter

As I suspected you are trying to change the environment of a parent process (in this case variables) by actions of a child process. This will never work. You can have sqlplus write tyhe values to a file and then read the file for the values.
If it ain't broke, I can fix that.