Hi, so I am producing a box plot in SAS 9.4 using the GTL method. The output works perfectly and all is fine, other than I need a permanent data set. I can see each time the plot runs 3 data sets get produced, one of which contains the summary statistics, such as the mean, median, etc. I need this data sets stored permenantly, however it seems the name of this data set are very random, is there a way to determine or define the datasets name, so i can store the summary data set. Currenlty it is called
_DOCTMP000000000000000000000000000564
Which isnt much use.
Thanks in advance.
I'm assuming you are writing the GTL and using PROC SGRENDER to render the template with your data. The best way to get the computed data is to use the ODS OUTPUT statement right before the PROC SGRENDER invocation. Assuming you want a data set called "boxdata.sas7bdat":
ods output sgrender=boxdata;
proc sgrender data=whatever template=boxtmpl; run;
proc print data=boxdata; run; /* in case you want to see it in table output */
You can use a libname other than the default "work" to store it permanently.
Hope this helps!
Dan
I'm assuming you are writing the GTL and using PROC SGRENDER to render the template with your data. The best way to get the computed data is to use the ODS OUTPUT statement right before the PROC SGRENDER invocation. Assuming you want a data set called "boxdata.sas7bdat":
ods output sgrender=boxdata;
proc sgrender data=whatever template=boxtmpl; run;
proc print data=boxdata; run; /* in case you want to see it in table output */
You can use a libname other than the default "work" to store it permanently.
Hope this helps!
Dan
ods listing close;
ods rtf file = "&figure.\&outname..rtf" style = tfl headery=800 footery=345 author="&sysuserid";
ods graphics / reset imagefmt = png;
ods output sgrender = boxdata;
proc sgrender
data = adlb (where = (paramn = &i.))
template = layoutoverlay;
** Define the dynamic labels;
dynamic xlabel = "Visit"
ylabel = "¶m.";
run;
ods rtf close;
ods listing;
Hi Dan, thanks for your suggestion, yes am using GTL and PROC SGRENDER. It looks like what you are trying to say is what I want, above is my new code, when I run it I am met with a warining:
WARNING: Output 'sgrender' was not created. Make sure that the output object name, label, or path is spelled
correctly. Also, verify that the appropriate procedure options are used to produce the requested
output object. For example, verify that the NOPRINT option is not used.
I am running SAS EG
Oh wait I got it, you clearlly said "right before the SGRENDER". I had a bit of code between the two.
Thanks Dan
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
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.
Ready to level-up your skills? Choose your own adventure.