Anonymous PL/SQL Block

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

Post Reply
jerome_rajan
Premium Member
Premium Member
Posts: 376
Joined: Sat Jan 07, 2012 12:25 pm
Location: Piscataway

Anonymous PL/SQL Block

Post by jerome_rajan »

Hi,

What is the best way to execute an anonymous PL/SQL block in a server job? Though the logic within this block can be implemented in a job, we are trying to minimize the number of stages to touch to reduce the re-wiring required since this is an existing job.

I tried to do it in the after sql in the Oracle stage but it couldn't read beyond
BEGIN..
Not sure what I should do with the stored procedure stage to execute an anonymous block.

Help appreciated. Thanks
Jerome
Data Integration Consultant at AWS
Connect With Me On LinkedIn

Life is really simple, but we insist on making it complicated.
jerome_rajan
Premium Member
Premium Member
Posts: 376
Joined: Sat Jan 07, 2012 12:25 pm
Location: Piscataway

Post by jerome_rajan »

Got it. It can be done using a Stored Procedure stage. But if the anonymous block has a declare section, then the block should be wrapped within another block of

Code: Select all

BEGIN
DECLARE
..
BEGIN
...
END;
END;
For posterity :D
Jerome
Data Integration Consultant at AWS
Connect With Me On LinkedIn

Life is really simple, but we insist on making it complicated.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

8)
-craig

"You can never have too many knives" -- Logan Nine Fingers
rameshrr3
Premium Member
Premium Member
Posts: 609
Joined: Mon May 10, 2004 3:32 am
Location: BRENTWOOD, TN

Post by rameshrr3 »

Are you trying to use it as a source or transform ? Are you using teh stored proc stage to process dat aon an input link and forward row data to an output link ? Just curious.
Post Reply