Hi,
I am using DSGetStageInfo for capturing the LinkTypes.
It is returning 1 , 3 as values.
I want to use DSGetStageLinks to capture the link information ( Input Link of the stage , output link of a stage).
When I try to use this function , I am getting an error as DSGetStageLinks never dimensioned.
I understand that the information has to be present in JOBCONTROL.H.
What all necessary steps to be followed to edit the JOBCONTROL.H to update the header information. It is said that we need to update dsapi.H,DSJ_XFUNCS.H , dsrconst.bas files also.
What information has to be passed to these three files so that I can use DSGetStageLinks Function.
Or is there any other way to find the link type(Input/output/reference) linked to a particular stage.
Thanks
Phani
DSGetStageLinks
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
You ought never to edit any of the header files in DSINCLUDE.
There is no such function as DSGetStageLinks(), which is why the message about array not dimensioned is being generated; because there is no such function, the compiler assumes that a token immediately followed by a left parenthesis is the name of a dimensioned array, then establishes that there is no corresponding DIMENSION statement.
I'm not sure exactly what you are trying to accomplish but chances are that you need some combination of DSGetStageInfo() and DSGetLinkInfo() functions.
DSGetStageInfo(hJob, StageName, DSJ.LINKLIST) will return a list of names of links connected to the stage. Use this name as the third argument to DSGetLinkInfo() to determine specific information about the link. The following code fragment shows how to use the constants declared in JOBCONTROL.H:(I may not have decoded link types correctly; the above was from memory without access to DataStage.)
There is no such function as DSGetStageLinks(), which is why the message about array not dimensioned is being generated; because there is no such function, the compiler assumes that a token immediately followed by a left parenthesis is the name of a dimensioned array, then establishes that there is no corresponding DIMENSION statement.
I'm not sure exactly what you are trying to accomplish but chances are that you need some combination of DSGetStageInfo() and DSGetLinkInfo() functions.
DSGetStageInfo(hJob, StageName, DSJ.LINKLIST) will return a list of names of links connected to the stage. Use this name as the third argument to DSGetLinkInfo() to determine specific information about the link. The following code fragment shows how to use the constants declared in JOBCONTROL.H:
Code: Select all
Msg = "Link Row Counts for stage " : StageName
LinkList = DSGetStageInfo(hJob, StageName, DSJ.LINKLIST)
LinkTypes = DSGetStageInfo(hJob, StageName, DSJ.LINKTYPES)
LinkCount = DCount(LinkList, ",")
For LinkNo = 1 To LinkCount
LinkName = Field(LinkList, ",", LinkNo, 1)
LinkType = Field("Input|Output|Reference|Reject", "|", Field(LinkTypes, ",", LinkNo, 1), 1)
RowCount = DSGetLinkInfo(hJob, StageName, LinkName, DSJ.LINKROWCOUNT)
Msg<-1> = LinkName : TAB : LinkType : TAB : LinkRowCount
Next LinkNo
Call DSLogInfo(Msg, "Link Row Counts")
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Thanks Ray.
In the doc, I came across the DSGetStageLinks Function. But it was not dimensioned in the JOBCONTROL.H.So I was unable to use that.
Infact , I came with a similar solution but did not include
LinkType = Field("Input|Output|Reference|Reject", "|", Field(LinkType, ",", LinkCount), 1)
I modified the order and included in the routine.
Getting the right output.
Thanks for your timely inputs.
Thanks,
Phani
In the doc, I came across the DSGetStageLinks Function. But it was not dimensioned in the JOBCONTROL.H.So I was unable to use that.
Infact , I came with a similar solution but did not include
LinkType = Field("Input|Output|Reference|Reject", "|", Field(LinkType, ",", LinkCount), 1)
I modified the order and included in the routine.
Getting the right output.
Thanks for your timely inputs.
Thanks,
Phani
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Please advise exactly where you found DSGetStageLinks() function in "the docs". Include the page number as well as the manual name. I'm not aware of this function.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Hi Ray,
Please refer the parallel job advanced developer guide , page number 7-103. It says that
Result = DSGetStageLinks(JobName, StageName, Key)
results in giving the links linked to the stage
Key stands from 1 and 0 where 1 stands for input and 0 for output.
But this is not dimensioned.
Thanks,
Phani
Please refer the parallel job advanced developer guide , page number 7-103. It says that
Result = DSGetStageLinks(JobName, StageName, Key)
results in giving the links linked to the stage
Key stands from 1 and 0 where 1 stands for input and 0 for output.
But this is not dimensioned.
Thanks,
Phani
Phanee,
do 2 things:
1. open up a call at Ascential stating that the DSINCLUDE JOBCONTROL.H is missing the line "DEFFUN DSGetStageLinks(JOB.NAME, STAGE.NAME, LINKMODE)"
2. add that line to your job.
do 2 things:
1. open up a call at Ascential stating that the DSINCLUDE JOBCONTROL.H is missing the line "DEFFUN DSGetStageLinks(JOB.NAME, STAGE.NAME, LINKMODE)"
2. add that line to your job.
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact: