Newbie - How to return variables from Oracle SQL script

Tools and several solutions to manage Control-M products
Post Reply
User avatar
Kenton
Nouveau
Nouveau
Posts: 15
Joined: 10 Oct 2008 12:00

Newbie - How to return variables from Oracle SQL script

Post by Kenton » 10 Oct 2008 3:53

Hi

PLEASE excuse the newbie question (I did search the forum but couldn't find the answer)

Desktop v 6.2.01.200

I need to assign 3 CTL-M variables gained from running an Oracle SQL script.
ie

Code: Select all

select var1,var2,var3 
         from mytable 
         where rownum = 1 
I assume I set these in the <%> Set tab, but how do I convert the output from the script to variables?

Thanks in advance

User avatar
Henk Trumpie
Nouveau
Nouveau
Posts: 22
Joined: 27 Jul 2007 12:00

Post by Henk Trumpie » 14 Oct 2008 11:47

In you rdesktop, run your statement on command line:
select %1 %2 %3 from table
In your set tab, first line PARM1 with the value, then second line PARM2 and thrid line PARM3

run your task...
Henk Trumpie
BMCS-SK-BMC Control-M for Distributed Systems Certified Skilled Professional.

User avatar
Kenton
Nouveau
Nouveau
Posts: 15
Joined: 10 Oct 2008 12:00

Post by Kenton » 14 Oct 2008 11:21

Thanks for that Henk.

Our system is such that we run a "wrapper" script from the desktop command that takes a SID and a sql script as a parameter and sets up all the oracle environment settings before running the script.

In this case I am calling a stored proc with out params.

As such, I cant pass the %1 %2 %3 into the script.

Is there another way?

User avatar
Henk Trumpie
Nouveau
Nouveau
Posts: 22
Joined: 27 Jul 2007 12:00

Post by Henk Trumpie » 17 Oct 2008 10:57

Hi Kenton,

If you want, please give me the wrappe around script that you have so I can have a look at it and see why you can not access parameter passing in that...

Henk Trumpie
Henk Trumpie
BMCS-SK-BMC Control-M for Distributed Systems Certified Skilled Professional.

User avatar
Kenton
Nouveau
Nouveau
Posts: 15
Joined: 10 Oct 2008 12:00

Post by Kenton » 21 Oct 2008 2:05

Thanks anyway.

We got it all sorted passing params.

I am surprised by the lack of activity on this forum though. :cry:

Post Reply