Know link type in a job per stage

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
Obiwon666
Participant
Posts: 22
Joined: Wed Jan 17, 2007 5:34 am

Know link type in a job per stage

Post by Obiwon666 »

Hi everyone,

I work on a job server (BASIC code) to scan all jobs in a projectto get information about datastage design.
For each job i want to know names of stages presents, names of the links, etc..

I'm really close to get all information i want but i have a trouble with link.
I don't know how to know if a link is a reject.
The function DSGetLinkInfo with DSJ.LINKDESC give the same value for a output link or reject link.

Do you have an idea?
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Do some research - use help or the DataStage BASIC manual. What are the InfoType argument values that may be used with DSGetLinkInfo() 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.
kandyshandy
Participant
Posts: 597
Joined: Fri Apr 29, 2005 6:19 am
Location: Singapore

Post by kandyshandy »

Have meaningful naming convention for all links. For e.g. a reject link can have its name as "REJ_........_lnk"

Idea to differentiate a reject link by its name.
Kandy
_________________
Try and Try again…You will succeed atlast!!
Obiwon666
Participant
Posts: 22
Joined: Wed Jan 17, 2007 5:34 am

Post by Obiwon666 »

@kandyshandy: My goal is to control the naming convention precisely. ;)


I forgot to write that i used the method "listlinktype = DSGetStageInfo (hJob, stagename, DSJ.LINKTYPES)" first.

I can only deduce this:
linktype value = 1: input stream
linktype value = 2: reference stream
linktype value = 3: output stream or reject stream

I also made a test with this code "linkdesc = DSGetLinkInfo(hJob, stagename, linkname, DSJ.LINKDESC)".

There is no detailed information given by IBM's documentation and neither in the JOCONTROL.H file. :(

So i did an another test with the method "Call DSGetLinkMetaData(linksmdata ,jobname, stagename, linkname)".

I find that when no column is given by the array result it could be a reject link but i can't test with RCP mode in my environment to prove this observation.

It could be that ? (linktype=3 and no column description in array result a DSGetLinkMetaData)
kandyshandy
Participant
Posts: 597
Joined: Fri Apr 29, 2005 6:19 am
Location: Singapore

Post by kandyshandy »

Obiwon666 wrote:I find that when no column is given by the array result it could be a reject link but i can't test with RCP mode in my environment to prove this observation.

It could be that ? (linktype=3 and no column description in array result a DSGetLinkMetaData)
Can't you disable RCP at your job level?
Kandy
_________________
Try and Try again…You will succeed atlast!!
Obiwon666
Participant
Posts: 22
Joined: Wed Jan 17, 2007 5:34 am

Post by Obiwon666 »

RCP is disabled at project level.

I do some test with server job it doesn't work.(DSGetLinkMetaData gives no information with job server).
:roll:
kandyshandy
Participant
Posts: 597
Joined: Fri Apr 29, 2005 6:19 am
Location: Singapore

Post by kandyshandy »

Keeping fighting until you succeed :)
Kandy
_________________
Try and Try again…You will succeed atlast!!
Post Reply