Mutiple Instance Invocation ID

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

pklcnu
Premium Member
Premium Member
Posts: 50
Joined: Wed Aug 06, 2008 4:39 pm

Mutiple Instance Invocation ID

Post by pklcnu »

Dear Experts

I am using StartLoop_Activity ,Job_Activity and EndLoop_Activity stages in a Sequence job.
The Job_Activity stage is linked to one particular job which runs for each delimited value in the loop definition list mentioned in the StartLoop_Activity stage. I used the List Loop option in the StartLoop_Activity stage. The job works fine and I don't have any issues with the job.

But the only thing that I need to know is when I see the log in the Director if I got 20 delimited values in the loop then the job runs 20 times, to see all the logs of 20 jobs , I used to set the AutoPerge property to suit 20 jobs and clear all the existing logs so that every job log entry is a fresh job log. Suppose if I want to see the log for a job which is no.10 in the loop list , then i used to count the job logs from top to bottom till i reach the 10th job log which i think is not correct and takes little bit longer to find the correct job log.

In order to avoid counting the job logs from top to bottom, I used the multiple instace property for the job and passed the Invocation ID once, but all the job logs comes with same Invocation IDs which is of no use for me to avoid counting the job logs from top to bottom.

Is there a way we can set the Invocation ID increments by 1 dynamically for each job in the list while running the sequence ?

Thanks very much in advance......
priyadarshikunal
Premium Member
Premium Member
Posts: 1735
Joined: Thu Mar 01, 2007 5:44 am
Location: Troy, MI

Post by priyadarshikunal »

you can just use counter as invocation ID if they are unique. else you need to store the count somewhere and increment it after every run.
Priyadarshi Kunal

Genius may have its limitations, but stupidity is not thus handicapped. :wink:
pklcnu
Premium Member
Premium Member
Posts: 50
Joined: Wed Aug 06, 2008 4:39 pm

Post by pklcnu »

priyadarshikunal wrote:you can just use counter as invocation ID if they are unique. else you need to store the count somewhere and increment it after every run.
Hi priyadarshikunal

Can you please elaborate bit more.....how exactly to use the counter.....

Thanks very much
priyadarshikunal
Premium Member
Premium Member
Posts: 1735
Joined: Thu Mar 01, 2007 5:44 am
Location: Troy, MI

Post by priyadarshikunal »

there are two options
1. use counter of start loop activity as Invocation ID, because of that you will have 20 different instances in your director and it will also show you the instance was for which value.

2. use userstatus space/or store it in a file(/any where you want to store it) to store the count and you need to increment it before each run of job activity and you can pass it as a parameter for invocation id.
Priyadarshi Kunal

Genius may have its limitations, but stupidity is not thus handicapped. :wink:
pklcnu
Premium Member
Premium Member
Posts: 50
Joined: Wed Aug 06, 2008 4:39 pm

Post by pklcnu »

priyadarshikunal wrote:there are two options
1. use counter of start loop activity as Invocation ID, because of that you will have 20 different instances in your director and it will also show you the instance was for which value.

2. use userstatus space/or store it in a file(/any where you want to store it) to store the count and you need to increment it before each run of job activity and you can pass it as a parameter for invocation id.
Hi

Thanks for your reply and I am still not clear of what you said,the Invocation ID option appears only when I click the Run button, so I am not clear how to pass the parameter .......secondly if i am right the counter value here in this case is a string as I am using the List loop option not using the numeric loop .......and I am not popular with what you said regarding user status either........bit more explanation will be appreciated......
Sreenivasulu
Premium Member
Premium Member
Posts: 892
Joined: Thu Oct 16, 2003 5:18 am

Post by Sreenivasulu »

You can use the datastage sequence generating routine as the invocation id.

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

Post by ray.wurlod »

Use slname.$Counter as the invocation ID, where slname is the name of the Start Loop activity.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
pklcnu
Premium Member
Premium Member
Posts: 50
Joined: Wed Aug 06, 2008 4:39 pm

Post by pklcnu »

ray.wurlod wrote:Use slname.$Counter as the invocation ID, where slname is the name of the Start Loop activity. ...
Hi Ray

Thanks very much for your reply, I tried what you said but I am getting an error warning as soon as I enter the slname.$Counter in to the InvocationID field. The error warning is ' InvocationID name must consist of alpha-numeric characters and underscrores only '

Many Thanks

pklcnu
pklcnu
Premium Member
Premium Member
Posts: 50
Joined: Wed Aug 06, 2008 4:39 pm

Post by pklcnu »

Sreenivasulu wrote:You can use the datastage sequence generating routine as the invocation id.

Regards
Sreeni
Hi Sreeni

Thanks for your reply, I was unable to pass the routine to Invocation ID field, the routine name is taken as text and the same routine name is appearing as Invocation name in log, basically DataStage is not allowing to pass the routines to Invocation ID.

Thanks

pklcnu
Sreenivasulu
Premium Member
Premium Member
Posts: 892
Joined: Thu Oct 16, 2003 5:18 am

Post by Sreenivasulu »

The erromessage is straighforward. Do not include alphanumeric values in the slname.counter.

Regards
Sreeni
pklcnu
Premium Member
Premium Member
Posts: 50
Joined: Wed Aug 06, 2008 4:39 pm

Post by pklcnu »

Sreenivasulu wrote:The erromessage is straighforward. Do not include alphanumeric values in the slname.counter.

Regards
Sreeni
The problem is with the Dot ('.').......if i remove Dot from slname.counter then it will take the whole thing as a text ........
priyadarshikunal
Premium Member
Premium Member
Posts: 1735
Joined: Thu Mar 01, 2007 5:44 am
Location: Troy, MI

Post by priyadarshikunal »

pklcnu wrote: The problem is with the Dot ('.').......if i remove Dot from slname.counter then it will take the whole thing as a text ........
It should be specified like a parameter. Use it like

Code: Select all

#StartLoop_Activity.$Counter#
Priyadarshi Kunal

Genius may have its limitations, but stupidity is not thus handicapped. :wink:
pklcnu
Premium Member
Premium Member
Posts: 50
Joined: Wed Aug 06, 2008 4:39 pm

Post by pklcnu »

priyadarshikunal wrote:
pklcnu wrote: The problem is with the Dot ('.').......if i remove Dot from slname.counter then it will take the whole thing as a text ........
It should be specified like a parameter. Use it like

Code: Select all

#StartLoop_Activity.$Counter#
Same thing not accepting #
priyadarshikunal
Premium Member
Premium Member
Posts: 1735
Joined: Thu Mar 01, 2007 5:44 am
Location: Troy, MI

Post by priyadarshikunal »

pklcnu wrote:Same thing not accepting #
I checked it on my environment before posting and It works just fine.

Is it giving a runtime error or compilation error?

Can you please let us know your job design specifically from startloop_activity to end loop activity and how you are passing the value. I believe its the problem with parameter value.
Priyadarshi Kunal

Genius may have its limitations, but stupidity is not thus handicapped. :wink:
priyadarshikunal
Premium Member
Premium Member
Posts: 1735
Joined: Thu Mar 01, 2007 5:44 am
Location: Troy, MI

Post by priyadarshikunal »

also in case of run time error, can you please post the error message?
Priyadarshi Kunal

Genius may have its limitations, but stupidity is not thus handicapped. :wink:
Post Reply