<?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 convert SAS to SPSS, taking labels and formats in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/convert-SAS-to-SPSS-taking-labels-and-formats/m-p/99196#M20886</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;I need to convert some SAS data sets into SPSS data sets.&amp;nbsp; The SAS data set have labels and formats and some variables have long variable name (&amp;gt;8 characters).&amp;nbsp; My clients wants the data for SPSS with corresponding labels and formats.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was adapting the code from this website (&lt;A href="http://www.runsubmit.com/questions/240/convert-data-from-from-sas-to-spss-using-sas" title="http://www.runsubmit.com/questions/240/convert-data-from-from-sas-to-spss-using-sas"&gt;http://www.runsubmit.com/questions/240/convert-data-from-from-sas-to-spss-using-sas&lt;/A&gt; ) but I am hitting problems when trying to create a transport file of the SAS data set, due to longer variable name lengths.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does anyone know how I can do it without having to rename variables in the data sets?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;:smileyinfo: I am using SAS v9.3 (64-bit), need to convert for SPSS v20.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Peta&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 05 Feb 2013 23:46:23 GMT</pubDate>
    <dc:creator>pmf007</dc:creator>
    <dc:date>2013-02-05T23:46:23Z</dc:date>
    <item>
      <title>convert SAS to SPSS, taking labels and formats</title>
      <link>https://communities.sas.com/t5/SAS-Programming/convert-SAS-to-SPSS-taking-labels-and-formats/m-p/99196#M20886</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;I need to convert some SAS data sets into SPSS data sets.&amp;nbsp; The SAS data set have labels and formats and some variables have long variable name (&amp;gt;8 characters).&amp;nbsp; My clients wants the data for SPSS with corresponding labels and formats.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was adapting the code from this website (&lt;A href="http://www.runsubmit.com/questions/240/convert-data-from-from-sas-to-spss-using-sas" title="http://www.runsubmit.com/questions/240/convert-data-from-from-sas-to-spss-using-sas"&gt;http://www.runsubmit.com/questions/240/convert-data-from-from-sas-to-spss-using-sas&lt;/A&gt; ) but I am hitting problems when trying to create a transport file of the SAS data set, due to longer variable name lengths.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does anyone know how I can do it without having to rename variables in the data sets?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;:smileyinfo: I am using SAS v9.3 (64-bit), need to convert for SPSS v20.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Peta&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Feb 2013 23:46:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/convert-SAS-to-SPSS-taking-labels-and-formats/m-p/99196#M20886</guid>
      <dc:creator>pmf007</dc:creator>
      <dc:date>2013-02-05T23:46:23Z</dc:date>
    </item>
    <item>
      <title>Re: convert SAS to SPSS, taking labels and formats</title>
      <link>https://communities.sas.com/t5/SAS-Programming/convert-SAS-to-SPSS-taking-labels-and-formats/m-p/99197#M20887</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Personally I use STAT/Transfer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You probably do NOT want to use SAS version 5 transport files as those will be limited to 8 character variable names and maximum length of 200 for character variables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you are desperate and know SPSS syntax well enough just get the variable names from the SAS metadata (or use PROC CONTENTS OUT=) and generate the SPSS code to read from a CSV file.&amp;nbsp; As the thread you link noted you can get the "value labels" of user defined formats using the CNTLOUT option on PROC FORMAT and use those to generate SPSS code.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Feb 2013 05:56:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/convert-SAS-to-SPSS-taking-labels-and-formats/m-p/99197#M20887</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2013-02-07T05:56:36Z</dc:date>
    </item>
    <item>
      <title>Re: convert SAS to SPSS, taking labels and formats</title>
      <link>https://communities.sas.com/t5/SAS-Programming/convert-SAS-to-SPSS-taking-labels-and-formats/m-p/99198#M20888</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Tom for your reply.&amp;nbsp; Just before I received your reply, I had figured it out (well, one way of doing it)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Step 1 : create a data set from the formats catalog&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LIBNAME FMTDIR "C:\DATA - FINAL\FMTDIR";&lt;/P&gt;&lt;P&gt;LIBNAME LIBRARY "C:\DATA - FINAL\FMTDIR";&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PROC FORMAT LIBRARY=LIBRARY.FORMATS&amp;nbsp; CNTOUT=FMTDIR.FMT_DATA; RUN; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Step 2 : export to an .SAV file using the FMTLIB option in the PROX EXPORT procedure (using the formats data set)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LIBNAME FMTDIR "C:\DATA - FINAL\FMTDIR";&lt;/P&gt;&lt;P&gt;LIBNAME DIR1 "C:\DATA - FINAL";&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PROC EXPORT &lt;/P&gt;&lt;P&gt;&amp;nbsp; DATA= DIR1.SAS_DATA_1&amp;nbsp; OUTFILE= "C:\SPSS_DATA_1.SAV"&amp;nbsp; DBMS=SPSS REPLACE ;&lt;/P&gt;&lt;P&gt;&amp;nbsp; FMTLIB=FMTDIR.FMT_DATA;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&amp;nbsp; RUN;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This seems to have worked okay - longer variable name lengths preserved, formats/values exported into the SPSS file, etc.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 10 Feb 2013 21:23:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/convert-SAS-to-SPSS-taking-labels-and-formats/m-p/99198#M20888</guid>
      <dc:creator>pmf007</dc:creator>
      <dc:date>2013-02-10T21:23:06Z</dc:date>
    </item>
  </channel>
</rss>

