<?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: Simple CAT and SYSFUNC question in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Simple-CAT-and-SYSFUNC-question/m-p/342410#M63315</link>
    <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;I get 1996

%let DATE  = %sysfunc(intnx(day,%sysfunc(TODAY()),-1),yymmddd10.); run;
%let test = %sysfunc(cat(Keep Attention ,&amp;amp;date)); %put &amp;amp;test;

2817  %let DATE  = %sysfunc(intnx(day,%sysfunc(TODAY()),-1),yymmddd10.); run;
2818  %let test = %sysfunc(cat(Keep Attention ,&amp;amp;date)); %put &amp;amp;test;
SYMBOLGEN:  Macro variable DATE resolves to 2017-03-18
SYMBOLGEN:  Macro variable TEST resolves to Keep Attention1996

Keep Attention1996

2017 - 03 - 18 = 1996

2017 - 3 = 2015
2015 - 18 = 1996

&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Sun, 19 Mar 2017 22:15:15 GMT</pubDate>
    <dc:creator>rogerjdeangelis</dc:creator>
    <dc:date>2017-03-19T22:15:15Z</dc:date>
    <item>
      <title>Simple CAT and SYSFUNC question</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Simple-CAT-and-SYSFUNC-question/m-p/342367#M63309</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;strange thing happens when I try the following:&lt;/P&gt;
&lt;P&gt;%let DATE &amp;nbsp;= %sysfunc(intnx(day,%sysfunc(TODAY()),-1),yymmddd10.); run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;it works fine and shows as result:&amp;nbsp;&lt;SPAN&gt;2017-03-18 (as&amp;nbsp;today is the 19th, and yesterday was the 18th, so it's okay).&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;But, when you try:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;%let test = %sysfunc(cat(Keep Attention ,&amp;amp;datum)); %put &amp;amp;test;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;you will see that the result is not Keep Attention 2017-03-18, but it's like&amp;nbsp; Keep Attention1988 which seems very strange to me.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Anyone any idea how I can concate the string "2017-03-18" or any similar to an string? The other date formats work fine, but that's not the point.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Regards, Vic&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 19 Mar 2017 17:01:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Simple-CAT-and-SYSFUNC-question/m-p/342367#M63309</guid>
      <dc:creator>Vic</dc:creator>
      <dc:date>2017-03-19T17:01:16Z</dc:date>
    </item>
    <item>
      <title>Re: Simple CAT and SYSFUNC question</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Simple-CAT-and-SYSFUNC-question/m-p/342369#M63310</link>
      <description>&lt;P&gt;It doesn't seem too strange that the combination of %SYSFUNC and CAT might strip the elements being concatenated. &amp;nbsp;1988 is indeed strange. &amp;nbsp;I could imagine getting 1996 if that combination of %SYSUNC and CAT were to actually perform the subtraction (2017 minus 3 minus 18). &amp;nbsp;At any rate, macro language is built to concatenate character strings without functions. &amp;nbsp;Try:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;%let test = Keep Attention &amp;amp;datum;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That should handle the problem nicely.&lt;/P&gt;</description>
      <pubDate>Sun, 19 Mar 2017 17:14:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Simple-CAT-and-SYSFUNC-question/m-p/342369#M63310</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2017-03-19T17:14:24Z</dc:date>
    </item>
    <item>
      <title>Re: Simple CAT and SYSFUNC question</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Simple-CAT-and-SYSFUNC-question/m-p/342376#M63311</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;thank you very much for&amp;nbsp;answering.&amp;nbsp;My point is/was that I use it within a macro as it reads multiple Excelfiles. But maybe my way is not very&amp;nbsp;productive, so I will try your proposal.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I will report if it works :).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards, Vic&lt;/P&gt;</description>
      <pubDate>Sun, 19 Mar 2017 18:08:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Simple-CAT-and-SYSFUNC-question/m-p/342376#M63311</guid>
      <dc:creator>Vic</dc:creator>
      <dc:date>2017-03-19T18:08:48Z</dc:date>
    </item>
    <item>
      <title>Re: Simple CAT and SYSFUNC question</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Simple-CAT-and-SYSFUNC-question/m-p/342378#M63313</link>
      <description>&lt;P&gt;okay, wow, it works. I will try to&amp;nbsp;embed it into a macro, but I don't see&amp;nbsp;that it won't be the right solution. I very think your're right.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It will be something like this at the end:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;%let TEST = MIS 1234 - P9 EXECUTIVE REPORT Export &amp;amp;&amp;amp;DATE&amp;amp;;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;within a macro but I will try tomorrow (as it is late now here in Germany :)).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards, Vic&lt;/P&gt;</description>
      <pubDate>Sun, 19 Mar 2017 18:16:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Simple-CAT-and-SYSFUNC-question/m-p/342378#M63313</guid>
      <dc:creator>Vic</dc:creator>
      <dc:date>2017-03-19T18:16:31Z</dc:date>
    </item>
    <item>
      <title>Re: Simple CAT and SYSFUNC question</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Simple-CAT-and-SYSFUNC-question/m-p/342410#M63315</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;I get 1996

%let DATE  = %sysfunc(intnx(day,%sysfunc(TODAY()),-1),yymmddd10.); run;
%let test = %sysfunc(cat(Keep Attention ,&amp;amp;date)); %put &amp;amp;test;

2817  %let DATE  = %sysfunc(intnx(day,%sysfunc(TODAY()),-1),yymmddd10.); run;
2818  %let test = %sysfunc(cat(Keep Attention ,&amp;amp;date)); %put &amp;amp;test;
SYMBOLGEN:  Macro variable DATE resolves to 2017-03-18
SYMBOLGEN:  Macro variable TEST resolves to Keep Attention1996

Keep Attention1996

2017 - 03 - 18 = 1996

2017 - 3 = 2015
2015 - 18 = 1996

&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 19 Mar 2017 22:15:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Simple-CAT-and-SYSFUNC-question/m-p/342410#M63315</guid>
      <dc:creator>rogerjdeangelis</dc:creator>
      <dc:date>2017-03-19T22:15:15Z</dc:date>
    </item>
    <item>
      <title>Re: Simple CAT and SYSFUNC question</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Simple-CAT-and-SYSFUNC-question/m-p/342412#M63316</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;some solutions;

%symdel test date /nowarn;
%let DATE  = %sysfunc(intnx(day,%sysfunc(TODAY()),-1),yymmddd10.); run;
%let test = %sysfunc(cat(Keep Attention)) &amp;amp;date; %put &amp;amp;test;

Keep Attention 2017-03-18

%symdel test date tst /nowarn;
%let DATE  = %sysfunc(intnx(day,%sysfunc(TODAY()),-1),yymmddd10.); run;
%let test = %sysfunc(cat(Keep Attention,'&amp;amp;date')); %put &amp;amp;test;
%let tst=%sysfunc(compress(&amp;amp;test,%str('')));%put &amp;amp;tst;

Keep Attention 2017-03-18

or

data _null_;

  date=put(intnx('day',%sysfunc(TODAY()),-1),yymmddd10.);
  test = cat('Keep Attention' ,date);
  put test;

run;quit;

&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 19 Mar 2017 22:34:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Simple-CAT-and-SYSFUNC-question/m-p/342412#M63316</guid>
      <dc:creator>rogerjdeangelis</dc:creator>
      <dc:date>2017-03-19T22:34:47Z</dc:date>
    </item>
  </channel>
</rss>

