Can an after job Routine Connect to Oracle Database

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
nguyenh
Premium Member
Premium Member
Posts: 47
Joined: Tue Mar 06, 2007 5:48 pm

Can an after job Routine Connect to Oracle Database

Post by nguyenh »

Does ODBC work from an after job routine?
Does anybody have sample code?

Thanks
Hoa Nguyen
kcbland
Participant
Posts: 5208
Joined: Wed Jan 15, 2003 8:56 am
Location: Lutz, FL
Contact:

Post by kcbland »

After-job routines that run shell commands can certainly run sqlplus or sqlldr, and from there, you can do just about anything.

Welcome aboard!
Kenneth Bland

Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

ODBC (BCI) functions can be called from before/after subroutines.

However, you will find that the Data Direct ODBC drivers that ship with DataStage are not licensed for this, so you would need to purchase valid licensing for the ODBC drivers. This is not cheap.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

How about you let us know why you are asking about this? What would you need to do 'after job' in Oracle? The 'why' behind your 'what' would let us make suggestions how best to accomplish your goal...
-craig

"You can never have too many knives" -- Logan Nine Fingers
nguyenh
Premium Member
Premium Member
Posts: 47
Joined: Tue Mar 06, 2007 5:48 pm

Can an after job Routine Connect to Oracle Database

Post by nguyenh »

Hi,

We need routine that be able to connect to an Oracle database so it can do insert/update into the a set of process control tables. These table will historically store info. about the process: job name, job id, start time, end time...etc...etc.

Thanks,
Hoa Nguyen
kcbland
Participant
Posts: 5208
Joined: Wed Jan 15, 2003 8:56 am
Location: Lutz, FL
Contact:

Post by kcbland »

Write a shell script, use sqlplus and sqlldr to accomplish your goals.
Kenneth Bland

Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

Do it in a job. Get all the info into a flat file and then load it into the table. You dont have to do it in the after job sub-routine.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
Post Reply