Hi All,
Can anybody suggest me how to fetch stage names and link names which are named like source and target in job designs. Actually writing a routine to extract job information(job audit ) which dynamically searches for the source and target stages and get's the link row count pertaining to the stage.
Ex :
Sources Stages : abc_src, bb_src------------2 source stages
Source links: abc_srclink ,bb_src_lnk --------2 links (need to get rowcounts for these links only)
SImilarly for Target stages and links and get the record counts.
I am using DSGetLinkInfo function . For this i need to hardcode stages and links for which we need to modify each and every job.
src_cnt = DSGetLinkInfo(JobHandle, srcstg,srclnk , DSJ.LINKROWCOUNT)
tgt1_cnt = DSGetLinkInfo(JobHandle, tgtstg1,tgtlnk1 , DSJ.LINKROWCOUNT)
Any suggestions or ideas would be of great help to me . Thanks in advance.
Best regards
Shahid
Audit routines
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 19
- Joined: Tue Jun 05, 2007 4:43 am
- Location: mumbai
- Contact:
Audit routines
Shahid.Bakshi
Mumbai
Mumbai
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
A source link will be an output link, and therefore have "Out" as part of its OLETYPE in its record in the DS_JOBOBJECTS table.
Once you have the record for the link, the key to the corresponding stage can be obtained by removing the Pnn part of the key to the link record. For example if the key to the link record is J\412\V0S2P2 then the key to the corresponding stage is J\412\V0S2.
Once you have the record for the link, the key to the corresponding stage can be obtained by removing the Pnn part of the key to the link record. For example if the key to the link record is J\412\V0S2P2 then the key to the corresponding stage is J\412\V0S2.
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.
-
- Premium Member
- Posts: 37
- Joined: Mon Dec 08, 2008 4:02 am
- Location: Milton Keynes, UK
Assuming what you want to do is find the names of all links of all stages in a job, and can then use pattern-matching on the link names to decide which ones to call via DSGetLinkInfo - e.g. ending in "_src" or "_tgt" or somthing like that:-
DSGetJobInfo(JobHandle,DSJ.FULLSTAGELIST ) returns a comma-separated list of stage names for the job you have attached to.
Then DSGetStageInfo(JobHandle, StageName, DSJ.LINKLIST) returns a comma-separated list of link names for a given stage name extracted from the stage list - e,g, via the Field() function.
DSGetJobInfo(JobHandle,DSJ.FULLSTAGELIST ) returns a comma-separated list of stage names for the job you have attached to.
Then DSGetStageInfo(JobHandle, StageName, DSJ.LINKLIST) returns a comma-separated list of link names for a given stage name extracted from the stage list - e,g, via the Field() function.
-
- Participant
- Posts: 19
- Joined: Tue Jun 05, 2007 4:43 am
- Location: mumbai
- Contact:
-
- Premium Member
- Posts: 37
- Joined: Mon Dec 08, 2008 4:02 am
- Location: Milton Keynes, UK
Have a look at the MatchField() function or the Matches operator in the BASIC Reference Guide.
Note that this uses different pattern syntax from what you may be used to - it is not the same as "regular expressions" you find in C etc.
Something like
will return true if the string ends with the letters 'src'.
Note that this uses different pattern syntax from what you may be used to - it is not the same as "regular expressions" you find in C etc.
Something like
Code: Select all
If string Matches "0X'src'" Then
....
-
- Participant
- Posts: 19
- Joined: Tue Jun 05, 2007 4:43 am
- Location: mumbai
- Contact: