<?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: Packed decimal question in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Packed-decimal-question/m-p/117295#M24201</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you both so much for the help, I was struggling to understand what was going on. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Greg&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 21 Feb 2013 16:46:23 GMT</pubDate>
    <dc:creator>gsnidow</dc:creator>
    <dc:date>2013-02-21T16:46:23Z</dc:date>
    <item>
      <title>Packed decimal question</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Packed-decimal-question/m-p/117292#M24198</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Greetings all.&amp;nbsp; I'm attempting to read data from a tape on a zOS mainframe.&amp;nbsp; I think what we refer to as "tape" may actually be a disk, but that is another matter.&amp;nbsp; My question is this:&amp;nbsp; I have a document showing the file layout, and there are scads of packed decimal fields with a '+' and some number after the PD format, and both are wrapped in parenthesis.&amp;nbsp; For example, if I have "@2156 (TOT1 - TOT24) (PD5.0 +242)", what does the "+242" mean.&amp;nbsp; I know there are 24 fields here, but there is also "@2161 (NextField1-NextField24) ($ 18. +229)"&amp;nbsp; I cannot fathom how, even using packed decimal, there could be 24 fields in the space between 2156 and 2161.&amp;nbsp; Any insight would be greatly appreciated.&amp;nbsp; Thank you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Greg&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Feb 2013 14:56:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Packed-decimal-question/m-p/117292#M24198</guid>
      <dc:creator>gsnidow</dc:creator>
      <dc:date>2013-02-21T14:56:11Z</dc:date>
    </item>
    <item>
      <title>Re: Packed decimal question</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Packed-decimal-question/m-p/117293#M24199</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Greg,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As you have seen with the NextField variables, the questions here revolve around the INPUT statement.&amp;nbsp; The fact that some fields are packed decimal is a separate issue, and doesn't really impact the answer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The form of INPUT you are looking at:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;@2156 (TOT1 - TOT24) (PD5.0 +242)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This means that the same instructions (PD5.0 +242) should be applied when reading every variable in the list (TOT1 - TOT24).&amp;nbsp; So SAS begins by reading TOT1.&amp;nbsp; Start at column 2156 of the incoming data line, read 5 characters (PD5.0), which positions the software at column 2161.&amp;nbsp; Then move 242 spaces to the right, positioning the software at column 2403.&amp;nbsp; Then apply the same instructions to read TOT2.&amp;nbsp; Read the 5 characters starting at column 2403, and positioning the software at column 2408.&amp;nbsp; Then move 242 spaces to the right, positioning at column 2650.&amp;nbsp; Then read TOT3, etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope I've done the math right here.&amp;nbsp; Either way, the idea is that the same instructions should apply when reading every variable in the list.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good luck.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Feb 2013 15:37:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Packed-decimal-question/m-p/117293#M24199</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2013-02-21T15:37:04Z</dc:date>
    </item>
    <item>
      <title>Re: Packed decimal question</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Packed-decimal-question/m-p/117294#M24200</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Checkout the documentation for the SAS INFORMAT controls&lt;/P&gt;&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a000148073.htm" title="http://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a000148073.htm"&gt;SAS(R) 9.2 Language Reference: Dictionary, Fourth Edition&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;@2156 (TOT1 - TOT24) (PD5.0 +242)&lt;/P&gt;&lt;P&gt;means to pick up tot1 starting at column 2156 and tot2 starting at column 2156+242, etc.&amp;nbsp; It is not PD specific.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Doc Muhlbaier&lt;/P&gt;&lt;P&gt;Duke&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Feb 2013 16:21:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Packed-decimal-question/m-p/117294#M24200</guid>
      <dc:creator>Doc_Duke</dc:creator>
      <dc:date>2013-02-21T16:21:54Z</dc:date>
    </item>
    <item>
      <title>Re: Packed decimal question</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Packed-decimal-question/m-p/117295#M24201</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you both so much for the help, I was struggling to understand what was going on. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Greg&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Feb 2013 16:46:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Packed-decimal-question/m-p/117295#M24201</guid>
      <dc:creator>gsnidow</dc:creator>
      <dc:date>2013-02-21T16:46:23Z</dc:date>
    </item>
  </channel>
</rss>

