<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to get metadata about document charts after they have been created? in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-get-metadata-about-document-charts-after-they-have-been/m-p/230041#M14496</link>
    <description>&lt;P&gt;Thank you, that's exactly what I needed!&lt;/P&gt;</description>
    <pubDate>Thu, 15 Oct 2015 10:02:15 GMT</pubDate>
    <dc:creator>JanSamohyl</dc:creator>
    <dc:date>2015-10-15T10:02:15Z</dc:date>
    <item>
      <title>How to get metadata about document charts after they have been created?</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-get-metadata-about-document-charts-after-they-have-been/m-p/229906#M14480</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a user code producing some ODS charts and I would like to extract some meta-information about them back into SAS. What I would like to know is the titles and keys/values (if using BY statement on charting procedure) of relevant charts, because I would like to build a custom navigation around the charts.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried to set the ODS destination to document for the user code, and then use PROC DOCUMENT, LIST command to query the document after it was created. I was able to extract the document information (including the keys/values) to the LISTING destination, but I don’t know how and if it is possible to get it back as a SAS dataset, so I could match the charts produced. It seems that LIST statement of PROC DOCUMENT produces a table in the output, but I am stumped as to how to get this table back into SAS.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also, this method doesn’t give me the titles for the charts, I am not sure if there is a way to get this information too by querying the document, but it’s a lesser problem.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here’s some code to illustrate what I was trying to do:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;DATA WORK;
INPUT X Y P Q;
DATALINES;
1 1 0 0
2 4 0 0
3 9 0 1
4 16 0 1
5 25 1 0
6 36 1 0
7 49 1 1
8 64 1 1
;

PROC PRINT DATA=WORK;

ODS LISTING CLOSE;
ODS DOCUMENT NAME=DOC1;

TITLE "A fishy graph";
PROC SGPLOT DATA=WORK;
BY P Q;
SERIES X=X Y=Y;
RUN;

TITLE "A weird graph";
PROC SGPLOT DATA=WORK;
BY P;
SERIES X=X Y=Y;
RUN;

TITLE;
ODS DOCUMENT CLOSE;
ODS LISTING gpath="/some_path" (url=none);

ODS DOCUMENT NAME=DOC2;
PROC DOCUMENT NAME=DOC1;
LIST /DETAILS BYGROUPS LEVELS=ALL;
QUIT;
ODS DOCUMENT CLOSE;

ODS LISTING CLOSE;
ODS OUTPUT Properties#2(persist=proc)=KEYS;
PROC DOCUMENT NAME=DOC2;
LIST /DETAILS LEVELS=ALL;
QUIT;
ODS OUTPUT CLOSE;
ODS LISTING;

PROC PRINT DATA=KEYS;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The final PROC PRINT fails because the WORK.KEYS dataset is not there.. I am not sure what exactly should go to the ODS OUTPUT statement to get the output, but I know if I try the other PROC DOCUMENT that the output of first PROC DOCUMENT is two tables, one for each chart. Or maybe there is an easier approach.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you in advance for any help.&lt;/P&gt;&lt;P&gt;(Btw, if that’s of any relevance, I am using SAS Base on mainframe.)&lt;/P&gt;</description>
      <pubDate>Wed, 14 Oct 2015 14:25:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-get-metadata-about-document-charts-after-they-have-been/m-p/229906#M14480</guid>
      <dc:creator>JanSamohyl</dc:creator>
      <dc:date>2015-10-14T14:25:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to get metadata about document charts after they have been created?</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-get-metadata-about-document-charts-after-they-have-been/m-p/229998#M14491</link>
      <description>&lt;P&gt;Try:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;PROC DOCUMENT NAME=DOC1;
LIST /DETAILS BYGROUPS LEVELS=ALL;
ods output Properties=prop;
QUIT;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;and check dataset &lt;STRONG&gt;prop&lt;/STRONG&gt;.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Oct 2015 02:42:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-get-metadata-about-document-charts-after-they-have-been/m-p/229998#M14491</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2015-10-15T02:42:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to get metadata about document charts after they have been created?</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-get-metadata-about-document-charts-after-they-have-been/m-p/230041#M14496</link>
      <description>&lt;P&gt;Thank you, that's exactly what I needed!&lt;/P&gt;</description>
      <pubDate>Thu, 15 Oct 2015 10:02:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-get-metadata-about-document-charts-after-they-have-been/m-p/230041#M14496</guid>
      <dc:creator>JanSamohyl</dc:creator>
      <dc:date>2015-10-15T10:02:15Z</dc:date>
    </item>
  </channel>
</rss>

