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

Hi all,

 

Our professor gave us some notes on what i believe was from a Windows machine because of the 'c:\' directory.

This is the line of code.. 

ods listing gpath='c:\figures' style=journal;

 

when i enter the above code in my Mac, i get the error: 

ERROR: Cannot write image to SGprint. Please ensure that proper disk permissions are set.
Please help..
 
Thanks
1 ACCEPTED SOLUTION

Accepted Solutions
Reeza
Super User

Are you using SAS University Edition? SAS On Demand for Academics?

Your own installation?

 

If you're using SAS UE then the path would be something like:

 

ods listing path = "/folders/myfolders/" ...;

But to be honest the listing (ODS LISTING) destination is not used very often as it's more of a plain text format. Usually HTML, PDF, WORD or EXCEL are the common output destinations these days. 

 


@SirCee wrote:

Hi all,

 

Our professor gave us some notes on what i believe was from a Windows machine because of the 'c:\' directory.

This is the line of code.. 

ods listing gpath='c:\figures' style=journal;

 

when i enter the above code in my Mac, i get the error: 

ERROR: Cannot write image to SGprint. Please ensure that proper disk permissions are set.
Please help..
 
Thanks

 

View solution in original post

4 REPLIES 4
Reeza
Super User

Are you using SAS University Edition? SAS On Demand for Academics?

Your own installation?

 

If you're using SAS UE then the path would be something like:

 

ods listing path = "/folders/myfolders/" ...;

But to be honest the listing (ODS LISTING) destination is not used very often as it's more of a plain text format. Usually HTML, PDF, WORD or EXCEL are the common output destinations these days. 

 


@SirCee wrote:

Hi all,

 

Our professor gave us some notes on what i believe was from a Windows machine because of the 'c:\' directory.

This is the line of code.. 

ods listing gpath='c:\figures' style=journal;

 

when i enter the above code in my Mac, i get the error: 

ERROR: Cannot write image to SGprint. Please ensure that proper disk permissions are set.
Please help..
 
Thanks

 

SirCee
Fluorite | Level 6

Thank you Reeza for your reply! i am using the SAS onDemand for Academics.

 

Will give it a try 🙂

 

 

Reeza
Super User
Then the path will be:

ods listing path = "/home/yourUserName/" ...;

FYI to find the path of a folder, go to Servers Files and Folders, right click the folder/file and select properties. That will show you the path.

What this code does is save the path where the graphics are to be stored which isn't really useful anymore. It was used historically for HTML and LISTING as those destinations did not embed the images they just linked/referenced them as they don't support images directly. HTML5, PDF, Word and Excel all embed the images directly so this particular option isn't as used. It's also used primarily for the GRAPH (proc gchart) procedures while SG procedures (SGPLOT) is more useful and appropriate these days.
SirCee
Fluorite | Level 6

Perfectly understood.

 

Thank you again for the tip 🙂 Appreciated!

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 4 replies
  • 1571 views
  • 2 likes
  • 2 in conversation