<?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 compilation with /NOOPTIMIZE option in Operating System - OpenVMS</title>
    <link>https://community.hpe.com/t5/operating-system-openvms/cobol-compilation-with-nooptimize-option/m-p/4770717#M41486</link>
    <description>Hello,&lt;BR /&gt;we are running OpenVMS 8.4 on IA64 and we encounter a problem with the Cobol compiler.&lt;BR /&gt;&lt;BR /&gt;The compiler options are /DEBUG /NOOPTIMIZE (as done in the previous 7.3.2 version on Alpha server).&lt;BR /&gt;&lt;BR /&gt;when debugging we have the warning and no data accessible :&lt;BR /&gt;&lt;BR /&gt;%DEBUG-W-UNALLOCATED, 'YA-ENR-REQMOD' is not allocated in memory (optimized away)&lt;BR /&gt;&lt;BR /&gt;which refers to the /OPTIM param.&lt;BR /&gt;&lt;BR /&gt;Any idea ?</description>
    <pubDate>Mon, 28 Mar 2011 08:29:23 GMT</pubDate>
    <dc:creator>CORNU</dc:creator>
    <dc:date>2011-03-28T08:29:23Z</dc:date>
    <item>
      <title>COBOL compilation with /NOOPTIMIZE option</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/cobol-compilation-with-nooptimize-option/m-p/4770717#M41486</link>
      <description>Hello,&lt;BR /&gt;we are running OpenVMS 8.4 on IA64 and we encounter a problem with the Cobol compiler.&lt;BR /&gt;&lt;BR /&gt;The compiler options are /DEBUG /NOOPTIMIZE (as done in the previous 7.3.2 version on Alpha server).&lt;BR /&gt;&lt;BR /&gt;when debugging we have the warning and no data accessible :&lt;BR /&gt;&lt;BR /&gt;%DEBUG-W-UNALLOCATED, 'YA-ENR-REQMOD' is not allocated in memory (optimized away)&lt;BR /&gt;&lt;BR /&gt;which refers to the /OPTIM param.&lt;BR /&gt;&lt;BR /&gt;Any idea ?</description>
      <pubDate>Mon, 28 Mar 2011 08:29:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/cobol-compilation-with-nooptimize-option/m-p/4770717#M41486</guid>
      <dc:creator>CORNU</dc:creator>
      <dc:date>2011-03-28T08:29:23Z</dc:date>
    </item>
    <item>
      <title>Re: COBOL compilation with /NOOPTIMIZE option</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/cobol-compilation-with-nooptimize-option/m-p/4770718#M41487</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Looks like this problem is fixed in VMS84I_UPDATE-V0400 kit. Please refer the section 5.2.49 from the release note.&lt;BR /&gt;&lt;BR /&gt;==============================================&lt;BR /&gt;&lt;BR /&gt; 5.2.49  Debugger claims that the variable has been optimized&lt;BR /&gt;&lt;BR /&gt;        5.2.49.1  Problem Description:&lt;BR /&gt; &lt;BR /&gt;  When debugging a large PASCAL program if you attempt to &lt;BR /&gt;  examine a variable, it fails with a message indicating &lt;BR /&gt;  that the variable has been optimized. This happens &lt;BR /&gt;  specifically in cases where the code is similar to the &lt;BR /&gt;  PASCAL program as shown below: &lt;BR /&gt;&lt;BR /&gt;         $ type a2.pas&lt;BR /&gt;&lt;BR /&gt;  [INHERIT('file_name')]&lt;BR /&gt;&lt;BR /&gt;  PROGRAM USE(INPUT,OUTPUT);&lt;BR /&gt;&lt;BR /&gt;  BEGIN&lt;BR /&gt;       READLN(Status);&lt;BR /&gt;       WRITELN(Status);&lt;BR /&gt;  END.&lt;BR /&gt;  &lt;BR /&gt;  $ type b2.pas&lt;BR /&gt;&lt;BR /&gt;  [ENVIRONMENT('file_name')]&lt;BR /&gt;&lt;BR /&gt;  MODULE DEFINITIONS;&lt;BR /&gt;&lt;BR /&gt;  VAR&lt;BR /&gt;      Status      : UNSIGNED;&lt;BR /&gt;  END.&lt;BR /&gt;&lt;BR /&gt;  Compiling b2.pas creates the file file_name.pen. The &lt;BR /&gt;  variable "Status" is defined in b2.pas and used in &lt;BR /&gt;  a2.pas. An examine of Status gives the following:&lt;BR /&gt;&lt;BR /&gt;  DBG&amp;gt; ex Status&lt;BR /&gt;  %DEBUG-W-UNALLOCATED, 'STATUS' is not allocated in memory &lt;BR /&gt;  (optimized away)&lt;BR /&gt;  &lt;BR /&gt;  This problem has been fixed with changes to Pascal compiler &lt;BR /&gt;  and debugger. &lt;BR /&gt; &lt;BR /&gt;        Images Affected:&lt;BR /&gt;               &lt;BR /&gt;  -  [SYSLIB]DEBUGSHR.EXE&lt;BR /&gt;&lt;BR /&gt;   Quix cases reporting this problem:&lt;BR /&gt; &lt;BR /&gt;                QXCM1001024131&lt;BR /&gt;               &lt;BR /&gt;         5.2.49.2  Work-arounds:&lt;BR /&gt;                 &lt;BR /&gt;  None.  &lt;BR /&gt;&lt;BR /&gt;==============================================&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Ketan&lt;BR /&gt;</description>
      <pubDate>Mon, 28 Mar 2011 10:11:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/cobol-compilation-with-nooptimize-option/m-p/4770718#M41487</guid>
      <dc:creator>Shriniketan Bhagwat</dc:creator>
      <dc:date>2011-03-28T10:11:12Z</dc:date>
    </item>
    <item>
      <title>Re: COBOL compilation with /NOOPTIMIZE option</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/cobol-compilation-with-nooptimize-option/m-p/4770719#M41488</link>
      <description>RE: Katan&lt;BR /&gt;&lt;BR /&gt;Two issues come to mind here:&lt;BR /&gt;&lt;BR /&gt;1) What is the relationship of a "fix" for a Pascal problem to the Cobol problem posted?&lt;BR /&gt;&lt;BR /&gt;2) I am unable to access the V0400 patch kit nor the release notes for it.  Can you post them here?  (I DO have access to the patch area, teh V0400 patch kit is not in the patch area. Why?)&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Dan</description>
      <pubDate>Mon, 28 Mar 2011 10:32:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/cobol-compilation-with-nooptimize-option/m-p/4770719#M41488</guid>
      <dc:creator>abrsvc</dc:creator>
      <dc:date>2011-03-28T10:32:51Z</dc:date>
    </item>
    <item>
      <title>Re: COBOL compilation with /NOOPTIMIZE option</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/cobol-compilation-with-nooptimize-option/m-p/4770720#M41489</link>
      <description>You have some good advice already.&lt;BR /&gt;&lt;BR /&gt;- Is this critical to tackle a problem?&lt;BR /&gt;- the message possibly already tells you enough... the data was not 'touched'&lt;BR /&gt;- Is it a workaround to add an initialization (init or move) line for the variable to the program. Does that 'fix' it?&lt;BR /&gt;- Do you have a chance to test this on OpenVMS V8.3-1H1?&lt;BR /&gt;- If the problem persists for you, and blocks work, then perhaps with a (.TXT) attachment for a sample program, reduced to the minimum, to show the problem?&lt;BR /&gt;&lt;BR /&gt;Cheers,&lt;BR /&gt;Hein&lt;BR /&gt;</description>
      <pubDate>Mon, 28 Mar 2011 12:12:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/cobol-compilation-with-nooptimize-option/m-p/4770720#M41489</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2011-03-28T12:12:01Z</dc:date>
    </item>
    <item>
      <title>Re: COBOL compilation with /NOOPTIMIZE option</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/cobol-compilation-with-nooptimize-option/m-p/4770721#M41490</link>
      <description>Dan,&lt;BR /&gt;&lt;BR /&gt;&amp;gt;&amp;gt; 1) What is the relationship of a "fix" for a Pascal problem to the Cobol problem&lt;BR /&gt;&amp;gt;&amp;gt; posted?&lt;BR /&gt;The VMS84I_UPDATE-V0400 kit has a similar problem fixed w.r.t to the pascal&lt;BR /&gt;compiler. The post here is related to Cobol compiler. Can it be that a similar fix&lt;BR /&gt;is required for a Cobol complier.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;&amp;gt; 2) I am unable to access the V0400 patch kit nor the release notes for it.&lt;BR /&gt;&amp;gt;&amp;gt; Can you post them here? (I DO have access to the patch area, teh V0400 patch&lt;BR /&gt;&amp;gt;&amp;gt; kit is not in the patch area. Why?)&lt;BR /&gt;I am able to view the release notes of the VMS84I_UPDATE-V0400 kit but unable&lt;BR /&gt;to download it (both AXP &amp;amp; I64). The release notes text is same as the one&lt;BR /&gt;posted by Ketan above.&lt;BR /&gt;&lt;BR /&gt;CORNU,&lt;BR /&gt;Please forward your query to the HP's Office of OpenVMS programs interface&lt;BR /&gt;i.e. OpenVMS.Programs@hp.com.&lt;BR /&gt;This way your query would make its way to the compiler team here and they could&lt;BR /&gt;do a quick verification whether its a similar problem to what was fixed in&lt;BR /&gt;VMS84I_UPDATE-V0400 but for a Pascal compiler. This can then be taken forward.&lt;BR /&gt;&lt;BR /&gt;Hope this helps.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Murali</description>
      <pubDate>Mon, 28 Mar 2011 13:05:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/cobol-compilation-with-nooptimize-option/m-p/4770721#M41490</guid>
      <dc:creator>P Muralidhar Kini</dc:creator>
      <dc:date>2011-03-28T13:05:29Z</dc:date>
    </item>
    <item>
      <title>Re: COBOL compilation with /NOOPTIMIZE option</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/cobol-compilation-with-nooptimize-option/m-p/4770722#M41491</link>
      <description>Cornu,&lt;BR /&gt;&lt;BR /&gt;&amp;gt;The compiler options are /DEBUG /NOOPTIMIZE &amp;gt;(as done in the previous 7.3.2 version on &amp;gt;Alpha server).&lt;BR /&gt;&lt;BR /&gt;/NOOPTIMIZE was a bad idea on Alpha, and it's an even worse idea on IA64. Maybe use it with /DEBUG when developing (but I tend to avoid even that, though it can make debugging a bit tricky). Always make sure your released code is compiled and tested with /OPTIMIZE.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&amp;gt;%DEBUG-W-UNALLOCATED... which refers to &lt;BR /&gt;&amp;gt;the /OPTIM param.&lt;BR /&gt;&lt;BR /&gt;Regardless of the /NOOPTIMIZE qualifier, the nature of the IA64 architecture (and to a lesser extent Alpha) means that there is no such thing as unoptimized code. The compiler will always optimize to some extent. /NOOPTIMIZE really means "do as little optimization as possible".&lt;BR /&gt;&lt;BR /&gt;&amp;gt;1) What is the relationship of a "fix" for &lt;BR /&gt;&amp;gt;a Pascal problem to the Cobol problem &lt;BR /&gt;&amp;gt;posted?&lt;BR /&gt;&lt;BR /&gt;All compilers share some code generation and optimization. It's entirely plausible that the same issue reported for Pascal will affect other languages, and be fixed by the same update (though in this case there's insufficient information to say). &lt;BR /&gt;&lt;BR /&gt;The "UNALLOCATED" warning is not an error, it just means the compiler hasn't created permanent storage for the variable, which will limit the times and places that it can be examined under DEBUG. You can still examine the variable when it's in scope by determining which register it's stored in and examining it directly (admittedly a non-trivial task on IA64). You can force the compiler to store it in memory with *DC SET VOLATILE around the declaration:&lt;BR /&gt;&lt;BR /&gt;*DC SET VOLATILE&lt;BR /&gt;  01  YA-ENR-REQMOD PIC 9(9) COMP.&lt;BR /&gt;*DC END-SET VOLATILE&lt;BR /&gt;&lt;BR /&gt;As Hein has suggested, forcing initialization or perhaps DISPLAYing the variable may also convince the compiler to store it somewhere.</description>
      <pubDate>Mon, 28 Mar 2011 20:39:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/cobol-compilation-with-nooptimize-option/m-p/4770722#M41491</guid>
      <dc:creator>John Gillings</dc:creator>
      <dc:date>2011-03-28T20:39:23Z</dc:date>
    </item>
    <item>
      <title>Re: COBOL compilation with /NOOPTIMIZE option</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/cobol-compilation-with-nooptimize-option/m-p/4770723#M41492</link>
      <description>Hi all.&lt;BR /&gt;&lt;BR /&gt;I don't know if you have solved the problem or not.&lt;BR /&gt;&lt;BR /&gt;This is only to inform you that there is a patch for COBOL v3.0:&lt;BR /&gt;&lt;BR /&gt;HP-I64VMS-COBOL-V0300-6-ECO1-1&lt;BR /&gt;&lt;BR /&gt;Regards.&lt;BR /&gt;&lt;BR /&gt;Ana</description>
      <pubDate>Fri, 08 Apr 2011 06:32:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/cobol-compilation-with-nooptimize-option/m-p/4770723#M41492</guid>
      <dc:creator>Ana M. García Olivencia</dc:creator>
      <dc:date>2011-04-08T06:32:04Z</dc:date>
    </item>
  </channel>
</rss>

