BookmarkSubscribeRSS Feed
htzcouto
Calcite | Level 5

I am trying to run a sas 9.3 batch program and there is the following error

 

insufficient authorization to access c:\Windows\system32

 

Thanks for the solution,

 

 

7 REPLIES 7
Kurt_Bremser
Super User

When reporting problems, make it a point to always include the complete log of the failed step(s).

In the case of a failed batch run, make sure that all necessary files (source, log, output) are specified with a full path that you have permission to use.

How are you running your batch program? (cmd window, batch file, powershell, VB script, scheduler)

htzcouto
Calcite | Level 5
This is the batch program

"c:\Program Files\SASHome\x86\SASFoundation\9.3\sas.exe" -sysin
"C:\Teste_Batch\prog1.sas"
-PRINT "C:\Teste_Batch\prog1.LST" -LOG "C:\Teste_Batch\prog1.LOG"

This is the message returned:


NOTE: Unable to open SASUSER.PROFILE. WORK.PROFILE will be opened instead.
NOTE: All profile changes will be lost at the end of the session.
ERROR: Insufficient authorization to access C:\Windows\system32\prog1.log.
htzcouto
Calcite | Level 5

Using Windows 7 with Task Scheduler

htzcouto
Calcite | Level 5

Windows 7 Professional

Quentin
Super User

I just hit a similar error.  In my case it was because I did not include the -log option, and it looks like when a scheduled task runs as administrator, it writes the log to c:\WINDOWS\system32.  I would double check that your -log option is in the command string.

BASUG is hosting free webinars Next up: Jane Eslinger presenting PROC REPORT and the ODS EXCEL destination on Mar 27 at noon ET. Register now at the Boston Area SAS Users Group event page: https://www.basug.org/events.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

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
  • 7 replies
  • 1228 views
  • 0 likes
  • 3 in conversation