Batch ID in Datastage
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 14
- Joined: Mon Dec 04, 2017 10:44 am
Batch ID in Datastage
Hi All,
I have a requirement in designing a parallel job, at each Job run I have to store the Batch ID of the running job in the target table along with records insertion date. I tried to search a lot about getting the Batch ID of a job but found no appropriate solution. Can you please guide me how to get the Batch ID of each Job?
Looking forward for a positive response, thanks in advance.
Regards
Awais Dildar
I have a requirement in designing a parallel job, at each Job run I have to store the Batch ID of the running job in the target table along with records insertion date. I tried to search a lot about getting the Batch ID of a job but found no appropriate solution. Can you please guide me how to get the Batch ID of each Job?
Looking forward for a positive response, thanks in advance.
Regards
Awais Dildar
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Welcome aboard.
DataStage does not innately generate Batch ID. You have to specify how this is to be generated.
It follows that you can do whatever you like with this generated/retrieved value.
DataStage does not innately generate Batch ID. You have to specify how this is to be generated.
It follows that you can do whatever you like with this generated/retrieved value.
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.
-
- Participant
- Posts: 14
- Joined: Mon Dec 04, 2017 10:44 am
-
- Participant
- Posts: 14
- Joined: Mon Dec 04, 2017 10:44 am
-
- Participant
- Posts: 14
- Joined: Mon Dec 04, 2017 10:44 am
As mentioned, DataStage doesn't a feature called "Batch ID." In my previous project, we used to generate Job_Id whenever the Job Sequence starts and use log that id to Job Table to track the Job start and end and which job has inserted/updated/deleted along with the creation date and last updated date.
Venkata Srini
you can parse the current timestamp or job start timestamp out (remove : chars) and put it into the invocation id field which you can then see in the debugging tools and if you want you can store that in a column somewhere to tie it all together for debugging purposes.
there are other ways to do it ... we have a system that has a table where we store job name & run# and the data is stamped with run# as well
there are other ways to do it ... we have a system that has a table where we store job name & run# and the data is stamped with run# as well
I don't think "Batch ID" and "User ID" are equivalent here.
Can you define what your term means using other words, something other than simply "batch id"? Is this value something you're already seeing somewhere, say in a log entry and if so can you show it to us? I think it would go a long way towards lessening the confusion around what exactly it is that you need - an existing field you are aware of and need to capture, or something that currently does not exist that you need to generate. It does not seem to be the latter you are looking for but wanted to confirm.
Can you define what your term means using other words, something other than simply "batch id"? Is this value something you're already seeing somewhere, say in a log entry and if so can you show it to us? I think it would go a long way towards lessening the confusion around what exactly it is that you need - an existing field you are aware of and need to capture, or something that currently does not exist that you need to generate. It does not seem to be the latter you are looking for but wanted to confirm.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Premium Member
- Posts: 1735
- Joined: Thu Mar 01, 2007 5:44 am
- Location: Troy, MI
A batch ID from what I have seen is an integer to track the records being inserted/updated during Job run. Mostly for audit purposes. And that needs to be generated before each job execution, a separate piece of code.
But only OP knows what he really wants.
But only OP knows what he really wants.
Priyadarshi Kunal
Genius may have its limitations, but stupidity is not thus handicapped.
Genius may have its limitations, but stupidity is not thus handicapped.