How to use DS Routines in a controlling job

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
spracht
Participant
Posts: 105
Joined: Tue Apr 15, 2003 11:30 pm
Location: Germany

How to use DS Routines in a controlling job

Post by spracht »

I tried to use the UtilityHashLookup in a controlling job and declared it like this:

Deffun UtilityHashLookup(A1,A2,A3) Calling "*DataStage*UtilityHashLookup"

But I always get a fatal error??

Stephan
degraciavg
Premium Member
Premium Member
Posts: 39
Joined: Tue May 20, 2003 3:36 am
Location: Singapore

Post by degraciavg »

hi stephan,

pls try this...

DefFun UtilityHashLookup(A1,A2,A3) Calling "DSX.UtilityHashLookup"

hope it helps

cheers,
vladimir
spracht
Participant
Posts: 105
Joined: Tue Apr 15, 2003 11:30 pm
Location: Germany

Post by spracht »

Sorry Vladimir, this didn't work either!

Stephan
degraciavg
Premium Member
Premium Member
Posts: 39
Joined: Tue May 20, 2003 3:36 am
Location: Singapore

Post by degraciavg »

hi Stephan,

pls use all upper case for DSX.UTILITYHASHLOOKUP.

if this doesn't work, pls
1. check if this SDK function is compiled
2. check in the directory DSU_BP.O under your project directory if it exists (take note of the case)

i tried in my machine and it works. i'm using DS 6.0.1 running on Solaris 9.

just an aside, DS 6.0.1 is not certified on Solaris 9 yet! [:0]

pls try it at your end... thanks...

cheers,
vladimir
spracht
Participant
Posts: 105
Joined: Tue Apr 15, 2003 11:30 pm
Location: Germany

Post by spracht »

Vladimir,

splendid, this works now, it was just the uppercase letters. I wonder, why I can't find any hint on how to do this in the online help?

Thanks and Regards
Stephan
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Some technical info...

There is some inconsistency with how DataStage routines are cataloged (more historical accident than anything else). There are five main prefixes:
"DSD." routines used primarily at design/compile time (for example DSD.Browse)
"DSP." routines associated with stored procedures (for example DSP.Close)
"DSR." repository management (for example DSR.SCHED)
"DSU." "user-written" routines
"DSX." supplied transform functions (for example DSX.CONVERTWEEK)

Just to be interesting, these are stored in separate Type 19 files (subdirectories in the project) with inconsistent names:
DSD_BP.O primarily "DSD..." functions but some others
DSG_BP.O some transform functions, plus job control functions and repository management functions
DSU_BP.O user-written functions

For backwards compatibility names DSJ_BP.O and DSX_BP.O exist in the VOC file (DataStage vocabulary), but nowadays (version 6.0) point to DSG_BP.O.

Ray Wurlod
Education and Consulting Services
ABN 57 092 448 518
spracht
Participant
Posts: 105
Joined: Tue Apr 15, 2003 11:30 pm
Location: Germany

Post by spracht »

Ray, thank you very much, this information is very interesting and helpful!

Stephan
Post Reply