<?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: Export file is blank in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Export-file-is-blank/m-p/490264#M72095</link>
    <description>&lt;P&gt;Considering the error message from your initial post you may not want:&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;WFR_AllData&amp;nbsp;&lt;/PRE&gt;
&lt;P&gt;in the MERGE statement either.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In general, it's not good practice to include the data set name to be the same as one of the input or MERGE data sets because you then overwrite that data set and its harder to debug and find errors. And if you have no way to recreate that input data set it's gone for good.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want; *bad idea, it replaces WANT with new data, old data is lost;
set want;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 27 Aug 2018 21:38:51 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2018-08-27T21:38:51Z</dc:date>
    <item>
      <title>Export file is blank</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Export-file-is-blank/m-p/490257#M72090</link>
      <description>&lt;P&gt;I have a feeling this is a super basic question, but I can't seem to find an answer online. I am working on a project where I needed to manipulate six individual datasets and then merge them together based on an ID number (PublicID). The individual manipulations all work fine, but I'm getting stuck on the final step of merging and exporting.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is my code:&lt;/P&gt;&lt;PRE&gt;/***** MERGE IT ALL TOGETHER! *****/

data WFR_AllData;
set WFR_AllData;
	merge WFR_Certification WFR_CourseworkNEW WFR_DegreeNEW WFR_Demographics WFR_EmploymentNEW WFR_PDNEW;
by PublicID;
run;

proc print data=WFR_AllData (obs = 10);
run;&lt;/PRE&gt;&lt;P&gt;And here is the error message:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;465  /***** MERGE IT ALL TOGETHER! *****/
466
467  data WFR_AllData;
468  set WFR_AllData;
ERROR: File WORK.WFR_ALLDATA.DATA does not exist.
469      merge WFR_Certification WFR_CourseworkNEW WFR_DegreeNEW WFR_Demographics
469! WFR_EmploymentNEW WFR_PDNEW;
470  by PublicID;
471  run;

NOTE: The SAS System stopped processing this step because of errors.
WARNING: The data set WORK.WFR_ALLDATA may be incomplete.  When this step was stopped there were
         0 observations and 426 variables.
NOTE: DATA statement used (Total process time):
      real time           0.01 seconds
      cpu time            0.01 seconds


472
473  proc print data=WFR_AllData (obs = 10);
474  run;

NOTE: No observations in data set WORK.WFR_ALLDATA.
NOTE: PROCEDURE PRINT used (Total process time):
      real time           0.00 seconds
      cpu time            0.00 seconds&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Am I missing a step? When I go to export the file (I just did this through the menu), it has a row of variable names but nothing else.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance for your help!&lt;/P&gt;</description>
      <pubDate>Mon, 27 Aug 2018 21:05:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Export-file-is-blank/m-p/490257#M72090</guid>
      <dc:creator>rhilty</dc:creator>
      <dc:date>2018-08-27T21:05:59Z</dc:date>
    </item>
    <item>
      <title>Re: Export file is blank</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Export-file-is-blank/m-p/490259#M72091</link>
      <description>&lt;P&gt;do you wanna merge(horizontal combine)&lt;/P&gt;
&lt;P&gt;data want;&lt;/P&gt;
&lt;P&gt;merge dtset1 dtsset2 dtsetn;&lt;/P&gt;
&lt;P&gt;by id;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;or sorted append(stack one over another) aka interleave?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data want;&lt;/P&gt;
&lt;P&gt;set&amp;nbsp;&lt;SPAN&gt;dtset1 dtsset2 dtsetn;;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;by id;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;run;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Aug 2018 21:17:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Export-file-is-blank/m-p/490259#M72091</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2018-08-27T21:17:03Z</dc:date>
    </item>
    <item>
      <title>Re: Export file is blank</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Export-file-is-blank/m-p/490260#M72092</link>
      <description>&lt;P&gt;Horizontal combine using merge. I was trying to create a new blank dataset (WFR_AllData) to merge everything into.&lt;/P&gt;</description>
      <pubDate>Mon, 27 Aug 2018 21:19:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Export-file-is-blank/m-p/490260#M72092</guid>
      <dc:creator>rhilty</dc:creator>
      <dc:date>2018-08-27T21:19:25Z</dc:date>
    </item>
    <item>
      <title>Re: Export file is blank</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Export-file-is-blank/m-p/490262#M72093</link>
      <description>&lt;PRE&gt;data WFR_AllData;
merge WFR_AllData
	WFR_Certification WFR_CourseworkNEW WFR_DegreeNEW WFR_Demographics WFR_EmploymentNEW WFR_PDNEW;
by PublicID;
run;&lt;/PRE&gt;
&lt;P&gt;would the corrected syntax above help?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Although i am not clear what you mean creating a blank dataset to merge everything&lt;/P&gt;</description>
      <pubDate>Mon, 27 Aug 2018 21:25:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Export-file-is-blank/m-p/490262#M72093</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2018-08-27T21:25:31Z</dc:date>
    </item>
    <item>
      <title>Re: Export file is blank</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Export-file-is-blank/m-p/490263#M72094</link>
      <description>Thank you so much! The extra set statement must have been what was causing the error.</description>
      <pubDate>Mon, 27 Aug 2018 21:27:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Export-file-is-blank/m-p/490263#M72094</guid>
      <dc:creator>rhilty</dc:creator>
      <dc:date>2018-08-27T21:27:21Z</dc:date>
    </item>
    <item>
      <title>Re: Export file is blank</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Export-file-is-blank/m-p/490264#M72095</link>
      <description>&lt;P&gt;Considering the error message from your initial post you may not want:&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;WFR_AllData&amp;nbsp;&lt;/PRE&gt;
&lt;P&gt;in the MERGE statement either.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In general, it's not good practice to include the data set name to be the same as one of the input or MERGE data sets because you then overwrite that data set and its harder to debug and find errors. And if you have no way to recreate that input data set it's gone for good.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want; *bad idea, it replaces WANT with new data, old data is lost;
set want;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Aug 2018 21:38:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Export-file-is-blank/m-p/490264#M72095</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-08-27T21:38:51Z</dc:date>
    </item>
    <item>
      <title>Re: Export file is blank</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Export-file-is-blank/m-p/490266#M72096</link>
      <description>I took that out before I ran it, but thanks for flagging!</description>
      <pubDate>Mon, 27 Aug 2018 21:46:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Export-file-is-blank/m-p/490266#M72096</guid>
      <dc:creator>rhilty</dc:creator>
      <dc:date>2018-08-27T21:46:27Z</dc:date>
    </item>
  </channel>
</rss>

