work.gseg

Reply
Contributor
Posts: 36

work.gseg

Hi,

I output many graphs to the work.gseg library. How can I save all of them to my hard drive? Thanks.

Super User
Posts: 10,500

Re: work.gseg

Make sure you have a permanent library that is writeable.

Either copy from the work library, since you have already made them or add appropriate gout statements placing procedure output into that library.

And since GOUT is going to let you set a more descriptive name then use that.

Example to save Proc gplot output

proc gplot data=sashelp.class gout=mylib.class;

<remainder of plot code>

And for even more use add a NAME statement so you no what the purpose of the plot is

plot weight*height=sex / name="ht_wt" ;

Note that NAME elements have very few characters available (8) AND that successive runs of the program unless you have goptions set to replace output, will increment the name with a number each time.

Contributor
Posts: 36

Re: work.gseg

Thanks for your reply!

However, I have already created so many plots and saved at work.gseg. I don't want to redo those graphs since it really takes long time. I just wonder if there is any faster way to export all those graphs to permanent drive, something like "select all -> copy -> paste".

Thanks.

SAS Super FREQ
Posts: 683

Re: work.gseg

To copy the GRSEG catalog entries to a permanent SAS library you can use Proc CATALOG


proc catalog cat=work.gseg ;
  copy out=sasuser.gseg;
run;
quit;

Or do you want to have the graphs as an image file like JPG or PNG?

Contributor
Posts: 36

Re: work.gseg

Thank you so much. It would be great if I can save them as .pdf files.

Super User
Posts: 10,500

Re: work.gseg

Ods pdf file="c:\myfolder\mypdffilename.pdf";

<your graphics proc code here>

ods pdf close;

when making new ones will create PDF of the output.

Super User
Posts: 10,500

Re: work.gseg

Another way if you are using Base SAS, after you have defined the new library, go to the explorer window in SAS, open your work library, right click on the gseg catalog, you can either copy and paste into the new library or drag the catalog to the new library and drop.

Contributor
Posts: 36

Re: work.gseg

Great! Thanks!

Ask a Question
Discussion stats
  • 7 replies
  • 518 views
  • 0 likes
  • 3 in conversation