<?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 Skip records while reading variable length delimited file in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Skip-records-while-reading-variable-length-delimited-file/m-p/76396#M16523</link>
    <description>Hello,&lt;BR /&gt;
&lt;BR /&gt;
I am reading a variable length file delimited by hex 00 on mainframe.  I notice my SAS program is skipping every other record in the file.  The record format is VB.  Record length is defined as 1000.  When I browse the file, I see that its record length is 996.  But I changed the in_rec to char996 and the same thing happened.  &lt;BR /&gt;
&lt;BR /&gt;
Any input would be greatly appreciated!!  &lt;BR /&gt;
&lt;BR /&gt;
DATA A;&lt;BR /&gt;
INFILE IN1;&lt;BR /&gt;
INPUT @1   IN_REC    $CHAR1000.; &lt;BR /&gt;
 &lt;BR /&gt;
 NEW1 = TRANSLATE(IN_REC,"~","00"X);&lt;BR /&gt;
     FILE OUT1;&lt;BR /&gt;
    PUT @1     NEW1;&lt;BR /&gt;
 RUN;&lt;BR /&gt;
&lt;BR /&gt;
Here is the Input File:&lt;BR /&gt;
&lt;BR /&gt;
0000000010.N.N.GC..GRODBI.1994-08-09.1994-08-09-09.06.17.002043.1994-08-09...cod&lt;BR /&gt;
0000000010.N.N.HD..GROSAH.2002-06-05.2002-06-05-11.37.30.001991.2002-06-05...NAT&lt;BR /&gt;
0000000011.Y.N.CF..MDVNKB.2002-11-12.2002-11-12-15.51.09.002000.2002-11-12.MDVNK&lt;BR /&gt;
0000000011.Y.N.CF..MDVNKB.2007-01-22.2007-01-22-14.42.09.001995.2007-01-22.MDVNK&lt;BR /&gt;
0000000011.Y.N.GC..MDVAGS.2007-09-19.2007-09-19-11.44.01.001991.2007-09-19.MDVAG&lt;BR /&gt;
0000000016.Y.N.PM..ASD.1999-03-24.1999-03-24-16.04.58.002104.1999-03-24.ASDJHD..&lt;BR /&gt;
0000000016.Y.N.GC..UDVWAC.2000-01-20.2000-01-20-15.54.34.002024.2000-01-20.RESEA&lt;BR /&gt;
0000000016.Y.N.PM..DUASCR.2000-10-11.2000-10-11-10.22.55.002008.2000-10-11.DUASC&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Here is the output file:&lt;BR /&gt;
&lt;BR /&gt;
0000000010~N~N~HD~~GROSAH~2002-06-05~2002-06-05-11.37.30.001991~2002-06-05~~~NAT&lt;BR /&gt;
0000000011~Y~N~CF~~MDVNKB~2007-01-22~2007-01-22-14.42.09.001995~2007-01-22~MDVNK&lt;BR /&gt;
0000000016~Y~N~PM~~ASD~1999-03-24~1999-03-24-16.04.58.002104~1999-03-24~ASDJHD~~&lt;BR /&gt;
0000000016~Y~N~PM~~DUASCR~2000-10-11~2000-10-11-10.22.55.002008~2000-10-11~DUASC</description>
    <pubDate>Thu, 05 Mar 2009 18:08:05 GMT</pubDate>
    <dc:creator>deleted_user</dc:creator>
    <dc:date>2009-03-05T18:08:05Z</dc:date>
    <item>
      <title>Skip records while reading variable length delimited file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Skip-records-while-reading-variable-length-delimited-file/m-p/76396#M16523</link>
      <description>Hello,&lt;BR /&gt;
&lt;BR /&gt;
I am reading a variable length file delimited by hex 00 on mainframe.  I notice my SAS program is skipping every other record in the file.  The record format is VB.  Record length is defined as 1000.  When I browse the file, I see that its record length is 996.  But I changed the in_rec to char996 and the same thing happened.  &lt;BR /&gt;
&lt;BR /&gt;
Any input would be greatly appreciated!!  &lt;BR /&gt;
&lt;BR /&gt;
DATA A;&lt;BR /&gt;
INFILE IN1;&lt;BR /&gt;
INPUT @1   IN_REC    $CHAR1000.; &lt;BR /&gt;
 &lt;BR /&gt;
 NEW1 = TRANSLATE(IN_REC,"~","00"X);&lt;BR /&gt;
     FILE OUT1;&lt;BR /&gt;
    PUT @1     NEW1;&lt;BR /&gt;
 RUN;&lt;BR /&gt;
&lt;BR /&gt;
Here is the Input File:&lt;BR /&gt;
&lt;BR /&gt;
0000000010.N.N.GC..GRODBI.1994-08-09.1994-08-09-09.06.17.002043.1994-08-09...cod&lt;BR /&gt;
0000000010.N.N.HD..GROSAH.2002-06-05.2002-06-05-11.37.30.001991.2002-06-05...NAT&lt;BR /&gt;
0000000011.Y.N.CF..MDVNKB.2002-11-12.2002-11-12-15.51.09.002000.2002-11-12.MDVNK&lt;BR /&gt;
0000000011.Y.N.CF..MDVNKB.2007-01-22.2007-01-22-14.42.09.001995.2007-01-22.MDVNK&lt;BR /&gt;
0000000011.Y.N.GC..MDVAGS.2007-09-19.2007-09-19-11.44.01.001991.2007-09-19.MDVAG&lt;BR /&gt;
0000000016.Y.N.PM..ASD.1999-03-24.1999-03-24-16.04.58.002104.1999-03-24.ASDJHD..&lt;BR /&gt;
0000000016.Y.N.GC..UDVWAC.2000-01-20.2000-01-20-15.54.34.002024.2000-01-20.RESEA&lt;BR /&gt;
0000000016.Y.N.PM..DUASCR.2000-10-11.2000-10-11-10.22.55.002008.2000-10-11.DUASC&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Here is the output file:&lt;BR /&gt;
&lt;BR /&gt;
0000000010~N~N~HD~~GROSAH~2002-06-05~2002-06-05-11.37.30.001991~2002-06-05~~~NAT&lt;BR /&gt;
0000000011~Y~N~CF~~MDVNKB~2007-01-22~2007-01-22-14.42.09.001995~2007-01-22~MDVNK&lt;BR /&gt;
0000000016~Y~N~PM~~ASD~1999-03-24~1999-03-24-16.04.58.002104~1999-03-24~ASDJHD~~&lt;BR /&gt;
0000000016~Y~N~PM~~DUASCR~2000-10-11~2000-10-11-10.22.55.002008~2000-10-11~DUASC</description>
      <pubDate>Thu, 05 Mar 2009 18:08:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Skip-records-while-reading-variable-length-delimited-file/m-p/76396#M16523</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-03-05T18:08:05Z</dc:date>
    </item>
    <item>
      <title>Re: Skip records while reading variable length delimited file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Skip-records-while-reading-variable-length-delimited-file/m-p/76397#M16524</link>
      <description>I would try TRUNCOVER INFILE statement option.</description>
      <pubDate>Thu, 05 Mar 2009 19:52:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Skip-records-while-reading-variable-length-delimited-file/m-p/76397#M16524</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2009-03-05T19:52:25Z</dc:date>
    </item>
  </channel>
</rss>

