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!

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

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