The SAS Output Delivery System and reporting techniques

ods document and proc tab

Reply
N/A
Posts: 1

ods document and proc tab

Hello,

I'm saving my output using ods document and I'd like to manipulate the results. In my document I have the results of a proc tabulate that breaks the table into multiple pages. I'd like to rearrange the pages using proc document. However, all of the pages seem to be grouped together as one output object.

I decided an approach might be to use the BY statement. Indeed, this generates "bygroup1" and "bygroup2" etc. for each page of the table. That is progress. The only problem is that the Name, Description, and Document Path in the Document all use the name "bygroupN" when I really need to know the actual values. That is, I need to know the page title of that page of the table. I need to know this so I can properly rearrange the pages in the output.

Does my question make sense? I someone can give me some ideas.
Thanks.
SAS Super FREQ
Posts: 8,866

Re: ods document and proc tab

Posted in reply to EricSpear
Hi, Eric:
Play around with the DETAILS option on the PROC DOCUMENT LIST statement. In this example, I also put an ODS OUTPUT statement into the example so you could see that the document info can go into a dataset (if for example, you wanted to make some macro variables) .

(You can also read the ODS DOCUMENT store directly with a LIBNAME engine, I'm just not sure how/where/whether the LABEL for the BY line is accessible by that method.)

cynthia
PS -- I have discovered that if I use BY groups with the BY variable in the TITLE statement (using Title '#BYVAL(byvar)'Smiley Wink that this title stays with the output object and generally when I rearrange the output objects the titles end up in the right places, even when rearranged.

SAS 9.2 has some new enhancements to ODS DOCUMENT and you can read about them here:
http://support.sas.com/documentation/cdl/en/odsug/59523/HTML/default/odsugwhatsnew902.htm (scroll down the page until you see the section for ODS DOCUMENT)
[pre]
ods listing;
options linesize=150;
ods output Document.Properties=work.myprop;

proc document name=work.shoedoc;
title ' the objects in the document store';
list / levels=3 details;
run;
quit;

proc print data=work.myprop;
title 'what is by group info for the document store';
var path type label;
run;[/pre]
Ask a Question
Discussion stats
  • 1 reply
  • 110 views
  • 0 likes
  • 2 in conversation