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
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
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.
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
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
Dan;
Thanks for the suggestions-
Still get the errors. A little maddening.
Lawrence
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).
Tried that too-that did not work but did find the issue. I will reply all to the issue-
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?
Ballardw;
See the solution accepted but that was the crux of the issue-is that I had used EG to create the plot-originally not in SGPLOT but I had changed it over and EG had added in the following line
ODS tagsets.sasreport13(ID=EGSR) gtitle -So this seem to be crux of the problem even when I had thrown in all the ODS GPATH & ODS SASreport statements to redirect-it still failed in batch mode.
LB
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
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.
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.
Ready to level-up your skills? Choose your own adventure.