<?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: Proc import spss without lables/formats in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Proc-import-spss-without-lables-formats/m-p/26534#M6077</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In SPSS the formats (?data labels?) are stored in the same file as the data.&amp;nbsp; In SAS only the NAME of the format is stored with the data.&amp;nbsp; So you will need to add additional steps to both save the formats where you want them and for the users to use to make sure they can find the formats when they use the data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You could instead generate code to save the formatted values as new variables in the data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sql noprint ;&lt;/P&gt;&lt;P&gt;&amp;nbsp; select name,cats(name,'_decode')&lt;/P&gt;&lt;P&gt;&amp;nbsp; into :name separated by ' '&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; , :decode separated by ' '&lt;/P&gt;&lt;P&gt;&amp;nbsp; from dictionary.columns&lt;/P&gt;&lt;P&gt;&amp;nbsp; where libname='SASHELP'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; and&amp;nbsp; memname='CLASS'&lt;/P&gt;&lt;P&gt;&amp;nbsp; ;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;data new;&lt;/P&gt;&lt;P&gt;&amp;nbsp; set sashelp.class;&lt;/P&gt;&lt;P&gt;&amp;nbsp; array _decode $200 &amp;amp;decode ;&lt;/P&gt;&lt;P&gt;&amp;nbsp; do _n_=1 to dim(_decode);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; _decode(_n_)=vvaluex(scan("&amp;amp;name",_n_,' '));&lt;/P&gt;&lt;P&gt;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 25 Jun 2012 20:43:35 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2012-06-25T20:43:35Z</dc:date>
    <item>
      <title>Proc import spss without lables/formats</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-import-spss-without-lables-formats/m-p/26526#M6069</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is it possible to import a *.sav file into SAS without also getting labels/formats that is defined in SPSS?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;Kristoffer&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Jan 2012 13:31:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-import-spss-without-lables-formats/m-p/26526#M6069</guid>
      <dc:creator>smygarn</dc:creator>
      <dc:date>2012-01-09T13:31:49Z</dc:date>
    </item>
    <item>
      <title>Proc import spss without lables/formats</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-import-spss-without-lables-formats/m-p/26527#M6070</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't know how to use proc import to eliminate labels and format.&lt;/P&gt;&lt;P&gt;But you can erase them after importing SAS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;data class;
 set sashelp.class;
 label sex='gender';
 format weight dollar12.;
run;

proc datasets library=work nolist;
modify class;
 attrib _all_ label=' ' format=;
quit;



