BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
LB
Quartz | Level 8 LB
Quartz | Level 8

Hello all- 

 

SO I have an issue where if I run something in batch or on a scheduler I get this error:

ERROR: Insufficient authorization to access /sharedsas/config/Lev1/NAApp/sasReport13.xml.

I am running an output that includes two graphs that export out to an Excel workbook. It works fine in the interactive enviroment but not in batch. I have attempted to redirect the xml  with an ODS XML Path statement but that does not seem to work-  

 

ods xml path="/apps/sas/datasets/data137/xxx/dev/nc_xxx_sandbox/data/dfrx/"; but that  seems to be not taking effect.

 

I was reading something about the display error and writing that to the shell script but that is something I do not have access to-

 

Thanks

 

Lawrence

 

1 ACCEPTED SOLUTION

Accepted Solutions
LB
Quartz | Level 8 LB
Quartz | Level 8

Ok to reply with my own solution per se-as a way to notify other users- 

 

So the issue was that I had originally used EG to build the template. Then I had swapped out  the Gchart for a SG Chart. 

But the template had inserted this statement into the code- 

 

ODS tagsets.sasreport13(ID=EGSR) gtitle. 

 

Once I had removed it the issue resolved itself.   

 

Anyway thanks for all the assistance. While it was not the solution this time, I am sure the answers will assist in the future.

 

LB 

View solution in original post

9 REPLIES 9
DanH_sas
SAS Super FREQ

I'm guessing a bit without seeing the code, but the destination you are using is probably not XML -- it's probably SASREPORT.  Try setting the path on ODS SASREPORT and see if that helps.

LB
Quartz | Level 8 LB
Quartz | Level 8

Dan; 

The export is xlsx. I just tried that by changing the path to 

ods SASREPORT path="/apps/sas/datasets/data137/xxx/dev/nc_xxx_sandbox/data/dfrx/";  and it still results in the same error- 

 

 

The bit of code I have is- 

options dev=PNG;
options center;
ods listing close;
ods escapechar="\";

ods SASREPORT path="/apps/sas/datasets/data137/xxx/dev/nc_xxx_sandbox/data/dfrx/";  

ods excel file="/apps/sas/datasets/data137/xxx/dev/nc_xxx_sandbox/data/dfrx/&&sitea&i.._MOBILITY_REPORT_&d1t..xlsx" style=Seaside options(sheet_name="MS STATISTICS" SHEET_INTERVAL= 'PAGE' autofilter='1' FROZEN_ROWHEADERS='no'
GRIDLINES='ON' embedded_titles='yes' embedded_footnotes='yes');

 

ODS _ALL_ Close;
ods listing;

 

In between that I have one proc report and two sgplot graph outputs. The graphs are the culprit. I have another report running sans graphs and that works just fine in batch mode. 

 

LB 

 

 

 

 

DanH_sas
SAS Super FREQ

Just looking at the paths you've mentioned, this looks like a stored process. I believe that SASREPORT is opened by default for stored processes, but I don't think you care about that output. So, try adding this to the beginning of your program and see if it helps:

 

ods _all_ close;

 

Also, you might want to say:

 

ods graphics / outputfmt=png;

 

instead of:

 

options dev=png;

 

for your SGPLOT output.

 

Hope this helps!

Dan

LB
Quartz | Level 8 LB
Quartz | Level 8

Dan; 

 

Thanks for the suggestions-

Still get the errors. A little maddening.    

 

Lawrence 

 

 

ChrisHemedinger
Community Manager

On the ODS SASREPORT statement, try adding a gpath= option that points to a location where you can store files (can be the same as your output file destination).

Register for SAS Innovate 2025!! The premier event for SAS users, May 6-9 in Orlando FL. Sign up now for the best deals!
LB
Quartz | Level 8 LB
Quartz | Level 8

Tried that too-that did not work but did find the issue. I will reply all to the issue-  

ballardw
Super User

You may want to post the actual log for the excuted code shown.

Your first post has this path in the error:

/sharedsas/config/Lev1/NAApp/sasReport13

Your ods Excel shows

 

/apps/sas/datasets/data137/xxx/dev/nc_xxx_sandbox/data/dfrx/&&sitea&i.._MOBILITY_REPORT_&d1t..xlsx

and the same folder for ODS SASreport

 

 

Not the same paths.

 

Also with a statement like:

"The graphs are the culprit" you should show the code including the graphs and the log for the entire program.

 

By any chance are the graphs created by a non-SAS appication? Or a non-SG procedure such as Gplot or Gchart?

LB
Quartz | Level 8 LB
Quartz | Level 8

 

 

LB
Quartz | Level 8 LB
Quartz | Level 8

Ok to reply with my own solution per se-as a way to notify other users- 

 

So the issue was that I had originally used EG to build the template. Then I had swapped out  the Gchart for a SG Chart. 

But the template had inserted this statement into the code- 

 

ODS tagsets.sasreport13(ID=EGSR) gtitle. 

 

Once I had removed it the issue resolved itself.   

 

Anyway thanks for all the assistance. While it was not the solution this time, I am sure the answers will assist in the future.

 

LB 

sas-innovate-white.png

Special offer for SAS Communities members

Save $250 on SAS Innovate and get a free advance copy of the new SAS For Dummies book! Use the code "SASforDummies" to register. Don't miss out, May 6-9, in Orlando, Florida.

 

View the full agenda.

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 9 replies
  • 3160 views
  • 0 likes
  • 4 in conversation