<?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: LAST DAY OF MONTH WITH QUOTATION MARK Automation in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/LAST-DAY-OF-MONTH-WITH-QUOTATION-MARK-Automation/m-p/289574#M59816</link>
    <description>&lt;P&gt;I would reconsider this entirely, especially for the first part.. The only place that you need "01MAR2016"D or similar would be for date literals. The actual integer values will work just as well. The literal form is so us humans understand what the code is doing instead of trying to make the conversion from 20514.&lt;/P&gt;
&lt;P&gt;Such as&lt;/P&gt;
&lt;PRE&gt;&lt;FONT face="SAS Monospace" size="2"&gt;&lt;CODE class=" language-sas"&gt;%let YYQ = %SYSFUNC(INTNX(QTR, %SYSFUNC(TODAY()), -1, E));


data _null_;
   x=&amp;amp;yyq;
   put "The target date is" +1 x date9.;
run;&lt;/CODE&gt;&lt;/FONT&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any place you would then need '30Mar2016' would very likey work with put(&amp;amp;macrovar,date9.)&amp;nbsp; &amp;lt;Note: no quote for integer looking text from above.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My experience with putting quotes into SAS macro variables is that it almost never works well in the long run or I spend way too much time getting the logic to work, especially for complex code with many variables.&lt;/P&gt;</description>
    <pubDate>Thu, 04 Aug 2016 15:44:35 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2016-08-04T15:44:35Z</dc:date>
    <item>
      <title>LAST DAY OF MONTH WITH QUOTATION MARK Automation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/LAST-DAY-OF-MONTH-WITH-QUOTATION-MARK-Automation/m-p/289523#M59804</link>
      <description>&lt;P&gt;I want to create&amp;nbsp;one macro for the last date of the month with quotation mark and with D suffix,&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;'31MAR2016'D&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;'30JUN2016'D&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;'30SEP2016'D&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;'31DEC2016'D&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;'31MAR2017'D&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;I want to create another macro only with quotation mark...like:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;'31MAR2016'&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;'30JUN2016'&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;'30SEP2016'&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;'31DEC2016'&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;'31MAR2017'&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying with this:&lt;/P&gt;&lt;P&gt;%LET&lt;/P&gt;&lt;P&gt;&lt;FONT size="3" face="Courier New"&gt;&lt;FONT size="3" face="Courier New"&gt;YYQ = &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff" size="3" face="Courier New"&gt;&lt;FONT color="#0000ff" size="3" face="Courier New"&gt;&lt;FONT color="#0000ff" size="3" face="Courier New"&gt;%SYSFUNC&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="3" face="Courier New"&gt;&lt;FONT size="3" face="Courier New"&gt;(INTNX(QTR, &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff" size="3" face="Courier New"&gt;&lt;FONT color="#0000ff" size="3" face="Courier New"&gt;&lt;FONT color="#0000ff" size="3" face="Courier New"&gt;%SYSFUNC&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="3" face="Courier New"&gt;&lt;FONT size="3" face="Courier New"&gt;(TODAY()), -1, E) , DATE9.);&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT size="3" face="Courier New"&gt;&lt;FONT size="3" face="Courier New"&gt;But this does not give quotation mark and D suffix&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Aug 2016 13:32:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/LAST-DAY-OF-MONTH-WITH-QUOTATION-MARK-Automation/m-p/289523#M59804</guid>
      <dc:creator>subrat1</dc:creator>
      <dc:date>2016-08-04T13:32:39Z</dc:date>
    </item>
    <item>
      <title>Re: LAST DAY OF MONTH WITH QUOTATION MARK Automation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/LAST-DAY-OF-MONTH-WITH-QUOTATION-MARK-Automation/m-p/289526#M59807</link>
      <description>If you can live with " instead of ' (because it's easier to handle).&lt;BR /&gt;So, since macro variables is just text right off, just add it to right side of the %let statement. &lt;BR /&gt;The " will allow the macro function calls evaluate, ' won't.</description>
      <pubDate>Thu, 04 Aug 2016 13:39:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/LAST-DAY-OF-MONTH-WITH-QUOTATION-MARK-Automation/m-p/289526#M59807</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2016-08-04T13:39:20Z</dc:date>
    </item>
    <item>
      <title>Re: LAST DAY OF MONTH WITH QUOTATION MARK Automation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/LAST-DAY-OF-MONTH-WITH-QUOTATION-MARK-Automation/m-p/289532#M59809</link>
      <description>&lt;P&gt;Why? &amp;nbsp;Macro language is for generating text, it has no data constructs or data processing functionality. &amp;nbsp;It would be far better to use Base SAS, datasets and such like for processing data. &amp;nbsp;If you provide information on what you are trying to do we can provide code.&lt;/P&gt;</description>
      <pubDate>Thu, 04 Aug 2016 13:48:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/LAST-DAY-OF-MONTH-WITH-QUOTATION-MARK-Automation/m-p/289532#M59809</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2016-08-04T13:48:25Z</dc:date>
    </item>
    <item>
      <title>Re: LAST DAY OF MONTH WITH QUOTATION MARK Automation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/LAST-DAY-OF-MONTH-WITH-QUOTATION-MARK-Automation/m-p/289539#M59810</link>
      <description>&lt;P&gt;What about?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%LET YYQ = "%SYSFUNC(INTNX(QTR, %SYSFUNC(TODAY()), -1, E) , DATE9.)"d;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 04 Aug 2016 14:01:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/LAST-DAY-OF-MONTH-WITH-QUOTATION-MARK-Automation/m-p/289539#M59810</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2016-08-04T14:01:33Z</dc:date>
    </item>
    <item>
      <title>Re: LAST DAY OF MONTH WITH QUOTATION MARK Automation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/LAST-DAY-OF-MONTH-WITH-QUOTATION-MARK-Automation/m-p/289574#M59816</link>
      <description>&lt;P&gt;I would reconsider this entirely, especially for the first part.. The only place that you need "01MAR2016"D or similar would be for date literals. The actual integer values will work just as well. The literal form is so us humans understand what the code is doing instead of trying to make the conversion from 20514.&lt;/P&gt;
