<?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: Exporting SAS data set while preserving formats using proc datasets in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Exporting-SAS-data-set-while-preserving-formats-using-proc/m-p/482702#M125081</link>
    <description>&lt;P&gt;Send the format definitions along with the dataset.&lt;/P&gt;
&lt;P&gt;Preferable as source code for the PROC FORMAT step to create them.&lt;/P&gt;
&lt;P&gt;If not that then as a dataset that can be used to generate them using PROC FORMAT with the CNTLIN= option.&lt;/P&gt;
&lt;P&gt;Or if you have to as an exported transport file made with PROC CPORT.&lt;/P&gt;</description>
    <pubDate>Tue, 31 Jul 2018 04:59:47 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2018-07-31T04:59:47Z</dc:date>
    <item>
      <title>Exporting SAS data set while preserving formats using proc datasets</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Exporting-SAS-data-set-while-preserving-formats-using-proc/m-p/482605#M125033</link>
      <description>&lt;P&gt;I am working with a large dataset that contains a lot of confusing codes. I have formatted these codes as&amp;nbsp;simple words to make it easier for individuals who may analyze the data later on to understand. When I create these formats and export them, I notice in the exported SAS datafile that none of the formats are preserved.&amp;nbsp;I have been using the following code to export my data:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;libname out '\C:\data\etc';&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc datasets library=work nodetails nolist;&lt;BR /&gt;copy in=work out=out;&lt;BR /&gt;select mydata;&lt;BR /&gt;run;quit;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there anyway that I can export as a SAS data set and preserve my formats? I have seen countless ways to do this with excel data using the proc export procedure, but I can't use proc export to create .sas7bdat files.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Jul 2018 23:00:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Exporting-SAS-data-set-while-preserving-formats-using-proc/m-p/482605#M125033</guid>
      <dc:creator>robbie94</dc:creator>
      <dc:date>2018-07-30T23:00:38Z</dc:date>
    </item>
    <item>
      <title>Re: Exporting SAS data set while preserving formats using proc datasets</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Exporting-SAS-data-set-while-preserving-formats-using-proc/m-p/482651#M125054</link>
      <description>&lt;P&gt;Your explanation is probably incomplete.&lt;BR /&gt;Format assignments are copied along when a data set is copied.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data kk; 
  format d date.;
run;
proc datasets noprint; 
  copy in=work out=data_rw;
  select kk;
run;
proc contents data=data_rw.kk; 
run;
 &lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;SAS Output&lt;/P&gt;
