<?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 Cobol - 153 Subscript out of range in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/cobol-153-subscript-out-of-range/m-p/5013596#M96565</link>
    <description>I have almost no experience with Cobol. We moved existing Cobol code to a new server a compiled it there. The program works with most files but fails somewhere towards the end on others. According to the debugger it fails on a MOVE. Any help would be appreciated.&lt;BR /&gt;&lt;BR /&gt;10  RPT1-FIELD-NAME      PIC X(25).&lt;BR /&gt;77  WS-RPT-SUB           PIC 9(6) VALUE 1.&lt;BR /&gt;&lt;BR /&gt;MOVE 'FFV DEPT ID/GL:    ' TO&lt;BR /&gt;                              RPT1-FIELD-NAME(WS-RPT-SUB)&lt;BR /&gt;  &lt;BR /&gt;Thanks,&lt;BR /&gt;Alex</description>
    <pubDate>Fri, 10 Nov 2006 13:05:13 GMT</pubDate>
    <dc:creator>Alex Fedyashov</dc:creator>
    <dc:date>2006-11-10T13:05:13Z</dc:date>
    <item>
      <title>Cobol - 153 Subscript out of range</title>
      <link>https://community.hpe.com/t5/operating-system-linux/cobol-153-subscript-out-of-range/m-p/5013596#M96565</link>
      <description>I have almost no experience with Cobol. We moved existing Cobol code to a new server a compiled it there. The program works with most files but fails somewhere towards the end on others. According to the debugger it fails on a MOVE. Any help would be appreciated.&lt;BR /&gt;&lt;BR /&gt;10  RPT1-FIELD-NAME      PIC X(25).&lt;BR /&gt;77  WS-RPT-SUB           PIC 9(6) VALUE 1.&lt;BR /&gt;&lt;BR /&gt;MOVE 'FFV DEPT ID/GL:    ' TO&lt;BR /&gt;                              RPT1-FIELD-NAME(WS-RPT-SUB)&lt;BR /&gt;  &lt;BR /&gt;Thanks,&lt;BR /&gt;Alex</description>
      <pubDate>Fri, 10 Nov 2006 13:05:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/cobol-153-subscript-out-of-range/m-p/5013596#M96565</guid>
      <dc:creator>Alex Fedyashov</dc:creator>
      <dc:date>2006-11-10T13:05:13Z</dc:date>
    </item>
    <item>
      <title>Re: Cobol - 153 Subscript out of range</title>
      <link>https://community.hpe.com/t5/operating-system-linux/cobol-153-subscript-out-of-range/m-p/5013597#M96566</link>
      <description>Hi ALex:&lt;BR /&gt;&lt;BR /&gt;Cobol array subscripts range from one (1) to n.  What you show is only that the *initial* value of WS-PRT-SUB is one which would be valid if RPT1-GIELD-NAME is subordinate to an 'OCCURS' clause.&lt;BR /&gt;&lt;BR /&gt;Addressing outside of the range of occurances that constitute an array (n &amp;lt; 1 or n &amp;gt; nbr_elements) will result in a fault.  &lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Fri, 10 Nov 2006 13:13:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/cobol-153-subscript-out-of-range/m-p/5013597#M96566</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2006-11-10T13:13:11Z</dc:date>
    </item>
    <item>
      <title>Re: Cobol - 153 Subscript out of range</title>
      <link>https://community.hpe.com/t5/operating-system-linux/cobol-153-subscript-out-of-range/m-p/5013598#M96567</link>
      <description>Hi James,&lt;BR /&gt;Could you explain that a little differently, maybe even show me how it should look? Thanks for your help.</description>
      <pubDate>Fri, 10 Nov 2006 14:28:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/cobol-153-subscript-out-of-range/m-p/5013598#M96567</guid>
      <dc:creator>Alex Fedyashov</dc:creator>
      <dc:date>2006-11-10T14:28:55Z</dc:date>
    </item>
    <item>
      <title>Re: Cobol - 153 Subscript out of range</title>
      <link>https://community.hpe.com/t5/operating-system-linux/cobol-153-subscript-out-of-range/m-p/5013599#M96568</link>
      <description>&lt;!--!*#--&gt;Hi Alex:&lt;BR /&gt;&lt;BR /&gt;Consider (in general):&lt;BR /&gt;&lt;BR /&gt;01  MYTABLE.&lt;BR /&gt;    03  MYCHARS  OCCURS 5 TIMES.&lt;BR /&gt;        05  CHAR PIC X(1).&lt;BR /&gt;&lt;BR /&gt;...in memory, looks like:&lt;BR /&gt;&lt;BR /&gt;[_][_][_][_][_]&lt;BR /&gt; 1  2  3  4  5&lt;BR /&gt;&lt;BR /&gt;...and thus we can say:&lt;BR /&gt;&lt;BR /&gt;MOVE "h" TO CHAR(1).&lt;BR /&gt;MOVE "i" TO CHAR(2).&lt;BR /&gt;&lt;BR /&gt;[h][i][_][_][_]&lt;BR /&gt; 1  2  3  4  5&lt;BR /&gt;&lt;BR /&gt;...but if we try:&lt;BR /&gt;&lt;BR /&gt;MOVE "x" TO CHAR(6).&lt;BR /&gt;&lt;BR /&gt;...we fault, because we have tried to write beyond the array bounds -- into memory that doesn't "belong" to us.  Similarly, if we were to try:&lt;BR /&gt;&lt;BR /&gt;MOVE "x" to CHAR(0).&lt;BR /&gt;&lt;BR /&gt;Is that the explanation you wanted?&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Fri, 10 Nov 2006 14:45:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/cobol-153-subscript-out-of-range/m-p/5013599#M96568</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2006-11-10T14:45:35Z</dc:date>
    </item>
    <item>
      <title>Re: Cobol - 153 Subscript out of range</title>
      <link>https://community.hpe.com/t5/operating-system-linux/cobol-153-subscript-out-of-range/m-p/5013600#M96569</link>
      <description>Hey James,&lt;BR /&gt;Thanks for the help.</description>
      <pubDate>Mon, 13 Nov 2006 18:32:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/cobol-153-subscript-out-of-range/m-p/5013600#M96569</guid>
      <dc:creator>Alex Fedyashov</dc:creator>
      <dc:date>2006-11-13T18:32:27Z</dc:date>
    </item>
  </channel>
</rss>

