<?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: COBOL to SAS format in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/COBOL-to-SAS-format/m-p/675543#M203567</link>
    <description>&lt;P&gt;I think the right informat is Zoned Decimal, e.g. ZD9.0, if you are not working on the mainframe, you should use S370FZD9.0,&lt;/P&gt;
&lt;P&gt;see&amp;nbsp;&lt;A href="https://documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.5&amp;amp;docsetId=leforinforref&amp;amp;docsetTarget=p0rpil7q2fjyd0n12baih7umq6xj.htm&amp;amp;locale=en" target="_self"&gt;the SAS documentation.&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 10 Aug 2020 09:11:36 GMT</pubDate>
    <dc:creator>s_lassen</dc:creator>
    <dc:date>2020-08-10T09:11:36Z</dc:date>
    <item>
      <title>COBOL to SAS format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/COBOL-to-SAS-format/m-p/675385#M203487</link>
      <description>&lt;P&gt;Hi -&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was searching through answers but unable to find how to convert the following into SAS format.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a COBOL format of&amp;nbsp;pic s9(9) usage comp.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried converting using IB4 and also RB4. Both results are the same, and it does seem to work but after I reviewed the actual values(from a DB2 table) I see that they do not match.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does anyone know what is the correct format I should be using?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance - Gregg&lt;/P&gt;</description>
      <pubDate>Sat, 08 Aug 2020 13:39:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/COBOL-to-SAS-format/m-p/675385#M203487</guid>
      <dc:creator>gbobay</dc:creator>
      <dc:date>2020-08-08T13:39:11Z</dc:date>
    </item>
    <item>
      <title>Re: COBOL to SAS format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/COBOL-to-SAS-format/m-p/675392#M203494</link>
      <description>&lt;P&gt;If it is a typical DB/2 unload file, the informat would be PD5.&lt;/P&gt;</description>
      <pubDate>Sat, 08 Aug 2020 14:51:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/COBOL-to-SAS-format/m-p/675392#M203494</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-08-08T14:51:24Z</dc:date>
    </item>
    <item>
      <title>Re: COBOL to SAS format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/COBOL-to-SAS-format/m-p/675394#M203495</link>
      <description>&lt;P&gt;Thanks. Seems to make sense, but I get all 0 values when I read in SAS format and output. This what I originally tried actually. Then tried the IB4 format, which does produce results, but when I match against the DB2 table, they are not alike.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 08 Aug 2020 15:25:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/COBOL-to-SAS-format/m-p/675394#M203495</guid>
      <dc:creator>gbobay</dc:creator>
      <dc:date>2020-08-08T15:25:27Z</dc:date>
    </item>
    <item>
      <title>Re: COBOL to SAS format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/COBOL-to-SAS-format/m-p/675460#M203535</link>
      <description>&lt;P&gt;Inspect the file with some kind of hex viewer, or convert the input line (_infile_) to a hex format, to see the raw values and get a feel for the field lengths.&lt;/P&gt;</description>
      <pubDate>Sun, 09 Aug 2020 04:52:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/COBOL-to-SAS-format/m-p/675460#M203535</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-08-09T04:52:38Z</dc:date>
    </item>
    <item>
      <title>Re: COBOL to SAS format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/COBOL-to-SAS-format/m-p/675517#M203557</link>
      <description>&lt;P&gt;What OS is your SAS session running on? Is the DB2 data you are reading EBCDIC-encoded or not? If you are reading&amp;nbsp;EBCDIC data on an ASCII OS like Unix or Windows then you will need to use an S370 informat. This SAS Note will help:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://support.sas.com/kb/56/654.html" target="_blank"&gt;https://support.sas.com/kb/56/654.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 09 Aug 2020 21:41:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/COBOL-to-SAS-format/m-p/675517#M203557</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2020-08-09T21:41:42Z</dc:date>
    </item>
    <item>
      <title>Re: COBOL to SAS format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/COBOL-to-SAS-format/m-p/675543#M203567</link>
      <description>&lt;P&gt;I think the right informat is Zoned Decimal, e.g. ZD9.0, if you are not working on the mainframe, you should use S370FZD9.0,&lt;/P&gt;
