06-23-2014 02:25 PM
The first JOB created succesfully the log file DIM.log.
This is the code
Filename ff_log ""/sas/logs/DIM.log";
So now I want to append to content of the second job (log process) to the DIM.log
My Precode piece of code for Table Loader is
Filename ff_log "/sas/logs/DIM.log" mod;
But I am getting the error
ERROR: File is in use, /sas/logs/DIM.log. NOTE: The SAS System stopped processing this step because of errors.
The error above I am getting when I try to append log process info of the second job to the same file DIM.log (created by first job).
I can append log info with no errors if I want to append info to DIM.log by the first job.
The log file was not opened.
06-24-2014 04:56 PM
Sorry, but I don't have an immediate answer to you r problem.
But may I ask why you wish to store DI Studio logs in this "controlled" manner?
DIS is primarily a tool for maintaining meta data and building jobs, which then deploy for scheduling (if they are type of jobs that will run on a predictable and regular basis. Jobs that are to be run under ad-hoc circumstances, they can be deployed as stored processes.
06-25-2014 09:26 AM
I agree with what Linus says.
Your sample code run without errors for me (after removing the duplicated quotations marks in the first filename statement) when used in 2 different jobs AND the first job had been closed.
So just thinking:
If you run both jobs out of DIS (which spawns a session per job) and you don't close the job window after running the first job then the session is still active and the log file still locked (by the filename statement). So if this is the case and you run the second job out of DIS then the Error you're getting is simply stating the fact that job1 is still locking the log file.
Fully close job1 after running it and I would expect things to work.