<?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 How to work on imported SPSS (*.sav) file in SAS ? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-work-on-imported-SPSS-sav-file-in-SAS/m-p/47308#M9773</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As noticed in SAS, when imported SPSS file, it also create a "formats" sub-directory, which contains all the format of the variables, telling 1 = Yes, 0 = No. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then the question now will be that how to let character formats as the actual character values rather than numeric ? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Fred&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 12 Aug 2011 03:24:30 GMT</pubDate>
    <dc:creator>Fred_Gavin</dc:creator>
    <dc:date>2011-08-12T03:24:30Z</dc:date>
    <item>
      <title>How to work on imported SPSS (*.sav) file in SAS ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-work-on-imported-SPSS-sav-file-in-SAS/m-p/47307#M9772</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear All, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My original SPSS data can be viewed in both numeric and character values, i.e. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1 = Yes; 0 = No; In SPSS, you can either view them in numeric or character format. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I imported the SPSS data to SAS, the data retains SPSS's character value appearance, but with numeric type. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I was wondering whether I can convert them to actual character type, and work on those character value. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes&lt;/P&gt;&lt;P&gt;Yes&lt;/P&gt;&lt;P&gt;No&lt;/P&gt;&lt;P&gt;No&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;appears in SAS data, but their true type is numeric, which are 1 1 0 0. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I keep them as character value as (Yes No) when they are imported to SAS ? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Fred&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Aug 2011 03:11:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-work-on-imported-SPSS-sav-file-in-SAS/m-p/47307#M9772</guid>
      <dc:creator>Fred_Gavin</dc:creator>
      <dc:date>2011-08-12T03:11:54Z</dc:date>
    </item>
    <item>
      <title>How to work on imported SPSS (*.sav) file in SAS ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-work-on-imported-SPSS-sav-file-in-SAS/m-p/47308#M9773</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As noticed in SAS, when imported SPSS file, it also create a "formats" sub-directory, which contains all the format of the variables, telling 1 = Yes, 0 = No. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then the question now will be that how to let character formats as the actual character values rather than numeric ? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Fred&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Aug 2011 03:24:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-work-on-imported-SPSS-sav-file-in-SAS/m-p/47308#M9773</guid>
      <dc:creator>Fred_Gavin</dc:creator>
      <dc:date>2011-08-12T03:24:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to work on imported SPSS (*.sav) file in SAS ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-work-on-imported-SPSS-sav-file-in-SAS/m-p/47309#M9774</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Fred,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I may not understand what you are trying to accomplish, but it sounds like you simply want a copy of the file as it would be created by proc sql.&amp;nbsp; Does the following mimic what you are trying to do?:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/* Create format and build test file with formats */&lt;/P&gt;&lt;P&gt;proc format;&lt;/P&gt;&lt;P&gt;&amp;nbsp; value&lt;/P&gt;&lt;P&gt;&amp;nbsp; $gender&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; 'M'='Male'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; 'F'='Female';&lt;/P&gt;&lt;P&gt;&amp;nbsp; value&lt;/P&gt;&lt;P&gt;&amp;nbsp; agegroup&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; low-14='Young'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; otherwise='Old';&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data test;&lt;/P&gt;&lt;P&gt;&amp;nbsp; set sashelp.class;&lt;/P&gt;&lt;P&gt;&amp;nbsp; format sex $gender.;&lt;/P&gt;&lt;P&gt;&amp;nbsp; format age agegroup.;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/* Create a copy of file with formatted values */&lt;/P&gt;&lt;P&gt;proc sql noprint;&lt;/P&gt;&lt;P&gt;&amp;nbsp; create table want as&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; select name,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; put(sex,$gender.) format=$6. AS sex,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; put(age,agegroup.) format=$5. AS age,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; height,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; weight&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; from work.test&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 14 Aug 2011 15:28:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-work-on-imported-SPSS-sav-file-in-SAS/m-p/47309#M9774</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2011-08-14T15:28:49Z</dc:date>
    </item>
  </channel>
</rss>

