<?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: What format to use when reading mainframe dataset in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/What-format-to-use-when-reading-mainframe-dataset/m-p/115298#M31879</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you so much Tom.&amp;nbsp; IB worked like a charm.&amp;nbsp; It does make sense that it is binary since the field only contains values between 1 and 21.&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 07 Sep 2012 18:38:07 GMT</pubDate>
    <dc:creator>gsnidow</dc:creator>
    <dc:date>2012-09-07T18:38:07Z</dc:date>
    <item>
      <title>What format to use when reading mainframe dataset</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/What-format-to-use-when-reading-mainframe-dataset/m-p/115296#M31877</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Greetings.&amp;nbsp; I'm using PC SAS to connect to the mainframe and reading a file.&amp;nbsp; All is well, with the exception of one field in the dataset.&amp;nbsp; The mainframe SAS job shows looks like below...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; CD-REV-SRC&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 138&amp;nbsp; 2 A&amp;nbsp; &lt;/P&gt;&lt;P&gt; CD-CYCLE&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 154&amp;nbsp; 2 B&amp;nbsp; &lt;/P&gt;&lt;P&gt; CD-TOWN&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 156&amp;nbsp; 4 A &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, I know I need to use @138 CD_REV_SRC $2. for the fist and third variables, but I cannot figure out what I need to use as the format for the second variable with the "B".&amp;nbsp; Any ideas?&amp;nbsp; If I use $2. I get some strange looking characters.&amp;nbsp; If I use simply 2., I get missing values.&amp;nbsp; The below is what I'm trying, and all variables come back okay other than the "B".&amp;nbsp; Thank you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data work.ontime;&lt;/P&gt;&lt;P&gt; INFILE ezt;&lt;/P&gt;&lt;P&gt; input &lt;/P&gt;&lt;P&gt; @1&amp;nbsp;&amp;nbsp; ID_BA&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PD6.&lt;/P&gt;&lt;P&gt; @7&amp;nbsp; CD_BUS&amp;nbsp;&amp;nbsp;&amp;nbsp; $4.&lt;/P&gt;&lt;P&gt; @16&amp;nbsp; DT_BILL&amp;nbsp;&amp;nbsp;&amp;nbsp; $10.&lt;/P&gt;&lt;P&gt; @48&amp;nbsp; AT_SVC_UNIT_BILLED PD6.2&lt;/P&gt;&lt;P&gt; @100 CD_RATE&amp;nbsp;&amp;nbsp;&amp;nbsp; $3.&lt;/P&gt;&lt;P&gt; @138 CD_REV_SRC&amp;nbsp;&amp;nbsp; $2.&lt;/P&gt;&lt;P&gt; @154 CD_CYCLE&amp;nbsp;&amp;nbsp; $2.&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&amp;lt;&amp;lt;--- this one is the problem&lt;/P&gt;&lt;P&gt; @201 FL_MORE_REV_REC&amp;nbsp; $1.;&lt;/P&gt;&lt;P&gt; run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Greg&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Sep 2012 17:57:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/What-format-to-use-when-reading-mainframe-dataset/m-p/115296#M31877</guid>
      <dc:creator>gsnidow</dc:creator>
      <dc:date>2012-09-07T17:57:21Z</dc:date>
    </item>
    <item>
      <title>Re: What format to use when reading mainframe dataset</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/What-format-to-use-when-reading-mainframe-dataset/m-p/115297#M31878</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Perhaps B stands for Binary?&amp;nbsp; Did you try IB or PIB informats?&lt;/P&gt;&lt;P&gt;Do you have any other reports or listings that you can look at to confirm that you read the values properly?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If those formats do not work then read it in as a string using $CHAR and print it using $HEX and post some example values. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Sep 2012 18:10:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/What-format-to-use-when-reading-mainframe-dataset/m-p/115297#M31878</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2012-09-07T18:10:24Z</dc:date>
    </item>
    <item>
      <title>Re: What format to use when reading mainframe dataset</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/What-format-to-use-when-reading-mainframe-dataset/m-p/115298#M31879</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you so much Tom.&amp;nbsp; IB worked like a charm.&amp;nbsp; It does make sense that it is binary since the field only contains values between 1 and 21.&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Sep 2012 18:38:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/What-format-to-use-when-reading-mainframe-dataset/m-p/115298#M31879</guid>
      <dc:creator>gsnidow</dc:creator>
      <dc:date>2012-09-07T18:38:07Z</dc:date>
    </item>
  </channel>
</rss>

