How can I get column information on a link with a routine

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
dhwankim
Premium Member
Premium Member
Posts: 45
Joined: Mon Apr 07, 2003 2:18 am
Location: Korea
Contact:

How can I get column information on a link with a routine

Post by dhwankim »

Hi gurus.

I need to know column information on some link by subroutine.
but I could not reach that information.

If I got this column information. I'll made some Unix Shell code.

suppose that
job is coposited like that

sam stage(named Sam1) =====> 1stTransformationStage(T1) =====> 2ndTransformationStage(T2)=====>sam stage(T3)
Link1 Link2 Link3
I just wanted the columns(table definition) on Link3 at after-subroutine.

so I wrote code like below

$INCLUDE DSINCLUDE JOBCONTROL.H
$INCLUDE DSINCLUDE DSR_GETRTCONFIG.H
JOBNM="Test01"
JOBLINKMOD = DSGetLinkMetaData(JOBNM,"T2","Link3");
.................

But This function(DSGetLinkMetaData) did not returned the columns on Link3.

Who know about it.
What's wrong in my codes.

Please Figure out what is wrong.

Thank in Advance.

Dhwan Kim
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

I'm not familiar with DSGetLinkMetaData (?) but none of them work by Job Name - they require a Job Handle, which is something entirely different.

You can do two things. Either use DSJ.ME for the handle to indicate the current running job or attach to the job first by using DSAttachJob and then use the resulting handle in your call. Don't forget to detach when you are done.
-craig

"You can never have too many knives" -- Logan Nine Fingers
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

mhester wrote:You are correct in calling the routine with jobname as this routine does not require a job handle.
Bummer. :cry: Couldn't find any reference to it in the help, and since the other DSGet* functions require it...
-craig

"You can never have too many knives" -- Logan Nine Fingers
newtier
Premium Member
Premium Member
Posts: 27
Joined: Mon Dec 13, 2004 5:50 pm
Location: St. Louis, MO

Post by newtier »

DSGetLinkMetaData is referenced in the Server Job Developer's Guide, although the documentation is extremely weak!
Rick H
Senior Consultant
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

In version 8 it's in the DataStage BASIC manual, but it's described with the wrong number of arguments. They left out the stage name.
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