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


dear all,

I am trying to define my own name for generated graphs (instead of gchartx) but it seems not to work with GSFNAME:

sas1.PNG

any idea ??

THX!!

PS.

how to copy/paste sas code into this page ??

1 ACCEPTED SOLUTION

Accepted Solutions
AncaTilea
Pyrite | Level 9

Hi.

First thing: you should never give a real path on your machine.

Second, when I ran your code (replicated below) it worked.

So please provide some log file, or something more.

ods listing close;

*define the path once, no need for quotations, just simply \\my_path_where_I_keep_things\...

%let path = your_path;

ods html file = "my_graph.htm"

    path = "&path." (url = none)

    gpath = "&path." (url = none);

filename my_graph "&path.\my_graph.png";

goptions reset = global gunit = pct border cback = white htext = 2 ftext = "Arial"

    device = png gsfmode = replace gsfname = my_graph

    rotate = landscape autosize = on xpixels = 1100 ypixels = 800 ;

    proc gchart data = sashelp.class;

        vbar age/group = sex name = "my_graph";

    run;quit;

Good luck!

View solution in original post

1 REPLY 1
AncaTilea
Pyrite | Level 9

Hi.

First thing: you should never give a real path on your machine.

Second, when I ran your code (replicated below) it worked.

So please provide some log file, or something more.

ods listing close;

*define the path once, no need for quotations, just simply \\my_path_where_I_keep_things\...

%let path = your_path;

ods html file = "my_graph.htm"

    path = "&path." (url = none)

    gpath = "&path." (url = none);

filename my_graph "&path.\my_graph.png";

goptions reset = global gunit = pct border cback = white htext = 2 ftext = "Arial"

    device = png gsfmode = replace gsfname = my_graph

    rotate = landscape autosize = on xpixels = 1100 ypixels = 800 ;

    proc gchart data = sashelp.class;

        vbar age/group = sex name = "my_graph";

    run;quit;

Good luck!

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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
  • 1 reply
  • 658 views
  • 0 likes
  • 2 in conversation