Page 1 of 1

Running released multi instance jobs - how?

Posted: Sun Dec 29, 2002 6:46 pm
by rwolancz
Hi All,

I have not seen any posts on below. I wonder how you guys do it.

Here's an issue:

I've got job A, which is run by job sequence (job B). Both are multi instance. Job A is called from job B, with job B invocationid (using DSJobInvocationId macro).
If I run non-released versions, it works fine. Eg. B.Instance1 runs A.Instance1.
If I release both jobs, I cannot make released B to run released A. It still attempts to run non-released version of A, and fails if its not there.

BTW, if the jobs are not multi instance, it works as expected, ie. released B runs released A.

Appreciate your feedback.

Regards,
Robert

Posted: Sun Dec 29, 2002 9:30 pm
by ray.wurlod
Do the non-released versions of jobs B and A continue to exist in the project? If the original (non-released) version of job A does not exist, DataStage is forced to find a released version - the highest numbered released version.
To be honest, I have not done this with multi-instance jobs, however you "should" be able to attach a job whose name is made up of the base job name, a period (.) and a job invocation ID, for example
InvocationID = DSGetJobInfo(DSJ.ME,DSJ.JOBINVOCATIONID)
hJob1 = DSAttachJob("JobA.":InvocationID, DSJ.ERRWARN)
If this does not work, Ascential may have overlooked something, and you should lodge a call with them - via your vendor if appropriate.

Posted: Sun Dec 29, 2002 10:10 pm
by rwolancz
It looks like it is not possible to attach MULTI INSTANCE job using its base name only. I use Job Sequencer, it generates as below,

jb$4 = "JobA":'.':(DSJobInvocationId)
h$4 = DSAttachJob(jb$4, DSJ.ERRNONE)

which makes sense, but does not work if non-released version is not there.

I had it all working with single instance and am surprised now after it's converted to multi.

The call has been with Ascential for a while. Will keep you posted then.



Edited by - rwolancz on 12/30/2002 15:53:00

Edited by - rwolancz on 12/30/2002 16:22:04

Posted: Tue Jan 21, 2003 3:55 pm
by rwolancz
Here's an update on that for all interested.

Above has been recognized as a bug in version 5.2. It is reported to be fixed in version 6.0r1.
For those using NLS, version 6.0 is not yet NLS enabled.
DataStage 6.0.1 is scheduled for release mid-February. This release will be NLS enabled, it will include fixes from 6.0r3 and 5.2.2.

There is also a patch available for version 5.2.2, but I have not tested it yet.

Robert Wolanczuk

Posted: Tue Jan 21, 2003 4:24 pm
by ray.wurlod
DSGetJobInfo(hJob, DSJ.JOBNAME) returns the actual name of the job (for example the highest released number). You may be able to generate a workaround using the actual name with the invocation ID.
I have not tried this, but it seems feasible (other bugs permitting).


Ray Wurlod
Education and Consulting Services
ABN 57 092 448 518