SAS Data Integration Studio, DataFlux Data Management Studio, SAS/ACCESS, SAS Data Loader for Hadoop and others

SAS DI Studio managing external files

Occasional Contributor
Posts: 14

SAS DI Studio managing external files

The first JOB created succesfully the log file DIM.log.

This is the code

     Filename ff_log ""/sas/logs/DIM.log";

      proc printto



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;

      proc printto



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.

Super User
Posts: 5,849

Re: SAS DI Studio managing external files

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.

Data never sleeps
Respected Advisor
Posts: 4,665

Re: SAS DI Studio managing external files

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.

Ask a Question
Discussion stats
  • 2 replies
  • 3 in conversation