While running a job from an After Job Subroutine I occasionally get a message in the Job's log like:
From previous run
DataStage Job 65 Phantom 3064
Program "DSD.RUN": Line 490, Unable to unlink the operating system file "DSD.RUN_64235_13598".
It appears that I get this msg when the job invoked by the After Job Subroutine needs to be reset before it can be run (e.g. I get the msg "Job <job name> must be reset before it can run." a few lines earlier in the log). The routine deals with a "job must be reset" condition and my routine completes normally.
However, I do not know why I get the "Unable to unlink..." message, and therefore unsure if there is some additonal clean-up that I should perform.
info msg in job log:Unable to unlink operating system file
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 3337
- Joined: Mon Jan 17, 2005 4:49 am
- Location: United Kingdom
-
- Participant
- Posts: 85
- Joined: Fri Jun 04, 2004 2:30 am
- Location: Melbourne, Australia
- Contact:
Thanks for your responses. My working hypothesis is that the "unable to unlink" msg is related to the concurrency/timing of the executions of the job.
The after routine collects information about the job just run (status, timing, parameters, link row counts, etc..) writes these to a sequential file and then calls a common server job to read the seq. file and load the information into a set of oracle tables.
The "unable to unlink" msg only occurs when several server jobs complete at the same time and each runs their after routine, and each after routine launches the common server job to load the data into oracle. It is the common server job which gets the msg in its log.
The routine is already coded to wait for the job if its already running, reset the job if necessary, etc.. and it appears to work well (i.e. I always get the data into the oracle tables), only sometimes I get this "unable to unlink" msg.
I better approach might be to load the data into a FIFO queue structure and set-up the job as a single threaded process against the data queue. Anyone have a method for setting up a queue and associating a server job with it? I have considered writing a sequence job with a Wait for File Activity, but it seems a little inelegant.
Mostly, I want to understand the consequences of getting the "unable to unlink..." msg. The file object referred to in the msg is left remaining in the &PH& folder after the job completes - and that can't be good.
thx again.
The after routine collects information about the job just run (status, timing, parameters, link row counts, etc..) writes these to a sequential file and then calls a common server job to read the seq. file and load the information into a set of oracle tables.
The "unable to unlink" msg only occurs when several server jobs complete at the same time and each runs their after routine, and each after routine launches the common server job to load the data into oracle. It is the common server job which gets the msg in its log.
The routine is already coded to wait for the job if its already running, reset the job if necessary, etc.. and it appears to work well (i.e. I always get the data into the oracle tables), only sometimes I get this "unable to unlink" msg.
I better approach might be to load the data into a FIFO queue structure and set-up the job as a single threaded process against the data queue. Anyone have a method for setting up a queue and associating a server job with it? I have considered writing a sequence job with a Wait for File Activity, but it seems a little inelegant.
Mostly, I want to understand the consequences of getting the "unable to unlink..." msg. The file object referred to in the msg is left remaining in the &PH& folder after the job completes - and that can't be good.
thx again.
Hi,
instead debating on is it wise to run after routine for this rather then use a seuence and run it after the job finishes....
at the begining of the routine lock 1 of the 64 built in semaphores so the routine will never run in parallel if it suites you:
i.e:
instead debating on is it wise to run after routine for this rather then use a seuence and run it after the job finishes....
at the begining of the routine lock 1 of the 64 built in semaphores so the routine will never run in parallel if it suites you:
i.e:
Code: Select all
Lock 1
< routine code >
...
...
...
Unlock 1
Roy R.
Time is money but when you don't have money time is all you can afford.
Search before posting:)
Join the DataStagers team effort at:
http://www.worldcommunitygrid.org
Time is money but when you don't have money time is all you can afford.
Search before posting:)
Join the DataStagers team effort at:
http://www.worldcommunitygrid.org