<?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: PROC DOCUMENT replay does not preserve dattrmap in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/PROC-DOCUMENT-replay-does-not-preserve-dattrmap/m-p/768582#M21992</link>
    <description>&lt;P&gt;Yes, this is an issue that needs to be addressed, I would recommend calling Technical Supporting and entering a ticket. In the meantime, there are two workarounds to consider:&lt;/P&gt;
&lt;P&gt;1. If you embed the attribute map in the GTL instead of using a data set, you will not have this replay issue.&lt;/P&gt;
&lt;P&gt;2. The other SG procedures do not have this replay issue with attribute map data sets. If you can recreate your graph using the other procedures, the data-driven attribute map will work for you.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this helps!&lt;/P&gt;
&lt;P&gt;Dan&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 20 Sep 2021 15:16:38 GMT</pubDate>
    <dc:creator>DanH_sas</dc:creator>
    <dc:date>2021-09-20T15:16:38Z</dc:date>
    <item>
      <title>PROC DOCUMENT replay does not preserve dattrmap</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/PROC-DOCUMENT-replay-does-not-preserve-dattrmap/m-p/768483#M21989</link>
      <description>&lt;P&gt;I have found an issue when replaying the output from PROC SGRENDER with a user defined template with a discrete attribute map, the replay called by PROC DOCUMENT does not preserve the attributes contained in the dattrmap. Is there a solution to this or is this a bug?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is an example of the behavior:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/* Create the attribute map data set */
data attrmap;
  length ID VALUE MARKERCOLOR MARKERSYMBOL LINECOLOR LINEPATTERN $15;
  input ID$ VALUE$ MARKERCOLOR$ MARKERSYMBOL$ LINECOLOR$ LINEPATTERN$;
datalines;
stockname IBM       red   circlefilled   red   solid
stockname Intel     green trianglefilled green shortdash
stockname Microsoft blue  squarefilled   blue  dot
;
run;

/* Create a stock data set for the year 2002 */
proc sort data=sashelp.stocks out=stocks;
  by stock date;
  where date between '01JAN02'd and '30DEC02'd;
run;

/* Create a template for IBM, Microsoft, and Intel stocks */
proc template;
define statgraph stockchart;
begingraph;
  entrytitle "Trends for IBM, Intel, and Microsoft";
  discreteattrvar attrvar=stockmarkers var=stock
    attrmap="stockname";
  layout overlay;
    seriesplot x=date y=close /
      group=stockmarkers
      display=(markers)
      name="trends";
    discretelegend "trends" / title="Stock Trends";
  endlayout;
endgraph;
end;
run;

ods document name=work.test;
/* Plot the stock trends */
proc sgrender data=stocks dattrmap=attrmap template=stockchart;
run;
ods document close;

/* replay PROC SGRENDER output */
proc document name=work.test;
	replay;
run;
quit;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;The output of the above code is below. Clearly, the output from the PROC DOCUMENT replay is missing the attributes contained in work.attrmap . Any help on this would be appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="PROC SGRENDER output" style="width: 641px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/63713i438F59020BF22035/image-size/large?v=v2&amp;amp;px=999" role="button" title="PROC_SGRENDER.png" alt="PROC SGRENDER output" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;PROC SGRENDER output&lt;/span&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="PROC DOCUMENT Replay output" style="width: 641px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/63714iC5FAEF62A3FC7C76/image-size/large?v=v2&amp;amp;px=999" role="button" title="Replay.png" alt="PROC DOCUMENT Replay output" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;PROC DOCUMENT Replay output&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 19 Sep 2021 18:58:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/PROC-DOCUMENT-replay-does-not-preserve-dattrmap/m-p/768483#M21989</guid>
      <dc:creator>sjb1</dc:creator>
      <dc:date>2021-09-19T18:58:31Z</dc:date>
    </item>
    <item>
      <title>Re: PROC DOCUMENT replay does not preserve dattrmap</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/PROC-DOCUMENT-replay-does-not-preserve-dattrmap/m-p/768582#M21992</link>
      <description>&lt;P&gt;Yes, this is an issue that needs to be addressed, I would recommend calling Technical Supporting and entering a ticket. In the meantime, there are two workarounds to consider:&lt;/P&gt;
&lt;P&gt;1. If you embed the attribute map in the GTL instead of using a data set, you will not have this replay issue.&lt;/P&gt;
&lt;P&gt;2. The other SG procedures do not have this replay issue with attribute map data sets. If you can recreate your graph using the other procedures, the data-driven attribute map will work for you.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this helps!&lt;/P&gt;
&lt;P&gt;Dan&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 20 Sep 2021 15:16:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/PROC-DOCUMENT-replay-does-not-preserve-dattrmap/m-p/768582#M21992</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2021-09-20T15:16:38Z</dc:date>
    </item>
    <item>
      <title>Re: PROC DOCUMENT replay does not preserve dattrmap</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/PROC-DOCUMENT-replay-does-not-preserve-dattrmap/m-p/768598#M21993</link>
      <description>&lt;P&gt;Hi Dan,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was hoping to avoid embedding the attribute within the GTL itself as the rest of my workflow references the attribute maps. Anyways, thank you for your insight.&lt;/P&gt;</description>
      <pubDate>Mon, 20 Sep 2021 16:07:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/PROC-DOCUMENT-replay-does-not-preserve-dattrmap/m-p/768598#M21993</guid>
      <dc:creator>sjb1</dc:creator>
      <dc:date>2021-09-20T16:07:16Z</dc:date>
    </item>
  </channel>
</rss>

