Execute stored procedure without input link

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

I hope so, seeing as I'd already spelled that out.

1. Automatic.
2. Automatic.
-craig

"You can never have too many knives" -- Logan Nine Fingers
aasaif
Participant
Posts: 98
Joined: Fri Sep 19, 2008 9:12 am

Post by aasaif »

Yes i tried that someone chulett earlier i must have not seen something earlier but it works.

So is the only way to run the rest of the job after i insert the entry into the job log is to connect the stored procedure stage to a transformer and then output the transformer to the rest of the job?

Also at the end of the job how do i maintain the flow to insert one row into the job entry table that the job complete
aasaif
Participant
Posts: 98
Joined: Fri Sep 19, 2008 9:12 am

Post by aasaif »

Yes i tried that chulett recommended it earlier i must have not seen something earlier but it works.

So is the only way to run the rest of the job after i insert the entry into the job log is to connect the stored procedure stage to a transformer and then output the transformer to the rest of the job?

Also at the end of the job how do i maintain the flow to insert one row into the job entry table that the job complete
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Rather than pulling teeth, why not lay out all that you needed to do from the beginning? Yes, link everything together and the row should flow through each stage.
-craig

"You can never have too many knives" -- Logan Nine Fingers
dslisa
Participant
Posts: 24
Joined: Mon Oct 27, 2008 6:48 pm

Post by dslisa »

Aasif, are you trying to use output from Stored Proc 1 as input for Stored Proc 2?
aasaif
Participant
Posts: 98
Joined: Fri Sep 19, 2008 9:12 am

Post by aasaif »

nope they having nothing to do with each other this is the flow basically
job paramters set to a stored procudure (insert into a job log job started)
then i have sequential file passed into a stored procedure
last i insert a row stating job completed of if i have any rows rejected jobs completed with errors.

So ill just connect it with the transformer to the other job with a dummy input and output row.

Then ill figure out how i insert a row into the job log at the end because i dont want that process being called at the row level
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Since you're only passing one row through, then that row equals "the end" does it not? Otherwise, consider doing it "after job", which means a routine or a script.
-craig

"You can never have too many knives" -- Logan Nine Fingers
aasaif
Participant
Posts: 98
Joined: Fri Sep 19, 2008 9:12 am

Post by aasaif »

one row is loaded into the job log
however then i load thousands of rows in an etl job then i would like to insert one row into the job complete after those rows are loaded
So i guess your saying i have to build a routine.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Or run a link to an Aggregator set to 'Last', it will send a single row back out after the final row has been processed.
-craig

"You can never have too many knives" -- Logan Nine Fingers
aasaif
Participant
Posts: 98
Joined: Fri Sep 19, 2008 9:12 am

Post by aasaif »

i like that idea. I will try it
aasaif
Participant
Posts: 98
Joined: Fri Sep 19, 2008 9:12 am

Post by aasaif »

i like that idea. I will try it
aasaif
Participant
Posts: 98
Joined: Fri Sep 19, 2008 9:12 am

Post by aasaif »

Can you give me a little more detail on how this is done.

So after my stored procedure i send a link to a transformer which will be done on each row however then in the transformer i send a link to the aggregator stage .

Where in this stage does it allow you to specify last row i dont see it?
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

It's one of the derivations on the output columns that you don't group by. Put a dummy column for the Aggregator, then in the following transformer include the fields you need. That or run them through the Aggregator.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply