Capture PL/SQL anonymous block data and write to a flat file

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
sgubba
Participant
Posts: 30
Joined: Wed Apr 16, 2008 11:06 am

Capture PL/SQL anonymous block data and write to a flat file

Post by sgubba »

I have a table where i store queries
my job is to read the table and execute the query and write the output to a flat file
for that i have a PL/SQL anonymous block that reads the table and execute the query using EXECUTE IMMEDIATE
I am able to run the PL/SQL anonymous block from connector stage but not able to collect the result and write to a file

I know there is a different approach where we can write the query to a flat file ..read the flat file and send the value as parameter in another datastage job

I am trying to know if we can capture the output of PL/SQL anonymous block when using connector stage and Read mode as PL/SQL

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

Post by chulett »

You certainly can. Have you been through Chapter 6 of the Connectivity Guide for Oracle Databases pdf? There's lots of information there on using PL/SQL in the connector and the requirements around that topic.
-craig

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