08-02-2011 09:34 AM
I am not sure the &SYSJOBID will be unique over time so that you could use it as a historical reference. I know that on Unix it will restart the process id numbers when the server reboots. They might even cycle around if you run the server long enough. Also what if your jobs are distributed across servers.
08-03-2011 03:49 AM
Agree with Tom, the pid is not unique over time.
So you probably have to create your own id. Or, why not use a timestamp, that should be unique in most applications?
08-03-2011 08:28 AM
No, pid is certainly not unique otherwhise after a while your server can't run any process because the pid is full...
you could use a reference table who logs your id and each time you want to create a new one select max+1 and the jobname.
other possiblity is jobname+datetime.
date is not enough, you could run twice the same day your process. never say never...
08-03-2011 08:55 AM
as we use more parallel processing like grid, we will increase the number of ways similar tasks might start at the same time.
However, a consistent hash of server address and timestamp and process id + perhaps a 6-digit random number, might generate a unique id
Need further help from the community? Please ask a new question.