<?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: GTL Conditional logic for flexible axes in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/GTL-Conditional-logic-for-flexible-axes/m-p/275403#M9832</link>
    <description>&lt;P&gt;That was the problem.&amp;nbsp; I missed that.&amp;nbsp; So my solution was to add this to my code:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="2"&gt;_NULL_&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;set&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt; &amp;amp;dsn;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;call&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt; symput(&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;'xform'&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;,(vformatn(&amp;amp;x)));&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;Then I can pass the value of &amp;amp;xform into GTL for the conditional logic and now it works perfectly!&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;Thanks&lt;/FONT&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 06 Jun 2016 14:20:22 GMT</pubDate>
    <dc:creator>ANWZimmerman</dc:creator>
    <dc:date>2016-06-06T14:20:22Z</dc:date>
    <item>
      <title>GTL Conditional logic for flexible axes</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/GTL-Conditional-logic-for-flexible-axes/m-p/275122#M9829</link>
      <description>&lt;P&gt;I'm working on a template that may have on the xaxes either an integer that is a count of months, or a SAS date.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I need different options for these.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I had hoped I could put both my LINEAROPTS and my TIMEOPTS on the same COLUMNAXIS statement thinking that SGRENDER would pick the ones that make sense and ignore the other.&amp;nbsp; Didn't work out.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I know my SAS dates have a MONYY type format, so I turned to conditional logic like follows:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt; if (vformatn(_X) = &lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;"MONYY"&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;)&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; columnaxes;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; columnaxis&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt; / &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;griddisplay&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;=on &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;timeopts&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;=(minorgrid=true minorticks=true minortickinterval=month&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;);&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&amp;nbsp;&amp;nbsp; endcolumnaxes&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;else&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; columnaxes;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; columnaxis&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt; / &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;griddisplay&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;=on &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;linearopts&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;=(minorgrid=true&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;);&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&amp;nbsp;&amp;nbsp; endcolumnaxes&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#ff0000" face="Courier New" size="2"&gt;&lt;FONT color="#ff0000" face="Courier New" size="2"&gt;&lt;FONT color="#ff0000" face="Courier New" size="2"&gt;endif&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#008000" face="Courier New" size="2"&gt;&lt;FONT color="#008000" face="Courier New" size="2"&gt;&lt;FONT color="#008000" face="Courier New" size="2"&gt;/*sas date or not*/&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000000" face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;But this isn't working as expected.&amp;nbsp; If I pass a linear value for _X it's fine, but if I pass a SAS date I don't get my&amp;nbsp;axes options and I'm struggling to figure out why.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#008000" face="Courier New" size="2"&gt;&lt;FONT color="#008000" face="Courier New" size="2"&gt;&lt;FONT color="#008000" face="Courier New" size="2"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#008000" face="Courier New" size="2"&gt;&lt;FONT color="#008000" face="Courier New" size="2"&gt;&lt;FONT color="#008000" face="Courier New" size="2"&gt;Thanks (SAS 9.4 M3)&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 03 Jun 2016 21:21:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/GTL-Conditional-logic-for-flexible-axes/m-p/275122#M9829</guid>
      <dc:creator>ANWZimmerman</dc:creator>
      <dc:date>2016-06-03T21:21:46Z</dc:date>
    </item>
    <item>
      <title>Re: GTL Conditional logic for flexible axes</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/GTL-Conditional-logic-for-flexible-axes/m-p/275124#M9830</link>
      <description>&lt;P&gt;Oh, it wasn't super clear to me if I wanted FORMATN or FORMATNX so I tried both, neither worked.&lt;/P&gt;</description>
      <pubDate>Fri, 03 Jun 2016 21:39:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/GTL-Conditional-logic-for-flexible-axes/m-p/275124#M9830</guid>
      <dc:creator>ANWZimmerman</dc:creator>
      <dc:date>2016-06-03T21:39:39Z</dc:date>
    </item>
    <item>
      <title>Re: GTL Conditional logic for flexible axes</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/GTL-Conditional-logic-for-flexible-axes/m-p/275127#M9831</link>
      <description>&lt;P&gt;From the GTL documentation:&lt;/P&gt;
&lt;P&gt;SAS functions that can be used in a WHERE expression include&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;character handling functions&lt;/LI&gt;
&lt;LI&gt;date and time functions&lt;/LI&gt;
&lt;LI&gt;mathematical and statistical functions.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&lt;STRONG&gt;Note:&lt;/STRONG&gt; Not all SAS functions are available in WHERE expressions. Call routines and other DATA-step-only functions (for example, LAG, VNAME, OPEN) are some examples of functions that cannot be used.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Since they explicitly state VNAME isn't available I would extend that to all of the variable information functions. So make the value a parameter that can be passed to the GTL.&lt;/P&gt;
&lt;P&gt;I suspect that you were getting things to work for the "numeric" values as the compare always failed and the else behavior kicked in. Did you look for any notes in the log when the template was compiled?&lt;/P&gt;</description>
      <pubDate>Fri, 03 Jun 2016 22:23:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/GTL-Conditional-logic-for-flexible-axes/m-p/275127#M9831</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2016-06-03T22:23:37Z</dc:date>
    </item>
    <item>
      <title>Re: GTL Conditional logic for flexible axes</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/GTL-Conditional-logic-for-flexible-axes/m-p/275403#M9832</link>
      <description>&lt;P&gt;That was the problem.&amp;nbsp; I missed that.&amp;nbsp; So my solution was to add this to my code:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="2"&gt;_NULL_&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;set&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt; &amp;amp;dsn;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;call&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt; symput(&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;'xform'&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;,(vformatn(&amp;amp;x)));&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;Then I can pass the value of &amp;amp;xform into GTL for the conditional logic and now it works perfectly!&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;Thanks&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Jun 2016 14:20:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/GTL-Conditional-logic-for-flexible-axes/m-p/275403#M9832</guid>
      <dc:creator>ANWZimmerman</dc:creator>
      <dc:date>2016-06-06T14:20:22Z</dc:date>
    </item>
  </channel>
</rss>

