DATA Step, Macro, Functions and more

how to prevent SAS launching pop up before running autoexec.sas

Accepted Solution Solved
Reply
Contributor
Posts: 21
Accepted Solution

how to prevent SAS launching pop up before running autoexec.sas

I want to run a code at a specific time, daily, that code reads from the Sasoprsk library and generate emails. For reading the data from Sasoprsk library, first I've to run the autoexec.sas to register it.

 

I created a batch file and run it using Task Scheduler.  

 

My batch file code looks like

 

"D:\SAS\SASHome\SASFoundation\9.4\sas.exe" -SYSIN "D:\SAS\SASConfig\Lev1\Applications\SASEnterpriseGRCServerCfg\6.1\Source\sasstp\test_email.sas" -LOG "D:\Notifications\test_email.log"

I included autoexec in my code using %inc statement.

 

After running it from task shedular, I received this log error and my code stops running.

 

Log Error

 

MPRINT(ORM_DB_LIBNAME):   libname sasoprsk ODBC datasrc=SAS_EGRC_PROD authdomain=GRC_db_auth dbmax_text=4000 connection=shared;
ERROR: Libref SASOPRSK is not assigned.
ERROR: Error in the LIBNAME statement.
ERROR: Libref SASOPRSK is not assigned.
ERROR: Execution canceled by an %ABORT CANCEL statement.
NOTE: The SAS System stopped processing due to receiving a CANCEL request.
ERROR: Errors printed on page 2.

 

I tried to run autoexec from batch file as

 

 

"D:\SAS\SASHome\SASFoundation\9.4\sas.exe" -SYSIN "D:\SAS\SASConfig\Lev1\Applications\SASEnterpriseGRCServerCfg\6.1\Source\ucmacros\orm_autoexec.sas" -LOG "D:\Notifications\test.log"

but Error is same. 

 

It is possibly due to that pop up, because if i run my code manually it works fine. All fields of pop up window are auto saved but may be, because no one is there to press OK button of popup window. 

 

Kindly suggest an approach to register sasoprsk library by running autoexec.sas from batch file.

Thanks.


Accepted Solutions
Solution
2 weeks ago
Contributor
Posts: 21

Re: how to prevent SAS launching pop up before running autoexec.sas

Dear Ballardw,

 

I've attached the screenshot of that pop up, however I've found a solution of it using libname odbc. I made the connection in ODBC with live database of application and and then using libname odbc I created a libname of name "Sasoprsk". It worked.

Thanks.

View solution in original post

Attachment

All Replies
Super User
Posts: 13,347

Re: how to prevent SAS launching pop up before running autoexec.sas

Can you post a screen capture of the "pop up"? We would need so information about that if it is the culprit.

 

I would look into the session ODBC settings in general also since your failure relates to an ODBC LIBNAME.

If you "manual" run is using your local machine ODBC settings a batch run under Enterprise Guide may not recognize your local computer ODBC but is attempting to use the EG server settings.

Solution
2 weeks ago
Contributor
Posts: 21

Re: how to prevent SAS launching pop up before running autoexec.sas

Dear Ballardw,

 

I've attached the screenshot of that pop up, however I've found a solution of it using libname odbc. I made the connection in ODBC with live database of application and and then using libname odbc I created a libname of name "Sasoprsk". It worked.

Thanks.

Attachment
☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 2 replies
  • 126 views
  • 2 likes
  • 2 in conversation