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.
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.)
PS -- I have discovered that if I use BY groups with the BY variable in the TITLE statement (using Title '#BYVAL(byvar)' 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.