Error with DSGetStageLinks

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
mydsworld
Participant
Posts: 321
Joined: Thu Sep 07, 2006 3:55 am

Error with DSGetStageLinks

Post by mydsworld »

I am trying to capture the links (input) associated with a stage thrugh DS BASIC.

When I write :

x = DSGetStageLinks(<Job Name>,<Stage Name>,1)

I get the following error. Please help.

',' unexpected, Was expecting: '!', ')', '=', "AND", "OR", "LT", "LE",
"GT", "GE", "NE", "EQ", "MATCH"
Array 'DSGetStageLinks' never dimensioned.
ds_developer
Premium Member
Premium Member
Posts: 224
Joined: Tue Sep 24, 2002 7:32 am
Location: Denver, CO USA

Post by ds_developer »

I can't speak specifically about v8.x, but in v7 I use:

link_names = DSGetStageInfo(DSJ.ME, stage_name, DSJ.LINKLIST)

to get the list of links on a stage. "stage_name" is a variable that is set to the name of the stage.

Maybe this points you in a new direction.

John
mydsworld
Participant
Posts: 321
Joined: Thu Sep 07, 2006 3:55 am

Error with DSGetStageLinks

Post by mydsworld »

The function DSGetStageInfo works fine, but that gives me list of input & output links together.I want them separate.
ds_developer
Premium Member
Premium Member
Posts: 224
Joined: Tue Sep 24, 2002 7:32 am
Location: Denver, CO USA

Post by ds_developer »

I'm sorry, I've never used DSGetStageLinks. Do you have a $INCLUDE on JOBCONTROL.H?

$INCLUDE DSINCLUDE JOBCONTROL.H

I assume so if DSGetStageInfo worked for you. Otherwise you must be calling DSGetStageLink wrong - it thinks it is an array. I assume <Job Name> and <Stage Name> aren't what you are actually using. They don't look like variables or hard-coded strings.

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

Post by ray.wurlod »

There is no DSGetStageLinks.
You must use DSGetStageInfo to get a list of all the stages, then use DSGetLinkInfo on each link to determine what kind of link it is.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Interesting. There's no DEFFUN declaration for it in DSJOBCONTROL.H, which is the basis for my earlier non-existence statement. However, it is cataloged in the VOC file, so I guess it does exist after all.

To use it in a routine you will require your own DEFFUN declaration, or you will need to call it as a subroutine.

The value of the third argument (Key) is documented as being able to segregate the input or output links of the stage.

Can you please post your exact syntax (no metasyntactic markers)? You need to supply the job name and stage name as string literals or string variables.
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