Hi I am reading page 349 of the specialist prep guide on ODS PDF.
when I ran the code in the book
ods html close; ods pdf file="SamplePDF"; proc freq data=sashelp.cars; tables origin*type; run; ods pdf close;
, I got
ERROR: Insufficient authorization to access /pbr/biconfig/940/Lev1/SASApp/SamplePDF.
log.
1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK; NOTE: ODS statements in the SAS Studio environment may disable some output features. 71 72 ods html close; 73 ods pdf file="SamplePDF"; NOTE: Writing ODS PDF output to DISK destination "/pbr/biconfig/940/Lev1/SASApp/SamplePDF", printer "PDF". 74 proc freq data=sashelp.cars; 75 tables origin*type; 76 run; NOTE: There were 428 observations read from the data set SASHELP.CARS. NOTE: PROCEDURE FREQ used (Total process time): real time 0.08 seconds user cpu time 0.08 seconds system cpu time 0.00 seconds memory 4414.00k OS Memory 36272.00k Timestamp 20/11/2022 04:49:30 AM Step Count 60 Switch Count 4 Page Faults 0 Page Reclaims 831 Page Swaps 0 Voluntary Context Switches 21 Involuntary Context Switches 0 Block Input Operations 0 Block Output Operations 544 77 ods pdf close; ERROR: Insufficient authorization to access /pbr/biconfig/940/Lev1/SASApp/SamplePDF. 78 79 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK; 90
I later figure it out that I need to specify the path pathway to a folder in the ODS PDF statement, and I also need to include .pdf extension, otherwise the output file will be a generic file.
ods pdf file='/home/u62043935/Specialist_Prep_Guide/cert/SamplePDF.pdf';
So how come the code in the book does not need to
1. specify a path and
2. does not have the .pdf extension?
The code example is generic; path names need to be adapted to your specific environment (UNIX/Windows/whatever, client/server or local).
Available on demand!
Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.
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.