job control advice
Posted: Mon Aug 14, 2000 11:46 pm
I have a number of jobs (about 6 or 7) which are all fairly similar in structure. Basically, they have job control code which copies the source files from a remote system to a local directory. The stages in the job then use ODBC to read these files.
Very occasionally (except for the last week when it has been all too frequent), there is a problem in the source system which gives me grief when trying to copy the files (remote system is Unix and file is accessed via a variation of Samba - too messy to explain here).
I like the jobs the way they are because they operate as a unit, copying the files and then loading them. Also, the last stage in the job writes to a timestamp table to record the fact that these files have been loaded successfully.
I just have one problem. If there is a problem accessing the source files, I dont want to attempt to load the data at all, I just want to exit the job. At present, the only way I know to do this is to abort the job with DSLogFatal. However, these jobs can be called anywhere up to 200 times in a single night, and even though the data for one shift may be bad, I still want to load all the other shifts.
My question then is this; is there any way to stop the job from the job control (without aborting it) such that the stages will not be run.
I have considered breaking it up into 2 jobs, which obviously would work. (Im still trying to find reasons other than emotional ones for not doing
this.)
If I get a failure, I could substitute an empty file, but Id still have no way to tell the final stage that it didnt work. (An empty file may be completely valid from the source system on occasions.) I think this is part of my problem, that the job control cannot communicate with the stages of the job. I suppose UserStatus might work for this, if I werent using 3.5 which is a bit buggy in relation to setting UserStatus in job control.
I suppose another option is to abort the job and then reset it in the calling job.
Thanks in advance. Lets see what you can do with this one, Ray??? Why do I get the feeling that someone is going to tell me that there is a new feature in 4.0 which solves this for me???
David Barham
Information Technology Consultant
CoalMIS Project
Anglo Coal Australia Pty Ltd
Brisbane, Australia
*************************************************************************
This e-mail and any files transmitted with it may be confidential and are intended solely for the use of the individual or entity to whom they are addressed. If you have received this e-mail in
error, please notify the sender by return e-mail, and delete this e-mail from your in-box. Do not copy it to anybody else
*************************************************************************
Very occasionally (except for the last week when it has been all too frequent), there is a problem in the source system which gives me grief when trying to copy the files (remote system is Unix and file is accessed via a variation of Samba - too messy to explain here).
I like the jobs the way they are because they operate as a unit, copying the files and then loading them. Also, the last stage in the job writes to a timestamp table to record the fact that these files have been loaded successfully.
I just have one problem. If there is a problem accessing the source files, I dont want to attempt to load the data at all, I just want to exit the job. At present, the only way I know to do this is to abort the job with DSLogFatal. However, these jobs can be called anywhere up to 200 times in a single night, and even though the data for one shift may be bad, I still want to load all the other shifts.
My question then is this; is there any way to stop the job from the job control (without aborting it) such that the stages will not be run.
I have considered breaking it up into 2 jobs, which obviously would work. (Im still trying to find reasons other than emotional ones for not doing
this.)
If I get a failure, I could substitute an empty file, but Id still have no way to tell the final stage that it didnt work. (An empty file may be completely valid from the source system on occasions.) I think this is part of my problem, that the job control cannot communicate with the stages of the job. I suppose UserStatus might work for this, if I werent using 3.5 which is a bit buggy in relation to setting UserStatus in job control.
I suppose another option is to abort the job and then reset it in the calling job.
Thanks in advance. Lets see what you can do with this one, Ray??? Why do I get the feeling that someone is going to tell me that there is a new feature in 4.0 which solves this for me???
David Barham
Information Technology Consultant
CoalMIS Project
Anglo Coal Australia Pty Ltd
Brisbane, Australia
*************************************************************************
This e-mail and any files transmitted with it may be confidential and are intended solely for the use of the individual or entity to whom they are addressed. If you have received this e-mail in
error, please notify the sender by return e-mail, and delete this e-mail from your in-box. Do not copy it to anybody else
*************************************************************************