<?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 Can some one please help me with editing a data file? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Can-some-one-please-help-me-with-editing-a-data-file/m-p/160309#M31205</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I merged two data files from the CDC's NHIS 2012 data files ( the adult and disability files). The merge was successful however I cannot do anything with the merged data file to edit the data. I can print out the data and run freqs and means but I can not change any of the variables. For example, when I try to recode a variable or create a new variable, SAS deletes all of the variables in the data set and or says that the variable is uninitialized. If anyone can lend a hand I would greatly appreciate it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 30 Nov 2013 18:26:56 GMT</pubDate>
    <dc:creator>acb07010</dc:creator>
    <dc:date>2013-11-30T18:26:56Z</dc:date>
    <item>
      <title>Can some one please help me with editing a data file?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Can-some-one-please-help-me-with-editing-a-data-file/m-p/160309#M31205</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I merged two data files from the CDC's NHIS 2012 data files ( the adult and disability files). The merge was successful however I cannot do anything with the merged data file to edit the data. I can print out the data and run freqs and means but I can not change any of the variables. For example, when I try to recode a variable or create a new variable, SAS deletes all of the variables in the data set and or says that the variable is uninitialized. If anyone can lend a hand I would greatly appreciate it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 30 Nov 2013 18:26:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Can-some-one-please-help-me-with-editing-a-data-file/m-p/160309#M31205</guid>
      <dc:creator>acb07010</dc:creator>
      <dc:date>2013-11-30T18:26:56Z</dc:date>
    </item>
    <item>
      <title>Re: Can some one please help me with editing a data file?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Can-some-one-please-help-me-with-editing-a-data-file/m-p/160310#M31206</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sounds like you are forgetting to pull in the data, like you are missing the SET statement.&lt;/P&gt;&lt;P&gt;data want ;&lt;/P&gt;&lt;P&gt;&amp;nbsp; set old;&lt;/P&gt;&lt;P&gt;&amp;nbsp; newvar = oldvar/10;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 30 Nov 2013 18:40:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Can-some-one-please-help-me-with-editing-a-data-file/m-p/160310#M31206</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2013-11-30T18:40:15Z</dc:date>
    </item>
    <item>
      <title>Re: Can some one please help me with editing a data file?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Can-some-one-please-help-me-with-editing-a-data-file/m-p/160311#M31207</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thank so much for replying ....however i did use the set command to set the permanent merged file i created to a temporary file.&amp;nbsp; This is what I had in my code:&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;LIBNAME&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; nhisproj &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: purple; background: white;"&gt;"P:\Project"&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;STRONG style="color: navy; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;DATA&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; nhisproj.NHIS2012perm;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;set&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; TMP1.NHIScombined2;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;KEEP&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; SEX&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RACERPI2&amp;nbsp;&amp;nbsp;&amp;nbsp; AFD_FLG DOINGLWA&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AGE_P BMI &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FLA1AR&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MOB_2R&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MOB_3F&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FLSOCL&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AFLHCA18&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AFLHCA17 UB_SS&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AFLHCA13&amp;nbsp;&amp;nbsp;&amp;nbsp; ALHCA14A AFLHCA15; &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: green; background: white;"&gt;/*Subset variables*/&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;STRONG style="color: navy; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;RUN&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;STRONG style="color: navy; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;PROC&lt;/STRONG&gt; &lt;STRONG style="color: navy; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;PRINT&lt;/STRONG&gt; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;DATA&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;=NHISproj.NHIS2012perm; &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: green; background: white;"&gt;/*Print the small subset*/&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;STRONG style="color: navy; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;RUN&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;and this works fine but then when i try to do anything with the variables like recode them or create new variables it does not work.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 30 Nov 2013 23:36:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Can-some-one-please-help-me-with-editing-a-data-file/m-p/160311#M31207</guid>
      <dc:creator>acb07010</dc:creator>
      <dc:date>2013-11-30T23:36:22Z</dc:date>
    </item>
    <item>
      <title>Re: Can some one please help me with editing a data file?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Can-some-one-please-help-me-with-editing-a-data-file/m-p/160312#M31208</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The KEEP statement applies to the output data set (nhisproj.NHIS2012perm). So make sure that any new variable you create is listed in the KEEP statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I suggest that you omit the KEEP statement while you're developing code.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 30 Nov 2013 23:50:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Can-some-one-please-help-me-with-editing-a-data-file/m-p/160312#M31208</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2013-11-30T23:50:25Z</dc:date>
    </item>
    <item>
      <title>Re: Can some one please help me with editing a data file?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Can-some-one-please-help-me-with-editing-a-data-file/m-p/160313#M31209</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You have created a permanent SAS file called &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;NHISproj.NHIS2012perm.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;Make sure when you perform data transformation you assign the correct permanent SAS path:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;data &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;NHISproj.NHIS2012perm;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; set &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;NHISproj.NHIS2012perm;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt; transformation code &amp;gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;run;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Dec 2013 21:05:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Can-some-one-please-help-me-with-editing-a-data-file/m-p/160313#M31209</guid>
      <dc:creator>pronabesh</dc:creator>
      <dc:date>2013-12-06T21:05:12Z</dc:date>
    </item>
    <item>
      <title>Re: Can some one please help me with editing a data file?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Can-some-one-please-help-me-with-editing-a-data-file/m-p/160314#M31210</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Also, did you see any error in the SAS log?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Dec 2013 21:06:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Can-some-one-please-help-me-with-editing-a-data-file/m-p/160314#M31210</guid>
      <dc:creator>pronabesh</dc:creator>
      <dc:date>2013-12-06T21:06:15Z</dc:date>
    </item>
    <item>
      <title>Re: Can some one please help me with editing a data file?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Can-some-one-please-help-me-with-editing-a-data-file/m-p/160315#M31211</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I recommend that you NOT reuse the input and output data for this if you are recoding actual values of original variables as you'll end up having to redownload/combine data if you make an error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have seen this done to a data set reducing the number of categories such as:&lt;/P&gt;&lt;P&gt;if x&amp;gt;4 then x=4;&lt;/P&gt;&lt;P&gt;Else if x in (3,4) then x=2;&lt;/P&gt;&lt;P&gt;else if x =2 then x=0;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;While modifying code affecting other variables and making changes, the value of X eventually becomes 0 or 1 when it should be 0,1,2 or 4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Better is to&lt;/P&gt;&lt;P&gt;Data newrecodes;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; set basedata;&lt;/P&gt;&lt;P&gt;&amp;lt;recodes&amp;gt;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, Formats are often much more effecient for many grouping tasks than creating new variables.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Dec 2013 22:37:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Can-some-one-please-help-me-with-editing-a-data-file/m-p/160315#M31211</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2013-12-06T22:37:48Z</dc:date>
    </item>
    <item>
      <title>Re: Can some one please help me with editing a data file?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Can-some-one-please-help-me-with-editing-a-data-file/m-p/160316#M31212</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think you will get better advice if you post the code that isn't doing what you expect.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Dec 2013 22:42:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Can-some-one-please-help-me-with-editing-a-data-file/m-p/160316#M31212</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2013-12-06T22:42:34Z</dc:date>
    </item>
  </channel>
</rss>