&lt;P&gt;Such as&lt;/P&gt;
&lt;PRE&gt;&lt;FONT face="SAS Monospace" size="2"&gt;&lt;CODE class=" language-sas"&gt;%let YYQ = %SYSFUNC(INTNX(QTR, %SYSFUNC(TODAY()), -1, E));


data _null_;
   x=&amp;amp;yyq;
   put "The target date is" +1 x date9.;
run;&lt;/CODE&gt;&lt;/FONT&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any place you would then need '30Mar2016' would very likey work with put(&amp;amp;macrovar,date9.)&amp;nbsp; &amp;lt;Note: no quote for integer looking text from above.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My experience with putting quotes into SAS macro variables is that it almost never works well in the long run or I spend way too much time getting the logic to work, especially for complex code with many variables.&lt;/P&gt;</description>
      <pubDate>Thu, 04 Aug 2016 15:44:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/LAST-DAY-OF-MONTH-WITH-QUOTATION-MARK-Automation/m-p/289574#M59816</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2016-08-04T15:44:35Z</dc:date>
    </item>
    <item>
      <title>Re: LAST DAY OF MONTH WITH QUOTATION MARK Automation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/LAST-DAY-OF-MONTH-WITH-QUOTATION-MARK-Automation/m-p/289736#M59858</link>
      <description>&lt;PRE&gt;
%LET YYQ =%SYSFUNC(QUOTE( %SYSFUNC(INTNX(QTR, %SYSFUNC(TODAY()), -1, E) , DATE9.)))D;

%put &amp;amp;YYQ ;

&lt;/PRE&gt;</description>
      <pubDate>Fri, 05 Aug 2016 07:19:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/LAST-DAY-OF-MONTH-WITH-QUOTATION-MARK-Automation/m-p/289736#M59858</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2016-08-05T07:19:16Z</dc:date>
    </item>
  </channel>
</rss>

