BookmarkSubscribeRSS Feed
Philmingo
Fluorite | Level 6

I am attempting to run programs in SAS Enterprise Guide 6.1 (64-bit) in batch mode. I am starting from a program in SAS EG and then calling the batch file as follows. 

OPTIONS NOXSYNC;
X CALL "L:\Data\Model_Data_Input\Programs_MDI\MDI_Split_EG.bat";

Here's the batch text:

"E:\Program Files\SASHome\SASEnterpriseGuide\6.1\SEGuide.exe" -batch -sysin "L:\Data\Model_Data_Input\Programs_MDI\MDI2 UDW\Test Codes\Add Manual to MDI2\MDI2b_UDW_Pricing_20180814.sas" -log L:\Data\Model_Data_Input\Programs_MDI\Log_Files\MDI2b_UDW_Pricing_20180814.log

 

"E:\Program Files\SASHome\SASEnterpriseGuide\6.1\SEGuide.exe" -batch -sysin "L:\Data\Model_Data_Input\Programs_MDI\MDI2 UDW\Test Codes\Add Manual to MDI2\MDI2b_MANUAL_Pricing_20180814.sas" -log L:\Data\Model_Data_Input\Programs_MDI\Log_Files\MDI2b_MANUAL_Pricing_20180814.log

 

The program opens, but then doesn't run.  I keep getting an error for each piece of the batch that states the following:

"An error occurred while attempting to access the text source file. This may be due to it being locked by, or open in another application. The data cannot be imported until the situation is resolved." 

 

I haven't been able to find help for this error online.   The batch file is not open or in use by anyone else so I do not know why I am getting this error message.  

 

Once I figure out how to open and run the programs, I would like to keep the programs open instead of them closing when they are finished running.  Is there a way to do that as well?  

 

Any help would be greatly appreciated.  

 

 

10 REPLIES 10
Amir
PROC Star

Hi,

 

Just some thoughts - which you might already have considered:

 

  1. Do you have access to all of the locations you have specified?
  2. You say the file is not in use - is that the result of issuing an OS command to check?
  3. Does copying and pasting the paths into Windows Explorer take you to the desired location / file?
  4. Is the error message from a SAS log, if so can you share more of the log including any file name it might be referring to with respect to the message?

 

Regards,

Amir.

Philmingo
Fluorite | Level 6

1.  I have access to all of the locations.  I have just double checked this.

2.  I am not sure how to do this.  Are you able to provide me with a way to check this?  

3.  Copying and pasting has taken me to the desired locations.

4.  The error message is not in the log.  It pops up in a window.  

SASKiwi
PROC Star

IMO this is a clunky way of running batch jobs. You would be better off running them via SAS Management Console where you have a point-and-click interface to run and schedule batch jobs.

Philmingo
Fluorite | Level 6

I am unaware of what SAS Management Console.   I do not believe I have that available to me unless its called something else (SAS Deployment Managaer?).  Is it a separate add-on?  Could you elaborate how you would go about doing it SASKiwi?  I'm looking for suggestions on how to got about doing it.  

SASKiwi
PROC Star

SAS Deployment Manager is for installing and configuring SAS. SAS Management Console is for doing SAS administration like setting up users, defining data libraries and scheduling and running batch jobs.

 

Time to start reading the documentation on SMC to improve your understanding. This link may help you. Please check all of the links on this page: https://documentation.sas.com/?docsetId=bidaag&docsetTarget=p04xrqg1g0uw32n1uijgrl31lgcy.htm&docsetV...

 

 

 

 

Philmingo
Fluorite | Level 6

I do not have access to SAS Management Console.  

SASKiwi
PROC Star

Talk to your manager and explain your need to be able to run SAS batch jobs and that Management Console is the best tool for the job.

 

 

 

Philmingo
Fluorite | Level 6

I'm looking for a solution with the tools that I have.  I would not be able to justify having SAS Management Console.  I would need admin rights which will not be granted to me for something like this.  

Amir
PROC Star

Hi,

 

I have just done a web search for "dos command to check if file is locked" and found, for example, the following links:

 

https://stackoverflow.com/questions/10518151/how-to-check-in-command-line-if-a-given-file-or-directo...

 

https://www.experts-exchange.com/questions/28985426/Make-batch-file-check-if-file-is-locked-and-open...

 

which between them suggest a number of ways to check if a file is in use.

 

If you are still having problems then you could try contacting SAS Technical Support via:

 

https://support.sas.com/en/technical-support.html

 

 

Regards,

Amir.

SASKiwi
PROC Star

I believe it is possible to use the scheduling capabilities of SAS Management Console without full administration rights.This is something a SAS administrator could sort out.

 

Perhaps you should ask your manager(s) that if they employed a builder to construct a new house and then said you can only use hand tools like hammers and handsaws not power saws and nail guns - does this sound sensible? In IT terms this is exactly the type of decision your managers are making Smiley Happy

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 10 replies
  • 3555 views
  • 0 likes
  • 3 in conversation