<?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: How to identify the kind of procedure used for creating a SAS transport file ? in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/How-to-identify-the-kind-of-procedure-used-for-creating-a-SAS/m-p/203816#M50821</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Read the first few characters and check.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;libname x xport 'test/class.xpt' ;&lt;/P&gt;&lt;P&gt;proc copy inlib=sashelp outlib=x ; select class; run;&lt;/P&gt;&lt;P&gt;libname x clear;&lt;/P&gt;&lt;P&gt;proc cport data=sashelp.class file='test/class.stc' ; run;&lt;/P&gt;&lt;P&gt;proc export data=sashelp.class file='test/class.csv' dbms=dlm replace;&lt;/P&gt;&lt;P&gt;delimiter=',';&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;data fnames ;&lt;/P&gt;&lt;P&gt;&amp;nbsp; infile 'ls test/class.*' pipe truncover;&lt;/P&gt;&lt;P&gt;&amp;nbsp; input fname $200. ;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;data test;&lt;/P&gt;&lt;P&gt;&amp;nbsp; set fnames ;&lt;/P&gt;&lt;P&gt;&amp;nbsp; filename=fname ;&lt;/P&gt;&lt;P&gt;&amp;nbsp; infile xpt filevar=filename end=eof recfm=n ;&lt;/P&gt;&lt;P&gt;&amp;nbsp; if not eof then input prefix $char10. ;&lt;/P&gt;&lt;P&gt;&amp;nbsp; if prefix='HEADER REC' then type='XPORT' ;&lt;/P&gt;&lt;P&gt;&amp;nbsp; else if prefix='**COMPRESS' then type='CPORT';&lt;/P&gt;&lt;P&gt;&amp;nbsp; else type='UNKN' ;&lt;/P&gt;&lt;P&gt;&amp;nbsp; put type= prefix= :$quote. fname = :$quote. ;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;type=UNKN prefix="Name,Sex,A" fname="test/class.csv"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em; font-family: 'courier new', courier;"&gt;type=CPORT prefix="**COMPRESS" fname="test/class.stc"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em; font-family: 'courier new', courier;"&gt;type=XPORT prefix="HEADER REC" fname="test/class.xpt"&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 25 Apr 2015 18:06:53 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2015-04-25T18:06:53Z</dc:date>
    <item>
      <title>How to identify the kind of procedure used for creating a SAS transport file ?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-identify-the-kind-of-procedure-used-for-creating-a-SAS/m-p/203815#M50820</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a list of .xpt files with me. The problem is that I cannot get from the transport file creator about typically what kind of procedure ( either XPORT or CPORT ) he/she used in the program. Is there a way that I can identify this and correspondingly use the PROC COPY or PROC CIMPORT procedure to extract the datasets from the transport files. I'm using SAS 9.4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help with this is greatly appreciated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 25 Apr 2015 14:31:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-identify-the-kind-of-procedure-used-for-creating-a-SAS/m-p/203815#M50820</guid>
      <dc:creator>shivasomaram</dc:creator>
      <dc:date>2015-04-25T14:31:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to identify the kind of procedure used for creating a SAS transport file ?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-identify-the-kind-of-procedure-used-for-creating-a-SAS/m-p/203816#M50821</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Read the first few characters and check.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;libname x xport 'test/class.xpt' ;&lt;/P&gt;&lt;P&gt;proc copy inlib=sashelp outlib=x ; select class; run;&lt;/P&gt;&lt;P&gt;libname x clear;&lt;/P&gt;&lt;P&gt;proc cport data=sashelp.class file='test/class.stc' ; run;&lt;/P&gt;&lt;P&gt;proc export data=sashelp.class file='test/class.csv' dbms=dlm replace;&lt;/P&gt;&lt;P&gt;delimiter=',';&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;data fnames ;&lt;/P&gt;&lt;P&gt;&amp;nbsp; infile 'ls test/class.*' pipe truncover;&lt;/P&gt;&lt;P&gt;&amp;nbsp; input fname $200. ;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;data test;&lt;/P&gt;&lt;P&gt;&amp;nbsp; set fnames ;&lt;/P&gt;&lt;P&gt;&amp;nbsp; filename=fname ;&lt;/P&gt;&lt;P&gt;&amp;nbsp; infile xpt filevar=filename end=eof recfm=n ;&lt;/P&gt;&lt;P&gt;&amp;nbsp; if not eof then input prefix $char10. ;&lt;/P&gt;&lt;P&gt;&amp;nbsp; if prefix='HEADER REC' then type='XPORT' ;&lt;/P&gt;&lt;P&gt;&amp;nbsp; else if prefix='**COMPRESS' then type='CPORT';&lt;/P&gt;&lt;P&gt;&amp;nbsp; else type='UNKN' ;&lt;/P&gt;&lt;P&gt;&amp;nbsp; put type= prefix= :$quote. fname = :$quote. ;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;type=UNKN prefix="Name,Sex,A" fname="test/class.csv"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em; font-family: 'courier new', courier;"&gt;type=CPORT prefix="**COMPRESS" fname="test/class.stc"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em; font-family: 'courier new', courier;"&gt;type=XPORT prefix="HEADER REC" fname="test/class.xpt"&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 25 Apr 2015 18:06:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-identify-the-kind-of-procedure-used-for-creating-a-SAS/m-p/203816#M50821</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2015-04-25T18:06:53Z</dc:date>
    </item>
  </channel>
</rss>

