Page 1 of 1

Error with DSGetStageLinks

Posted: Wed Feb 27, 2008 3:29 pm
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.

Posted: Wed Feb 27, 2008 3:38 pm
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

Error with DSGetStageLinks

Posted: Wed Feb 27, 2008 3:48 pm
by mydsworld
The function DSGetStageInfo works fine, but that gives me list of input & output links together.I want them separate.

Posted: Wed Feb 27, 2008 4:54 pm
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

Posted: Wed Feb 27, 2008 5:12 pm
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.

Posted: Wed Feb 27, 2008 7:17 pm
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.