&lt;DIV class="branch"&gt;
&lt;DIV class="c proctitle"&gt;The CONTENTS Procedure&lt;/DIV&gt;
&lt;DIV&gt;
&lt;DIV align="center"&gt;
&lt;TABLE class="table" summary="Procedure Contents: Attributes" frame="box" rules="all" cellspacing="0" cellpadding="5"&gt;&lt;COLGROUP&gt; &lt;COL /&gt; &lt;COL /&gt; &lt;COL /&gt; &lt;COL /&gt;&lt;/COLGROUP&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TH class="l rowheader" scope="row"&gt;Data Set Name&lt;/TH&gt;
&lt;TD class="l data"&gt;DATA_RW.KK&lt;/TD&gt;
&lt;TH class="l rowheader" scope="row"&gt;Observations&lt;/TH&gt;
&lt;TD class="l data"&gt;1&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="l rowheader" scope="row"&gt;Member Type&lt;/TH&gt;
&lt;TD class="l data"&gt;DATA&lt;/TD&gt;
&lt;TH class="l rowheader" scope="row"&gt;Variables&lt;/TH&gt;
&lt;TD class="l data"&gt;1&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="l rowheader" scope="row"&gt;Engine&lt;/TH&gt;
&lt;TD class="l data"&gt;V9&lt;/TD&gt;
&lt;TH class="l rowheader" scope="row"&gt;Indexes&lt;/TH&gt;
&lt;TD class="l data"&gt;0&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="l rowheader" scope="row"&gt;Created&lt;/TH&gt;
&lt;TD class="l data"&gt;31/07/2018 11:50:54&lt;/TD&gt;
&lt;TH class="l rowheader" scope="row"&gt;Observation Length&lt;/TH&gt;
&lt;TD class="l data"&gt;8&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="l rowheader" scope="row"&gt;Last Modified&lt;/TH&gt;
&lt;TD class="l data"&gt;31/07/2018 11:50:54&lt;/TD&gt;
&lt;TH class="l rowheader" scope="row"&gt;Deleted Observations&lt;/TH&gt;
&lt;TD class="l data"&gt;0&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="l rowheader" scope="row"&gt;Protection&lt;/TH&gt;
&lt;TD class="l data"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TH class="l rowheader" scope="row"&gt;Compressed&lt;/TH&gt;
&lt;TD class="l data"&gt;NO&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="l rowheader" scope="row"&gt;Data Set Type&lt;/TH&gt;
&lt;TD class="l data"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TH class="l rowheader" scope="row"&gt;Sorted&lt;/TH&gt;
&lt;TD class="l data"&gt;NO&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="l rowheader" scope="row"&gt;Label&lt;/TH&gt;
&lt;TD class="l data"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TH class="l rowheader" scope="row"&gt;&amp;nbsp;&lt;/TH&gt;
&lt;TD class="l data"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="l rowheader" scope="row"&gt;Data Representation&lt;/TH&gt;
&lt;TD class="l data"&gt;WINDOWS_64&lt;/TD&gt;
&lt;TH class="l rowheader" scope="row"&gt;&amp;nbsp;&lt;/TH&gt;
&lt;TD class="l data"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="l rowheader" scope="row"&gt;Encoding&lt;/TH&gt;
&lt;TD class="l data"&gt;wlatin1 Western (Windows)&lt;/TD&gt;
&lt;TH class="l rowheader" scope="row"&gt;&amp;nbsp;&lt;/TH&gt;
&lt;TD class="l data"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;DIV&gt;
&lt;DIV align="center"&gt;
&lt;TABLE class="table" summary="Procedure Contents: Variables" frame="box" rules="all" cellspacing="0" cellpadding="5"&gt;&lt;COLGROUP&gt; &lt;COL /&gt;&lt;/COLGROUP&gt; &lt;COLGROUP&gt; &lt;COL /&gt; &lt;COL /&gt; &lt;COL /&gt; &lt;COL /&gt;&lt;/COLGROUP&gt;
&lt;THEAD&gt;
&lt;TR&gt;
&lt;TH class="c b header" colspan="5" scope="colgroup"&gt;Alphabetic List of Variables and Attributes&lt;/TH&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="r b header" scope="col"&gt;#&lt;/TH&gt;
&lt;TH class="l b header" scope="col"&gt;Variable&lt;/TH&gt;
&lt;TH class="l b header" scope="col"&gt;Type&lt;/TH&gt;
&lt;TH class="r b header" scope="col"&gt;Len&lt;/TH&gt;
&lt;TH class="l b header" scope="col"&gt;Format&lt;/TH&gt;
&lt;/TR&gt;
&lt;/THEAD&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TH class="r rowheader" scope="row"&gt;1&lt;/TH&gt;
&lt;TD class="l data"&gt;d&lt;/TD&gt;
&lt;TD class="l data"&gt;Num&lt;/TD&gt;
&lt;TD class="r data"&gt;8&lt;/TD&gt;
&lt;TD class="l data"&gt;DATE.&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P&gt;&lt;BR /&gt;Please give more details.&lt;/P&gt;</description>
      <pubDate>Mon, 30 Jul 2018 23:53:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Exporting-SAS-data-set-while-preserving-formats-using-proc/m-p/482651#M125054</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2018-07-30T23:53:05Z</dc:date>
    </item>
    <item>
      <title>Re: Exporting SAS data set while preserving formats using proc datasets</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Exporting-SAS-data-set-while-preserving-formats-using-proc/m-p/482697#M125080</link>
      <description>&lt;P&gt;If you use custom formats, you need to supply the defined formats along with your dataset.&lt;/P&gt;
&lt;P&gt;How you do that depends on how "far" you want to send your datasets.&lt;/P&gt;</description>
      <pubDate>Tue, 31 Jul 2018 04:41:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Exporting-SAS-data-set-while-preserving-formats-using-proc/m-p/482697#M125080</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-07-31T04:41:01Z</dc:date>
    </item>
    <item>
      <title>Re: Exporting SAS data set while preserving formats using proc datasets</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Exporting-SAS-data-set-while-preserving-formats-using-proc/m-p/482702#M125081</link>
      <description>&lt;P&gt;Send the format definitions along with the dataset.&lt;/P&gt;
&lt;P&gt;Preferable as source code for the PROC FORMAT step to create them.&lt;/P&gt;
&lt;P&gt;If not that then as a dataset that can be used to generate them using PROC FORMAT with the CNTLIN= option.&lt;/P&gt;
&lt;P&gt;Or if you have to as an exported transport file made with PROC CPORT.&lt;/P&gt;</description>
      <pubDate>Tue, 31 Jul 2018 04:59:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Exporting-SAS-data-set-while-preserving-formats-using-proc/m-p/482702#M125081</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2018-07-31T04:59:47Z</dc:date>
    </item>
  </channel>
</rss>

