<?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: macro variable in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/macro-variable/m-p/619531#M181920</link>
    <description>I was not asking for timestamp. I was asking about how to create raw_pips as a macro variable.</description>
    <pubDate>Thu, 23 Jan 2020 14:51:31 GMT</pubDate>
    <dc:creator>mauri0623</dc:creator>
    <dc:date>2020-01-23T14:51:31Z</dc:date>
    <item>
      <title>macro variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/macro-variable/m-p/619519#M181915</link>
      <description>&lt;P&gt;&amp;nbsp;I am trying to create a macro variable called raw_pips. When I do it does not getting resolved.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;30 data _null_;&lt;/P&gt;&lt;P&gt;31 call symputx('timestamp', put(datetime(), B8601DT.));&lt;/P&gt;&lt;P&gt;32 %let raw_pips = PipsDaily_0123_0100.txt;&lt;/P&gt;&lt;P&gt;33 run;&lt;/P&gt;&lt;P&gt;NOTE: DATA statement used (Total process time):&lt;/P&gt;&lt;P&gt;real time 0.01 seconds&lt;/P&gt;&lt;P&gt;cpu time 0.01 seconds&lt;/P&gt;&lt;P&gt;　&lt;/P&gt;&lt;P&gt;34 %put &amp;amp;timestamp; &amp;amp;raw_pips;&lt;/P&gt;&lt;P&gt;20200123T091816&lt;/P&gt;&lt;P&gt;NOTE: Line generated by the macro variable "RAW_PIPS".&lt;/P&gt;&lt;P&gt;1 PipsDaily_0123_0100.txt&lt;/P&gt;&lt;P&gt;-----------------------&lt;/P&gt;&lt;P&gt;180&lt;/P&gt;&lt;P&gt;ERROR 180-322: Statement is not valid or it is used out of proper order.&lt;/P&gt;</description>
      <pubDate>Thu, 23 Jan 2020 14:21:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/macro-variable/m-p/619519#M181915</guid>
      <dc:creator>mauri0623</dc:creator>
      <dc:date>2020-01-23T14:21:31Z</dc:date>
    </item>
    <item>
      <title>Re: macro variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/macro-variable/m-p/619521#M181916</link>
      <description>&lt;P&gt;You have an extra semi-colon that is ending the %put statement.&lt;/P&gt;
&lt;P&gt;Also you are confusing yourself by inserting a %let in the middle of a data step. Move line 32 out of the data step.&lt;/P&gt;</description>
      <pubDate>Thu, 23 Jan 2020 14:25:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/macro-variable/m-p/619521#M181916</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2020-01-23T14:25:24Z</dc:date>
    </item>
    <item>
      <title>Re: macro variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/macro-variable/m-p/619522#M181917</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/181538"&gt;@mauri0623&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;31 call symputx('timestamp', put(datetime(), B8601DT.));&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;It is very rare that you need macro variables for calendar or date/time to be formatted, and usually this is a mistake. If you are going to use the macro variable for some comparison to some other date/time value or a calculation to determine a time/day duration from some other date, formatting does not help and usually produces incorrect results. Leave macro variables for calendar dates or date/time values unformatted, except in the case where you want to use them in a title or label.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;call symputx('timestamp', datetime());&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Jan 2020 14:44:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/macro-variable/m-p/619522#M181917</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-01-23T14:44:33Z</dc:date>
    </item>
    <item>
      <title>Re: macro variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/macro-variable/m-p/619531#M181920</link>
      <description>I was not asking for timestamp. I was asking about how to create raw_pips as a macro variable.</description>
      <pubDate>Thu, 23 Jan 2020 14:51:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/macro-variable/m-p/619531#M181920</guid>
      <dc:creator>mauri0623</dc:creator>
      <dc:date>2020-01-23T14:51:31Z</dc:date>
    </item>
  </channel>
</rss>