&lt;P&gt;see&amp;nbsp;&lt;A href="https://documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.5&amp;amp;docsetId=leforinforref&amp;amp;docsetTarget=p0rpil7q2fjyd0n12baih7umq6xj.htm&amp;amp;locale=en" target="_self"&gt;the SAS documentation.&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Aug 2020 09:11:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/COBOL-to-SAS-format/m-p/675543#M203567</guid>
      <dc:creator>s_lassen</dc:creator>
      <dc:date>2020-08-10T09:11:36Z</dc:date>
    </item>
    <item>
      <title>Re: COBOL to SAS format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/COBOL-to-SAS-format/m-p/675643#M203588</link>
      <description>&lt;P&gt;Thanks. I tried this, but I am getting all zeros.&lt;/P&gt;</description>
      <pubDate>Mon, 10 Aug 2020 16:06:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/COBOL-to-SAS-format/m-p/675643#M203588</guid>
      <dc:creator>gbobay</dc:creator>
      <dc:date>2020-08-10T16:06:55Z</dc:date>
    </item>
    <item>
      <title>Re: COBOL to SAS format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/COBOL-to-SAS-format/m-p/675654#M203592</link>
      <description>&lt;P&gt;I was able to view the data.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So this is what I have so far:&lt;/P&gt;&lt;P&gt;How it is defined in COBOL load file:&lt;/P&gt;&lt;P&gt;10 ACC-CONVN-REQ-I&amp;nbsp; &amp;nbsp; &amp;nbsp;PIC S9(9) USAGE COMP.&lt;/P&gt;&lt;P&gt;I am reading in a mainframe SAS proc and have tried these:&lt;/P&gt;&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159673"&gt;@001&lt;/a&gt; ACC_CONV_ID PD5. - Get all zeros&lt;/P&gt;&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159673"&gt;@001&lt;/a&gt; ACC_CONV_ID ZD9.0 - As suggested from another response. Also get all zeros.&lt;/P&gt;&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159673"&gt;@001&lt;/a&gt; ACC_CONV_ID IB4. - Get values that do not match the source as below:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;10485766 03/14/2005&lt;/P&gt;&lt;P&gt;10485767 07/05/2005&lt;/P&gt;&lt;P&gt;10485767 08/15/2005&lt;/P&gt;&lt;P&gt;10485767 08/15/2005&lt;/P&gt;&lt;P&gt;10485767 09/12/2005&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Should look like this:&lt;/P&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;434401&amp;nbsp; &amp;nbsp; &amp;nbsp;03/14/2005&lt;/P&gt;&lt;P&gt;477459&amp;nbsp; &amp;nbsp; &amp;nbsp;07/05/2005&lt;/P&gt;&lt;P&gt;493892&amp;nbsp; &amp;nbsp; &amp;nbsp;08/15/2005&lt;/P&gt;&lt;P&gt;497050&amp;nbsp; &amp;nbsp; &amp;nbsp;08/15/2005&lt;/P&gt;&lt;P&gt;512974&amp;nbsp; &amp;nbsp; &amp;nbsp;09/12/2005&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In Hex the first example looks like this:&lt;/P&gt;&lt;P&gt;.µ..µ÷03/14/2005&amp;nbsp;&lt;/P&gt;&lt;P&gt;0A00AEFF6FF6FFFF&lt;BR /&gt;0006010311412005&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Aug 2020 16:22:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/COBOL-to-SAS-format/m-p/675654#M203592</guid>
      <dc:creator>gbobay</dc:creator>
      <dc:date>2020-08-10T16:22:16Z</dc:date>
    </item>
    <item>
      <title>Re: COBOL to SAS format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/COBOL-to-SAS-format/m-p/675656#M203593</link>
      <description>&lt;P&gt;Thanks. It is in EBCIDIC. I will keep this link for future reference. But still having issues with the format.&lt;/P&gt;</description>
      <pubDate>Mon, 10 Aug 2020 16:23:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/COBOL-to-SAS-format/m-p/675656#M203593</guid>
      <dc:creator>gbobay</dc:creator>
      <dc:date>2020-08-10T16:23:38Z</dc:date>
    </item>
    <item>
      <title>Re: COBOL to SAS format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/COBOL-to-SAS-format/m-p/675657#M203594</link>
      <description>&lt;P&gt;Thanks. No luck. Comes out as all zeros.&lt;/P&gt;</description>
      <pubDate>Mon, 10 Aug 2020 16:24:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/COBOL-to-SAS-format/m-p/675657#M203594</guid>
      <dc:creator>gbobay</dc:creator>
      <dc:date>2020-08-10T16:24:06Z</dc:date>
    </item>
    <item>
      <title>Re: COBOL to SAS format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/COBOL-to-SAS-format/m-p/675709#M203608</link>
      <description>&lt;P&gt;0006A0E1 is binary for 434401, so you should read from position 3 with IB4.&lt;/P&gt;</description>
      <pubDate>Mon, 10 Aug 2020 18:24:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/COBOL-to-SAS-format/m-p/675709#M203608</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-08-10T18:24:08Z</dc:date>
    </item>
    <item>
      <title>Re: COBOL to SAS format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/COBOL-to-SAS-format/m-p/675762#M203631</link>
      <description>&lt;P&gt;Thank you!! That works!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;434401 03/14/2005&lt;BR /&gt;477459 07/05/2005&lt;BR /&gt;493892 08/15/2005&lt;/P&gt;</description>
      <pubDate>Mon, 10 Aug 2020 21:26:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/COBOL-to-SAS-format/m-p/675762#M203631</guid>
      <dc:creator>gbobay</dc:creator>
      <dc:date>2020-08-10T21:26:39Z</dc:date>
    </item>
  </channel>
</rss>