&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ksharp&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Jan 2012 03:44:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-import-spss-without-lables-formats/m-p/26527#M6070</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2012-01-10T03:44:21Z</dc:date>
    </item>
    <item>
      <title>Proc import spss without lables/formats</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-import-spss-without-lables-formats/m-p/26528#M6071</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Thanks for your help. Thats convenient enough. Cheers&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Jan 2012 07:24:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-import-spss-without-lables-formats/m-p/26528#M6071</guid>
      <dc:creator>smygarn</dc:creator>
      <dc:date>2012-01-10T07:24:34Z</dc:date>
    </item>
    <item>
      <title>Re: Proc import spss without lables/formats</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-import-spss-without-lables-formats/m-p/26529#M6072</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Does anyone know how to keep the SPSS formats after importing the SPSS .sav file and then storing as SAS dataset in a permanent library? In other words, after saving as a SAS dataset I can not open the file unless I remove all the labels and formats the code mentioned in this post. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Jun 2012 19:48:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-import-spss-without-lables-formats/m-p/26529#M6072</guid>
      <dc:creator>WAL83</dc:creator>
      <dc:date>2012-06-22T19:48:15Z</dc:date>
    </item>
    <item>
      <title>Re: Proc import spss without lables/formats</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-import-spss-without-lables-formats/m-p/26530#M6073</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you are getting an error related to unavailable formats try&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;options nofmterr;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the SAS option FMTERR / NOFMTERR determines whether an undefined format is an error or not. If the FMTERR is set then you can't open data sets that have such formats (or run PROC FREQ&amp;nbsp; or do much of anything else.)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Jun 2012 20:03:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-import-spss-without-lables-formats/m-p/26530#M6073</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2012-06-22T20:03:15Z</dc:date>
    </item>
    <item>
      <title>Re: Proc import spss without lables/formats</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-import-spss-without-lables-formats/m-p/26531#M6074</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks. This auto copied the formats folder to the permanent library but still getting "ERROR: can open the table DS.dataset. I am using SAS 9.2 x64 on MS 2003 Terminal Server. Also, this only occurs if I close the SAS program I used to import the SPSS file and then open a different SAS file.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Jun 2012 20:23:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-import-spss-without-lables-formats/m-p/26531#M6074</guid>
      <dc:creator>WAL83</dc:creator>
      <dc:date>2012-06-22T20:23:27Z</dc:date>
    </item>
    <item>
      <title>Re: Proc import spss without lables/formats</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-import-spss-without-lables-formats/m-p/26532#M6075</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check it out.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A __default_attr="124317" __jive_macro_name="message" class="jive_macro jive_macro_message" href="https://communities.sas.com/"&gt;&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Jun 2012 02:28:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-import-spss-without-lables-formats/m-p/26532#M6075</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2012-06-25T02:28:10Z</dc:date>
    </item>
    <item>
      <title>Re: Proc import spss without lables/formats</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-import-spss-without-lables-formats/m-p/26533#M6076</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks. This is difinitely useful info. So you can't import a SPSS file with formats and labels and then create a SAS dataset with these formats and labels very easily? My goal is to keep the dataset with formats and labels associated with the original SPSS file as a SAS dataset. I usually don't have issues with giving SPSS users SAS datasets because SPSS doesn't have problems importing SAS datasets.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Jun 2012 18:08:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-import-spss-without-lables-formats/m-p/26533#M6076</guid>
      <dc:creator>WAL83</dc:creator>
      <dc:date>2012-06-25T18:08:39Z</dc:date>
    </item>
    <item>
      <title>Re: Proc import spss without lables/formats</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-import-spss-without-lables-formats/m-p/26534#M6077</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In SPSS the formats (?data labels?) are stored in the same file as the data.&amp;nbsp; In SAS only the NAME of the format is stored with the data.&amp;nbsp; So you will need to add additional steps to both save the formats where you want them and for the users to use to make sure they can find the formats when they use the data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You could instead generate code to save the formatted values as new variables in the data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sql noprint ;&lt;/P&gt;&lt;P&gt;&amp;nbsp; select name,cats(name,'_decode')&lt;/P&gt;&lt;P&gt;&amp;nbsp; into :name separated by ' '&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; , :decode separated by ' '&lt;/P&gt;&lt;P&gt;&amp;nbsp; from dictionary.columns&lt;/P&gt;&lt;P&gt;&amp;nbsp; where libname='SASHELP'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; and&amp;nbsp; memname='CLASS'&lt;/P&gt;&lt;P&gt;&amp;nbsp; ;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;data new;&lt;/P&gt;&lt;P&gt;&amp;nbsp; set sashelp.class;&lt;/P&gt;&lt;P&gt;&amp;nbsp; array _decode $200 &amp;amp;decode ;&lt;/P&gt;&lt;P&gt;&amp;nbsp; do _n_=1 to dim(_decode);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; _decode(_n_)=vvaluex(scan("&amp;amp;name",_n_,' '));&lt;/P&gt;&lt;P&gt;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Jun 2012 20:43:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-import-spss-without-lables-formats/m-p/26534#M6077</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2012-06-25T20:43:35Z</dc:date>
    </item>
    <item>
      <title>Re: Proc import spss without lables/formats</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-import-spss-without-lables-formats/m-p/26535#M6078</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I search it at this site. You can find a lot of resource about it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" class="active_link" href="https://communities.sas.com/message/7278#7278" title="https://communities.sas.com/message/7278#7278"&gt;https://communities.sas.com/message/7278#7278&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="active_link" href="http://www.psych.yorku.ca/lab/sas/spss2sas.htm" title="http://www.psych.yorku.ca/lab/sas/spss2sas.htm"&gt;http://www.psych.yorku.ca/lab/sas/spss2sas.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ksharp&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Jun 2012 01:51:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-import-spss-without-lables-formats/m-p/26535#M6078</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2012-06-26T01:51:35Z</dc:date>
    </item>
  </channel>
</rss>

