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.
Hi,
Just some thoughts - which you might already have considered:
Regards,
Amir.
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.
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.
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.
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...
I do not have access to SAS Management Console.
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.
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.
Hi,
I have just done a web search for "dos command to check if file is locked" and found, for example, the following links:
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.
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
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.