<?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: concatenating the data sets with previous day in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/concatenating-the-data-sets-with-previous-day/m-p/437007#M108771</link>
    <description>&lt;PRE&gt;%let x = %sysfunc(cats(test,%sysfunc(intnx(day,%sysfunc(today()),-1),mmddyy6.)));&lt;/PRE&gt;
&lt;P&gt;This is way to complicated. Using a datastep will result in code that is easier to read and debug:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;data _null_;
   yesterday = put(today() - 1, mmddyy6.);
   call symputx('x', cats('test', yesterday));
run;

%put &amp;amp;=x;&lt;/PRE&gt;</description>
    <pubDate>Wed, 14 Feb 2018 07:50:45 GMT</pubDate>
    <dc:creator>andreas_lds</dc:creator>
    <dc:date>2018-02-14T07:50:45Z</dc:date>
    <item>
      <title>concatenating the data sets with previous day</title>
      <link>https://communities.sas.com/t5/SAS-Programming/concatenating-the-data-sets-with-previous-day/m-p/437004#M108770</link>
      <description>&lt;P&gt;Hi Folks&lt;/P&gt;&lt;P&gt;I am working on a small automation of manual testing in SAS ,we primarily take data sets from different directories and validate the field in the data sets.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;so ihave taken two libraries in one sas code for example&lt;/P&gt;&lt;P&gt;libname in1 "/path1"&lt;BR /&gt;libname in2 "/path2"&lt;/P&gt;&lt;P&gt;and saved them in test.sas and saved them in output library&lt;/P&gt;&lt;P&gt;my output datasets in libraries will in the following format&lt;BR /&gt;1)test021318&lt;BR /&gt;2)testa021318&lt;BR /&gt;3)testb021318&lt;/P&gt;&lt;P&gt;in all libraries in1,in2 the names of datasets will be same but only paths will differ .&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;so to make the testing process bit easier and generic i have written a small snippet like this&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;%include "/path/output/" ;----where libraries are stored in one file&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;%let x = %sysfunc(cats(test,%sysfunc(intnx(day,%sysfunc(today()),-1),mmddyy6.)));&lt;BR /&gt;%let y = %sysfunc(cats(testa,%sysfunc(intnx(day,%sysfunc(today()),-1),mmddyy6.)));&lt;BR /&gt;%let z = %sysfunc(cats(testb,%sysfunc(intnx(day,%sysfunc(today()),-1),mmddyy6.)));&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;libname out "/path/output/";&lt;/P&gt;&lt;P&gt;%put &amp;amp;x &amp;amp;y &amp;amp;z;&lt;/P&gt;&lt;P&gt;data out.final;&lt;BR /&gt;set in1.&amp;amp;x in1.&amp;amp;y in1.&amp;amp;z&lt;BR /&gt;in2.&amp;amp;x in2.&amp;amp;y in2.&amp;amp;z&lt;BR /&gt;;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;proc print data=out.final;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;but my output is printing like this&lt;/P&gt;&lt;P&gt;ERROR: File IN1.test21318.DATA does not exist.&lt;BR /&gt;ERROR: File IN1.testa21318.DATA does not exist.&lt;BR /&gt;ERROR: File IN1.testb21318.DATA does not exist.&lt;BR /&gt;ERROR: File IN2.test21318.DATA does not exist.&lt;BR /&gt;ERROR: File IN2.testa21318.DATA does not exist.&lt;BR /&gt;ERROR: File IN2.testb21318.DATA does not exist.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but in actual output locations datasets will be in the following format&lt;/P&gt;&lt;P&gt;test021318.sas7bdat&lt;BR /&gt;testa021318.sas7bdat&lt;BR /&gt;testb021318.sas7bdat&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;dataset will be with previous day&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;could you kindly help me in achieving the desired result.&lt;/P&gt;</description>
      <pubDate>Wed, 14 Feb 2018 07:16:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/concatenating-the-data-sets-with-previous-day/m-p/437004#M108770</guid>
      <dc:creator>niteshbharadwaj</dc:creator>
      <dc:date>2018-02-14T07:16:01Z</dc:date>
    </item>
    <item>
      <title>Re: concatenating the data sets with previous day</title>
      <link>https://communities.sas.com/t5/SAS-Programming/concatenating-the-data-sets-with-previous-day/m-p/437007#M108771</link>
      <description>&lt;PRE&gt;%let x = %sysfunc(cats(test,%sysfunc(intnx(day,%sysfunc(today()),-1),mmddyy6.)));&lt;/PRE&gt;
&lt;P&gt;This is way to complicated. Using a datastep will result in code that is easier to read and debug:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;data _null_;
   yesterday = put(today() - 1, mmddyy6.);
   call symputx('x', cats('test', yesterday));
run;

%put &amp;amp;=x;&lt;/PRE&gt;</description>
      <pubDate>Wed, 14 Feb 2018 07:50:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/concatenating-the-data-sets-with-previous-day/m-p/437007#M108771</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2018-02-14T07:50:45Z</dc:date>
    </item>
    <item>
      <title>Re: concatenating the data sets with previous day</title>
      <link>https://communities.sas.com/t5/SAS-Programming/concatenating-the-data-sets-with-previous-day/m-p/437040#M108785</link>
      <description>&lt;P&gt;Will the dataset always be having name as&amp;nbsp;&lt;SPAN&gt;%sysfunc(today()),-1?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Instead once the libname for in1 and in2 is set,&amp;nbsp;you can use the dictionary.tables to read the dataset names from the library into macro variables and use it in your subsequent datasteps.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;For instance,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;libname in1 "/path1"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;proc sql;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;select memname into :_Dsn1-:_Dsn3&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;from dictionary.tables where libname = "in1";&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;quit;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;%put &amp;amp;_Dsn1;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;based on the no of datasets you are comparing you can create mv's.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Feb 2018 11:06:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/concatenating-the-data-sets-with-previous-day/m-p/437040#M108785</guid>
      <dc:creator>ashkar</dc:creator>
      <dc:date>2018-02-14T11:06:23Z</dc:date>
    </item>
  </channel>
</rss>

