Routine to read the value from oracle

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
shrey3a
Premium Member
Premium Member
Posts: 234
Joined: Sun Nov 21, 2004 10:41 pm

Routine to read the value from oracle

Post by shrey3a »

Hi,

I want to read the value from oracle thro' Datastage routine i.e. I have oracle table in which there is only one row for each object type. As per my design I want to read the value thro' a routine and then pass it to sequencer job as an return value.


Regards,
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post by Sainath.Srinivasan »

Look for DSExecute.
shrey3a
Premium Member
Premium Member
Posts: 234
Joined: Sun Nov 21, 2004 10:41 pm

Post by shrey3a »

Hi ,

I tried looking for code/routine which can be executed from DS enviorment to fetch the value from oracle table but was not able to find.

Can anybody help on this..

Thanks in advance...

Regards
Sainath.Srinivasan wrote:Look for DSExecute.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

It can be done in a number of ways.
  • BCI functions mimic the ODBC API (search for BCI) but you need a licensed ODBC driver.

    The routine can run a job that fetches the data from Oracle into, say, a text file then reads the value from there.
Why do you believe you need a routine? Why not pre-load a hashed file containing just one row with that value. The key for the hashed file is a constant, and is accessible in any job that needs the value by performing a reference lookup using that constant as the reference key expression. Way more efficient, and you remain within DataStage's graphical paradigm.

This approach naturally extends to storing a finite set of specific returned values.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply