<?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 Error in Operating System - OpenVMS</title>
    <link>https://community.hpe.com/t5/operating-system-openvms/cobol-error/m-p/4988671#M52484</link>
    <description>If you compile with /Map=declared, then the listing file shows the layout and size of storage used. Alignment rules can also affect the size of this.&lt;BR /&gt;Phil</description>
    <pubDate>Mon, 03 Jul 2006 19:40:26 GMT</pubDate>
    <dc:creator>Phil.Howell</dc:creator>
    <dc:date>2006-07-03T19:40:26Z</dc:date>
    <item>
      <title>COBOL Error</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/cobol-error/m-p/4988669#M52482</link>
      <description>Hi&lt;BR /&gt;&lt;BR /&gt;I am trying to increase a Working Storage area in a COBOL Program. Originally it was an OCCURS 99. I needed to change it to accomodate a three digit number, meaning that I need to change the OCCURS to a 999. &lt;BR /&gt;&lt;BR /&gt;When I tried to compile, I got the following message:&lt;BR /&gt;&lt;BR /&gt;%COBOL-F-ERROR 137, (1) Operand longer than 65535 bytes cannot be referenced&lt;BR /&gt;&lt;BR /&gt;Thinking I had reached some sort of limit, I reduced the OCCURS to 299. &lt;BR /&gt;&lt;BR /&gt;I compiled without error, yet whan I try to move zeroes to the first instance within the code, I get an Access Violation, reason mask 4. &lt;BR /&gt;&lt;BR /&gt;It's an old VAX Running OpenVMS V7.3 (yeah, I know). I am long past regular contact with COBOL, so any any assitance would be most helpful. &lt;BR /&gt;</description>
      <pubDate>Mon, 03 Jul 2006 13:28:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/cobol-error/m-p/4988669#M52482</guid>
      <dc:creator>Mairtin O'Droichid</dc:creator>
      <dc:date>2006-07-03T13:28:52Z</dc:date>
    </item>
    <item>
      <title>Re: COBOL Error</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/cobol-error/m-p/4988670#M52483</link>
      <description>Mairtin,&lt;BR /&gt;  I'm not sure I understand your statement: &lt;BR /&gt;&lt;BR /&gt;&amp;gt;"I needed to change it to accomodate &lt;BR /&gt;&amp;gt;a three digit number, meaning that I &lt;BR /&gt;&amp;gt;need to change the OCCURS to a 999"&lt;BR /&gt;&lt;BR /&gt;  "three digit number" implies you're thinking about a PICTURE clause. PIC 99 is 2 digits, PIC 999 is 3 digits. However, the OCCURS clause is an array bound. OCCURS 99 means you're declaring an array with 99 elements, OCCURS 999 means and array with 999 elements, ie: your array is now 10 times larger than it was before.&lt;BR /&gt;&lt;BR /&gt;  VAX Cobol has a size limit of 64K bytes on some operations. It sounds like your array elements are larger than 64 bytes, and you're trying to use the whole array in a context that is size limited.&lt;BR /&gt;&lt;BR /&gt;  What does the entire object declaration look like? (exact source text) What statement are you using to access it, and what is the exact text of the ACCVIO message.&lt;BR /&gt;&lt;BR /&gt;  Can you also be more specific about "accomodating 3 digit numbers"? Does every 3 digit number really need an array element? &lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 03 Jul 2006 17:58:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/cobol-error/m-p/4988670#M52483</guid>
      <dc:creator>John Gillings</dc:creator>
      <dc:date>2006-07-03T17:58:00Z</dc:date>
    </item>
    <item>
      <title>Re: COBOL Error</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/cobol-error/m-p/4988671#M52484</link>
      <description>If you compile with /Map=declared, then the listing file shows the layout and size of storage used. Alignment rules can also affect the size of this.&lt;BR /&gt;Phil</description>
      <pubDate>Mon, 03 Jul 2006 19:40:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/cobol-error/m-p/4988671#M52484</guid>
      <dc:creator>Phil.Howell</dc:creator>
      <dc:date>2006-07-03T19:40:26Z</dc:date>
    </item>
    <item>
      <title>Re: COBOL Error</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/cobol-error/m-p/4988672#M52485</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I can see the lack of clarity now. Sorry, it had been a looonnng day. &lt;BR /&gt;&lt;BR /&gt;In a nutshell, I need to provide an array in WS to accomodate calculations on a group of figures. Previously, there had been only a max. of 99 of these, although the code was a 3 digit field. Declaration is as follows:&lt;BR /&gt;&lt;BR /&gt; 01  WS-TABLES.&lt;BR /&gt;  464        *&lt;BR /&gt;  465        * July 2006 - Limit increased to cater for three digit pay group&lt;BR /&gt;  466        *&lt;BR /&gt;  467              03  WS-PAY-GROUP OCCURS 299.&lt;BR /&gt;  468        *&lt;BR /&gt;  469                05  WS-PG-ACCR                PIC S9(14)V99.&lt;BR /&gt;  470                05  WS-FREQ-TAB               PIC 99.&lt;BR /&gt;  471                05  WS-PDCT                   PIC 99.&lt;BR /&gt;  472        *&lt;BR /&gt;  473        * Nov '98 change to 9 chars at MP3.&lt;BR /&gt;  474        *&lt;BR /&gt;  475                05  WS-PDTS OCCURS 10.&lt;BR /&gt;  476        *&lt;BR /&gt;  477        * Redefine to extract day element of date to calculate&lt;BR /&gt;  478        * transaction date minus 12 for rationalised pay groups.&lt;BR /&gt;  479        *&lt;BR /&gt;  480                     07 FILLER                  PIC X.&lt;BR /&gt;  481                     07 WS-PDTS-CCYY            PIC 9999.&lt;BR /&gt;  482                     07 WS-PDTS-MM              PIC 99.&lt;BR /&gt;  483                     07 WS-PDTS-DD              PIC 99.&lt;BR /&gt;  484        *&lt;BR /&gt;  485                05  WS-BF-DAYS                  PIC 999.&lt;BR /&gt;  486                05  WS-BF-NEG                   PIC X.&lt;BR /&gt;  487                05  WS-CF-DAYS                  PIC 999.&lt;BR /&gt;  488                05  WS-CF-NEG                   PIC X.&lt;BR /&gt;  489        *&lt;BR /&gt;  490        * Storage for the latest date for each Pay Group&lt;BR /&gt;  491        *&lt;BR /&gt;  492              05  WS-LATEST-PAYDATE.&lt;BR /&gt;  493              07  FILLER                    PIC X.&lt;BR /&gt;  494                  07  WS-LATEST-CCYY            PIC 9999.&lt;BR /&gt;  495                  07  WS-LATEST-MM              PIC 99.&lt;BR /&gt;  496                  07  WS-LATEST-DD              PIC 99.&lt;BR /&gt;  497        *&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Now with the advent of groupings greater than 99 (e.g. we now have group number 205 and 206), there was a need to increase the array size to accomodate these. I hoped that increasing the limit of possible entries to 999 would be the quick and easy solution. That caused a compile error. I then reduced this to 299, and, while it compliled error free (I had used the /NOWARN option), I ran the program and got the following runtime message:&lt;BR /&gt;&lt;BR /&gt;%SYSTEM-F-ACCVIO, access violation, reason mask=04, virtual address=000D070, PC=0000D0B6, PSL=0BC00000&lt;BR /&gt;&lt;BR /&gt;%TRACE-F-TRACEBACK, symbolic stack dump follows&lt;BR /&gt;module name   routine name     line   rel PC    abs PC&lt;BR /&gt;EURO_PACR     EURO_PACR         587   00000B6   0000D086&lt;BR /&gt;&lt;BR /&gt;The line is a move statement:&lt;BR /&gt;&lt;BR /&gt;587                   MOVE ZEROS TO WS-PG-ACCR(MOD1).&lt;BR /&gt;&lt;BR /&gt;If there is a defined array limit, I will have to re-program to accomodate the actual number of codes being processed, although it is like to exceed 99 actual occurences.</description>
      <pubDate>Tue, 04 Jul 2006 04:17:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/cobol-error/m-p/4988672#M52485</guid>
      <dc:creator>Mairtin O'Droichid</dc:creator>
      <dc:date>2006-07-04T04:17:32Z</dc:date>
    </item>
    <item>
      <title>Re: COBOL Error</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/cobol-error/m-p/4988673#M52486</link>
      <description>If you have a sparse array population, such that only a minority of possible numbers are used, you may wish to consider a level of indirection. &lt;BR /&gt;Put in a one dimensional lookup table large enough to hold all of the numbers you will ever use, then for each number you actually use, put the next free array index number into the table. &lt;BR /&gt;&lt;BR /&gt;Your comment about 7.3.. This is the current and latest version for a VAX, so no need to expect any push to upgrade...</description>
      <pubDate>Tue, 04 Jul 2006 05:16:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/cobol-error/m-p/4988673#M52486</guid>
      <dc:creator>John Travell</dc:creator>
      <dc:date>2006-07-04T05:16:15Z</dc:date>
    </item>
    <item>
      <title>Re: COBOL Error</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/cobol-error/m-p/4988674#M52487</link>
      <description>Thanks John, &lt;BR /&gt;&lt;BR /&gt;Your point on the version of VMS is well understood. &lt;BR /&gt;&lt;BR /&gt;I am old enough to remember VAXes from the early 80's and the sense of deja vu I experienced when I got to do the original 'once off' COBOL change made me very realistic about things. &lt;BR /&gt;&lt;BR /&gt;I am now a line manager and the only one with any clue about COBOL on site(and even that's up for debate!). &lt;BR /&gt;&lt;BR /&gt;I am trying to avoid any re-programming as it would change the nature of the code at a time when I have almost no time contingency. This is a time critical legacy application (that should have been replaced 5 years ago), so I was trying to avoid any such changes. &lt;BR /&gt;&lt;BR /&gt;I compiled again using a reduced OCCURS (down to 299 as I don't expect to need any more than a maximum range of 300 possible items), which showed that the array takes up 37973, which is well below the 64K limit clobbered by the compiler. I will copy this .EXE in to be sure of this and re-run.</description>
      <pubDate>Tue, 04 Jul 2006 06:16:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/cobol-error/m-p/4988674#M52487</guid>
      <dc:creator>Mairtin O'Droichid</dc:creator>
      <dc:date>2006-07-04T06:16:20Z</dc:date>
    </item>
    <item>
      <title>Re: COBOL Error</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/cobol-error/m-p/4988675#M52488</link>
      <description>Mairtin,&lt;BR /&gt;&lt;BR /&gt;Looking to yours program I see that the problem is probably in line 588:&lt;BR /&gt;&lt;BR /&gt;IF MOD1 &amp;lt; 999 GO TO BA01-ST.&lt;BR /&gt;&lt;BR /&gt;should be:&lt;BR /&gt;&lt;BR /&gt;IF MOD1 &amp;lt; 299 GO TO BA01-ST.&lt;BR /&gt;&lt;BR /&gt;You pass the bounds of the table (and whole working-storage)!&lt;BR /&gt;To get a more apropriate error you can compile the program with /CHECK=BOUNDS (See HELP COBOL /CHECK).&lt;BR /&gt;&lt;BR /&gt;Bojan</description>
      <pubDate>Tue, 04 Jul 2006 09:05:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/cobol-error/m-p/4988675#M52488</guid>
      <dc:creator>Bojan Nemec</dc:creator>
      <dc:date>2006-07-04T09:05:40Z</dc:date>
    </item>
    <item>
      <title>Re: COBOL Error</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/cobol-error/m-p/4988676#M52489</link>
      <description>Hi Bojan&lt;BR /&gt;&lt;BR /&gt;I came to the same conclusion at about 2:25 buit didn;t see your reply until now. I found a colleague of the same age (!) who was able to look with fresh eyes (as you have done too). &lt;BR /&gt;&lt;BR /&gt;This change has been applied (all references are consistent) and now appears to be working. &lt;BR /&gt;&lt;BR /&gt;Many thanks</description>
      <pubDate>Tue, 04 Jul 2006 09:14:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/cobol-error/m-p/4988676#M52489</guid>
      <dc:creator>Mairtin O'Droichid</dc:creator>
      <dc:date>2006-07-04T09:14:01Z</dc:date>
    </item>
    <item>
      <title>Re: COBOL Error</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/cobol-error/m-p/4988677#M52490</link>
      <description>Also make sure that your table is indexed by variables with at least pic 999. A pic 99 might be too small. And there might be tests in the program like &amp;gt; 99 but also 100 and 98 and even 97 are very well possible.&lt;BR /&gt;&lt;BR /&gt;Wim, ex-cobol programmer.</description>
      <pubDate>Tue, 04 Jul 2006 09:18:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/cobol-error/m-p/4988677#M52490</guid>
      <dc:creator>Wim Van den Wyngaert</dc:creator>
      <dc:date>2006-07-04T09:18:13Z</dc:date>
    </item>
    <item>
      <title>Re: COBOL Error</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/cobol-error/m-p/4988678#M52491</link>
      <description>As per my last comment, the reason for the Access Violation was as Bojan had suggested, i.e. that the WS table had been reduced, but the subscript had not, meaning that the program tried to reference outside the bounds of the actual size of the WS Table.</description>
      <pubDate>Tue, 04 Jul 2006 09:33:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/cobol-error/m-p/4988678#M52491</guid>
      <dc:creator>Mairtin O'Droichid</dc:creator>
      <dc:date>2006-07-04T09:33:40Z</dc:date>
    </item>
    <item>
      <title>Re: COBOL Error</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/cobol-error/m-p/4988679#M52492</link>
      <description>Diudn't see the enclosure (and the answer of Bojan).&lt;BR /&gt;&lt;BR /&gt;On line 1190 there is an error with 99.&lt;BR /&gt;&lt;BR /&gt;Wim</description>
      <pubDate>Tue, 04 Jul 2006 09:39:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/cobol-error/m-p/4988679#M52492</guid>
      <dc:creator>Wim Van den Wyngaert</dc:creator>
      <dc:date>2006-07-04T09:39:41Z</dc:date>
    </item>
    <item>
      <title>Re: COBOL Error</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/cobol-error/m-p/4988680#M52493</link>
      <description>Mairtin,&lt;BR /&gt;&lt;BR /&gt;please view &lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://forums1.itrc.hp.com/service/forums/helptips.do?#33" target="_blank"&gt;http://forums1.itrc.hp.com/service/forums/helptips.do?#33&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;about thanking those that helped.&lt;BR /&gt;&lt;BR /&gt;Proost.&lt;BR /&gt;&lt;BR /&gt;Have one on me.&lt;BR /&gt;&lt;BR /&gt;jpe</description>
      <pubDate>Tue, 04 Jul 2006 12:18:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/cobol-error/m-p/4988680#M52493</guid>
      <dc:creator>Jan van den Ende</dc:creator>
      <dc:date>2006-07-04T12:18:57Z</dc:date>
    </item>
    <item>
      <title>Re: COBOL Error</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/cobol-error/m-p/4988681#M52494</link>
      <description>SlÃ¡inte Jan, I have marked this with a 9! &lt;BR /&gt;&lt;BR /&gt;All replies assisted me in tracing the capacity issue and the fresh pairs of eyes drew me to review the code. It;s such along time since I actualy programmed in COBOL (circa 1985, ahem), so it was a steep learning curve. &lt;BR /&gt;&lt;BR /&gt;Thanks for the assistance. Keep up the good work!&lt;BR /&gt;&lt;BR /&gt;MB&lt;BR /&gt;</description>
      <pubDate>Wed, 05 Jul 2006 04:35:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/cobol-error/m-p/4988681#M52494</guid>
      <dc:creator>Mairtin O'Droichid</dc:creator>
      <dc:date>2006-07-05T04:35:42Z</dc:date>
    </item>
  </channel>
</rss>

