Page 1 of 2

Mutiple Instance Invocation ID

Posted: Mon Jun 29, 2009 8:48 am
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......

Posted: Mon Jun 29, 2009 9:25 am
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.

Posted: Mon Jun 29, 2009 9:31 am
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

Posted: Mon Jun 29, 2009 10:09 am
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.

Posted: Mon Jun 29, 2009 10:26 am
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......

Posted: Mon Jun 29, 2009 10:55 am
by Sreenivasulu
You can use the datastage sequence generating routine as the invocation id.

Regards
Sreeni

Posted: Mon Jun 29, 2009 5:13 pm
by ray.wurlod
Use slname.$Counter as the invocation ID, where slname is the name of the Start Loop activity.

Posted: Tue Jun 30, 2009 2:21 am
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

Posted: Tue Jun 30, 2009 2:32 am
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

Posted: Tue Jun 30, 2009 2:37 am
by Sreenivasulu
The erromessage is straighforward. Do not include alphanumeric values in the slname.counter.

Regards
Sreeni

Posted: Tue Jun 30, 2009 2:49 am
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 ........

Posted: Tue Jun 30, 2009 3:22 am
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#

Posted: Tue Jun 30, 2009 4:21 am
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 #

Posted: Tue Jun 30, 2009 6:31 am
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.

Posted: Tue Jun 30, 2009 6:43 am
by priyadarshikunal
also in case of run time error, can you please post the error message?