<?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: Imported spss data into sas: All variable types appear as Numeric (including character variables in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Imported-spss-data-into-sas-All-variable-types-appear-as-Numeric/m-p/677017#M204170</link>
    <description>&lt;P&gt;Looks like your SPSS variables were using numeric codes.&amp;nbsp; That is why the import step made them as numeric.&amp;nbsp; Notice how it made the user defined formats like Q2A and Q8A listed in your PROC CONTENTS display.&amp;nbsp; That way the numeric codes will print with the proper decoded text strings.&amp;nbsp; Make sure to tell PROC IMPORT where you want it to write the formats it creates.&amp;nbsp; By default it writes to WORK.FORMATS catalog and that will disappear at the end of your current SAS session.&amp;nbsp; Also watch out for format name collision if you read in multiple SPSS datafiles that use the same variable names with different coding.&lt;/P&gt;</description>
    <pubDate>Sun, 16 Aug 2020 00:57:31 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2020-08-16T00:57:31Z</dc:date>
    <item>
      <title>Imported spss data into sas: All variable types appear as Numeric (including character variables)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Imported-spss-data-into-sas-All-variable-types-appear-as-Numeric/m-p/677014#M204169</link>
      <description>&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;I am a new SAS user and recently I tried importing an SPSS data into SAS. Although import was successful, &lt;STRONG&gt;all the variables read as numeric (including character variables)&lt;/STRONG&gt;. I have about 73 variables (constituting of character and numeric). I need help correcting this before I go-ahead to do the analysis. I am afraid if I go ahead without&amp;nbsp;fixing this (variable types), that my analysis will be affected. Please note I am using the SAS University edition for my analysis. Kindly help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is my code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Libname Tutorial '/folders/myfolders/';&lt;BR /&gt;*Importing SAS file;&lt;BR /&gt;proc import datafile = '/folders/myshortcuts/Myfolders/TBR_NMUS_1_copy.sav'&lt;BR /&gt;out=tutorial.intern&lt;BR /&gt;dbms=SAV&amp;nbsp;&lt;BR /&gt;replace;&lt;BR /&gt;run;&lt;BR /&gt;proc contents data= tutorial.intern;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is some part of the data results:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture25.PNG" style="width: 910px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/48275i41D4C87701F8F295/image-dimensions/910x171?v=v2" width="910" height="171" role="button" title="Capture25.PNG" alt="Capture25.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Sun, 16 Aug 2020 00:31:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Imported-spss-data-into-sas-All-variable-types-appear-as-Numeric/m-p/677014#M204169</guid>
      <dc:creator>adenirane</dc:creator>
      <dc:date>2020-08-16T00:31:29Z</dc:date>
    </item>
    <item>
      <title>Re: Imported spss data into sas: All variable types appear as Numeric (including character variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Imported-spss-data-into-sas-All-variable-types-appear-as-Numeric/m-p/677017#M204170</link>
      <description>&lt;P&gt;Looks like your SPSS variables were using numeric codes.&amp;nbsp; That is why the import step made them as numeric.&amp;nbsp; Notice how it made the user defined formats like Q2A and Q8A listed in your PROC CONTENTS display.&amp;nbsp; That way the numeric codes will print with the proper decoded text strings.&amp;nbsp; Make sure to tell PROC IMPORT where you want it to write the formats it creates.&amp;nbsp; By default it writes to WORK.FORMATS catalog and that will disappear at the end of your current SAS session.&amp;nbsp; Also watch out for format name collision if you read in multiple SPSS datafiles that use the same variable names with different coding.&lt;/P&gt;</description>
      <pubDate>Sun, 16 Aug 2020 00:57:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Imported-spss-data-into-sas-All-variable-types-appear-as-Numeric/m-p/677017#M204170</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2020-08-16T00:57:31Z</dc:date>
    </item>
    <item>
      <title>Re: Imported spss data into sas: All variable types appear as Numeric (including character variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Imported-spss-data-into-sas-All-variable-types-appear-as-Numeric/m-p/677018#M204171</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159"&gt;@Tom&lt;/a&gt;&amp;nbsp; Thanks very much for your feedback. I noticed when I used proc print, the decoded text strings were read properly (just as you said). However, my concern is that if I go on to do analysis will the analysis be done properly? Also, how can I inform proc import on where to write the formats it creates?&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was just hoping I could fix the variable type so as to be on a safer side. Thanks for your help.&lt;/P&gt;</description>
      <pubDate>Sun, 16 Aug 2020 01:20:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Imported-spss-data-into-sas-All-variable-types-appear-as-Numeric/m-p/677018#M204171</guid>
      <dc:creator>adenirane</dc:creator>
      <dc:date>2020-08-16T01:20:06Z</dc:date>
    </item>
    <item>
      <title>Re: Imported spss data into sas: All variable types appear as Numeric (including character variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Imported-spss-data-into-sas-All-variable-types-appear-as-Numeric/m-p/677019#M204172</link>
      <description>&lt;P&gt;It shouldn't matter in your analysis. Most analysis procedures will let you use a CLASS statement to let it know that your variable is categorical and not a continuous number.&lt;/P&gt;</description>
      <pubDate>Sun, 16 Aug 2020 01:28:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Imported-spss-data-into-sas-All-variable-types-appear-as-Numeric/m-p/677019#M204172</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2020-08-16T01:28:16Z</dc:date>
    </item>
    <item>
      <title>Re: Imported spss data into sas: All variable types appear as Numeric (including character variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Imported-spss-data-into-sas-All-variable-types-appear-as-Numeric/m-p/677020#M204173</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159"&gt;@Tom&lt;/a&gt;&amp;nbsp; Okay. Thanks a lot for your assistance.&lt;/P&gt;</description>
      <pubDate>Sun, 16 Aug 2020 01:45:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Imported-spss-data-into-sas-All-variable-types-appear-as-Numeric/m-p/677020#M204173</guid>
      <dc:creator>adenirane</dc:creator>
      <dc:date>2020-08-16T01:45:06Z</dc:date>
    </item>
  </channel>
</rss>

