<?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: Error %ILINK-E-IMEXP0 - Linking Cobol Program w/ Multimensional Tables - in Operating System - OpenVMS</title>
    <link>https://community.hpe.com/t5/operating-system-openvms/error-ilink-e-imexp0-linking-cobol-program-w-multimensional/m-p/5647485#M36833</link>
    <description>&lt;P&gt;[snide remark removed.]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;'Normal' VMS Programs, in the 32-bit VAX, but also on the 64-bit Alpha and Itanium, have only 1 GB of normal process space for code, data and stack. 1/4 of the 4GB limit imposed by the old 32-bit implementation.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The program requests 2 arrays of&amp;nbsp;10000*16*100*10 =&amp;nbsp;160,000,000 element.&lt;/P&gt;&lt;P&gt;So even at 3 bytes each, you'd be out of 1GB space right there.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is that 10,000 just a nice big number or a hard requirement?&lt;/P&gt;&lt;P&gt;If just for testing you change that to 1,000 you will see:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Level   Name          Size        Bytes       Usage  
-----   ---------- ----------   ----------   --------
  25    CASES               9            5   COMP-3  
  05    LOCAL2         80,000       80,000   DISPLAY 
  05    LOCAL3        128,000      128,000   DISPLAY 
  77    NUM-ELEM            5            5   DISPLAY 
  01    TABLE2     80,000,000   80,000,000   DISPLAY 
  01    TABLE3    128,000,000  128,000,000   DISPLAY 
  25    VAL-TRX            15            8   COMP-3  &lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So that would fit.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope you also recognize how NUM-ELEM wil be a piece of string, to be converted to long a billion times over ( using&amp;nbsp;OTS$CVT_DEC8_1_TO_UINT64).&lt;/P&gt;&lt;P&gt;For yucks and education, compile with /MACHINE/LIST and look at the expansion of the line with &lt;SPAN&gt;VAL-TRX (NUM-ELEM, J,&amp;nbsp;&amp;nbsp; C,&amp;nbsp; K)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Now change NUM-ELEM to the the PIC 9(9) COMP that it supposed to be and compare the code expansion.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Anyway... this program needs to be changed and CObol is not going to be the best language to do the job.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;If the array will stay the size it is declared today, then it can only live in P2 space.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;You may want to process it once 'num-elem' at a time, either with double mapping otherwise calling to a subroutine pointing to one element at a time.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Best of luck!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Hein&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 05 May 2012 16:36:21 GMT</pubDate>
    <dc:creator>Hein van den Heuvel</dc:creator>
    <dc:date>2012-05-05T16:36:21Z</dc:date>
    <item>
      <title>Error %ILINK-E-IMEXP0 - Linking Cobol Program w/ Multimensional Tables -</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/error-ilink-e-imexp0-linking-cobol-program-w-multimensional/m-p/5647197#M36830</link>
      <description>&lt;P&gt;I can´t link a Cobol program,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;gt;link /map my_program&lt;/P&gt;&lt;P&gt;%ILINK-E-IMEXP0, generated image, at least a short data segment, exceeds the P0 address space&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PROGRAM-ID. My_program.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;77 NUM-ELEM&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PIC 9(05).&lt;/P&gt;&lt;P&gt;01 TABLE2.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 05 LOCAL2 OCCURS 1 TO 10000 TIMES DEPENDING ON NUM-ELEM.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 10 COTRAN2 OCCURS 16 TIMES.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 15&amp;nbsp; CCOSTO2 OCCURS 100 TIMES.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 20 TICREDI2 OCCURS 10 TIMES.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 25 CASES&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PIC S9(07)V99 COMP-3.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;01 TABLE3.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 05 LOCAL3 OCCURS 1 TO 10000 TIMES DEPENDING ON NUM-ELEM.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 10 COTRAN3 OCCURS 16 TIMES.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 15&amp;nbsp; CCOSTO3 OCCURS 100 TIMES.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 20 TICREDI3 OCCURS 10 TIMES.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 25 VAL-TRX&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PIC S9(13)V99 COMP-3.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PROCEDURE DIVISION.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MOVE 10000 TO NUM-ELEM&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PERFORM VARYING I FROM 1 BY 1 UNTIL I &amp;gt;= NUM-ELEM&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PERFORM VARYING&amp;nbsp;&amp;nbsp; J FROM 1 BY 1 UNTIL J &amp;gt; 16&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PERFORM VARYING&amp;nbsp; C FROM 1 BY 1 UNTIL C &amp;gt;= 100&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;PERFORM VARYING&amp;nbsp;&amp;nbsp; K FROM 1 BY 1 UNTIL K &amp;gt;= 10&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ADD 1&amp;nbsp; TO VALOR (I, J,&amp;nbsp;&amp;nbsp; C,&amp;nbsp; K)&amp;nbsp; VAL-TRX (NUM-ELEM, J,&amp;nbsp;&amp;nbsp; C,&amp;nbsp; K)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; VAL-TRX (I, J,&amp;nbsp;&amp;nbsp; C, 10)&amp;nbsp; VAL-TRX(NUM-ELEM, J,&amp;nbsp;&amp;nbsp; C, 10)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; VAL-TRX (I, J, 100,&amp;nbsp; K)&amp;nbsp; VAL-TRX (NUM-ELEM, J, 100,&amp;nbsp; K)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; VAL-TRX (I, J, 100, 10)&amp;nbsp; VAL-TRX (NUM-ELEM, J, 100, 10)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; END-PERFORM&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; END-PERFORM&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; END-PERFORM&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; END-PERFORM.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DISPLAY " VAL-TRX (1, 1, 1, 1) "&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; VAL-TRX (1, 1, 1, 1) CONVERSION&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; " " " VAL-TRX (1, 1, 100, 1) "&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; VAL-TRX (1, 1, 100, 1) CONVERSION.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DISPLAY " VAL-TRX (1, 1, 1, 10) "&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; VAL-TRX (1, 1, 1, 10) CONVERSION&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; " " " VAL-TRX (1, 1, 100, 10) "&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; VAL-TRX (1, 1, 100, 10) CONVERSION.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DISPLAY " VAL-TRX (NUM-ELEM, 1, 1, 1) "&amp;nbsp; VAL-TRX (NUM-ELEM, 1, 1, 1) CONVERSION&amp;nbsp; " " " VAL-TRX (NUM-ELEM, 1, 100, 1) "&amp;nbsp; VAL-TRX (NUM-ELEM, 1, 100, 1) CONVERSION.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DISPLAY " VAL-TRX (NUM-ELEM, 1, 1, 10) VAL-TRX (NUM-ELEM, 1, 1, 10) CONVERSION " " " VAL-TRX (NUM-ELEM, 1, 100, 10) " VAL-TRX (NUM-ELEM, 1, 100, 10) CONVERSION.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; display "END OK my_program&amp;nbsp;&amp;nbsp; ".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; stop run.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Questions: My I use some parameters for LINKING?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards and thank you,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Enviroment : itanium machine&lt;/P&gt;&lt;P&gt;HP COBOL V2.9-1453&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; OpenVMS IS 64 OS v8.3-1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 04 May 2012 21:22:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/error-ilink-e-imexp0-linking-cobol-program-w-multimensional/m-p/5647197#M36830</guid>
      <dc:creator>idiazr</dc:creator>
      <dc:date>2012-05-04T21:22:10Z</dc:date>
    </item>
    <item>
      <title>Re: Error %ILINK-E-IMEXP0 - Linking Cobol Program w/ Multimensional Tables -</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/error-ilink-e-imexp0-linking-cobol-program-w-multimensional/m-p/5647209#M36831</link>
      <description>&lt;P&gt;That's possibly an oddity with the environment, but it looks rather more like the code and the data structures are too big to fit into the available address space. &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;COBOL doesn't particularly implement 64-bit addressing on OpenVMS Alpha or on OpenVMS I64, and your code doesn't appear to fit into the available one-gigabyte P0-space virtual address space, and the available one gigabyte P1-space stack space. &amp;nbsp;You're either going to need to make those arrays smaller (and potentially implement some form of data paging, if you need that much data), page the stuff in and out with a COMMON or a section or analogous, or move this application to a language that does provide 64-bit addressing and move your data into 64-bit (P2-space) address space, or move to a platform that offers 64-bit COBOL.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;--&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;COBOL does have some baseline 64-bit pointer support, but not enough to get anywhere.&lt;/P&gt;</description>
      <pubDate>Fri, 04 May 2012 21:47:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/error-ilink-e-imexp0-linking-cobol-program-w-multimensional/m-p/5647209#M36831</guid>
      <dc:creator>Hoff</dc:creator>
      <dc:date>2012-05-04T21:47:04Z</dc:date>
    </item>
    <item>
      <title>Re: Error %ILINK-E-IMEXP0 - Linking Cobol Program w/ Multimensional Tables -</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/error-ilink-e-imexp0-linking-cobol-program-w-multimensional/m-p/5647467#M36832</link>
      <description>&lt;DIV&gt;As said in another thread, the linker simply reports that after collecting all the modules and their sections, the generated image does not fit into the P0 address space.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;It seems you just have a single source and object module. Analyze/object should show you the sizes of the ELF sections. From that you can estimate how much VA space is required.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;No, this has nothing to do with stack and other program data in P1. The I64 linker does not determine the stack space. Also the l64 linker can not check whether the stack or the I/O space fits into P1.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;You need to move some (code or) data out of P0. Code (and unwind data) is usually not that big, data is the problem. It depends on the compiler whether you can move code (and unwind data always follows code) and/or data into P2. See the compiler manual and the linker qualifier /segment.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;There is a small chance that the missing VA space is only a couple of pages. Tweaking the linker options and qualifiers may give you just that. Have a look at the /segment qualifier, try to use a smaller /bpage value, try to use a single cluster, try to minimize the number of image segments.&lt;/DIV&gt;</description>
      <pubDate>Sat, 05 May 2012 14:42:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/error-ilink-e-imexp0-linking-cobol-program-w-multimensional/m-p/5647467#M36832</guid>
      <dc:creator>H.Becker</dc:creator>
      <dc:date>2012-05-05T14:42:36Z</dc:date>
    </item>
    <item>
      <title>Re: Error %ILINK-E-IMEXP0 - Linking Cobol Program w/ Multimensional Tables -</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/error-ilink-e-imexp0-linking-cobol-program-w-multimensional/m-p/5647485#M36833</link>
      <description>&lt;P&gt;[snide remark removed.]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;'Normal' VMS Programs, in the 32-bit VAX, but also on the 64-bit Alpha and Itanium, have only 1 GB of normal process space for code, data and stack. 1/4 of the 4GB limit imposed by the old 32-bit implementation.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The program requests 2 arrays of&amp;nbsp;10000*16*100*10 =&amp;nbsp;160,000,000 element.&lt;/P&gt;&lt;P&gt;So even at 3 bytes each, you'd be out of 1GB space right there.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is that 10,000 just a nice big number or a hard requirement?&lt;/P&gt;&lt;P&gt;If just for testing you change that to 1,000 you will see:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Level   Name          Size        Bytes       Usage  
-----   ---------- ----------   ----------   --------
  25    CASES               9            5   COMP-3  
  05    LOCAL2         80,000       80,000   DISPLAY 
  05    LOCAL3        128,000      128,000   DISPLAY 
  77    NUM-ELEM            5            5   DISPLAY 
  01    TABLE2     80,000,000   80,000,000   DISPLAY 
  01    TABLE3    128,000,000  128,000,000   DISPLAY 
  25    VAL-TRX            15            8   COMP-3  &lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So that would fit.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope you also recognize how NUM-ELEM wil be a piece of string, to be converted to long a billion times over ( using&amp;nbsp;OTS$CVT_DEC8_1_TO_UINT64).&lt;/P&gt;&lt;P&gt;For yucks and education, compile with /MACHINE/LIST and look at the expansion of the line with &lt;SPAN&gt;VAL-TRX (NUM-ELEM, J,&amp;nbsp;&amp;nbsp; C,&amp;nbsp; K)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Now change NUM-ELEM to the the PIC 9(9) COMP that it supposed to be and compare the code expansion.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Anyway... this program needs to be changed and CObol is not going to be the best language to do the job.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;If the array will stay the size it is declared today, then it can only live in P2 space.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;You may want to process it once 'num-elem' at a time, either with double mapping otherwise calling to a subroutine pointing to one element at a time.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Best of luck!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Hein&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 05 May 2012 16:36:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/error-ilink-e-imexp0-linking-cobol-program-w-multimensional/m-p/5647485#M36833</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2012-05-05T16:36:21Z</dc:date>
    </item>
    <item>
      <title>Re: Error %ILINK-E-IMEXP0 - Linking Cobol Program w/ Multimensional Tables -</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/error-ilink-e-imexp0-linking-cobol-program-w-multimensional/m-p/5647509#M36834</link>
      <description>&lt;P&gt;Um, Hein? &amp;nbsp;I'd expect that the OP was probably expecting that a computing system that is theoretically capable of addressing sixteen exabytes of virtual memory would be able handle a few gigabyte-sized arrays. &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Certainly without resorting to RSX-11M/M+ TKB-style shenanigans, and without re-coding the application memory management implementation.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;That COBOL and VMS would do the correct thing here. &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(If I didn't know the details of the environment and the implementation, I would too.)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Particularly given how (most, modern, typical) 64-bit environments usually implement exactly this flat model.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And clearly the OP found the segmented address space confusing, and the error messages cryptic. &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'd presume this question to be as much a bug report as a question, too. &amp;nbsp;And unfortunately, VMS is locked into this (bad, confusing, poor, segmented) design. &amp;nbsp;And COBOL, too, unfortunately lacks 64-bit.&lt;/P&gt;</description>
      <pubDate>Sat, 05 May 2012 16:16:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/error-ilink-e-imexp0-linking-cobol-program-w-multimensional/m-p/5647509#M36834</guid>
      <dc:creator>Hoff</dc:creator>
      <dc:date>2012-05-05T16:16:35Z</dc:date>
    </item>
    <item>
      <title>Re: Error %ILINK-E-IMEXP0 - Linking Cobol Program w/ Multimensional Tables -</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/error-ilink-e-imexp0-linking-cobol-program-w-multimensional/m-p/5648151#M36835</link>
      <description>&lt;P&gt;&amp;gt; 32-bit VAX, but also on the 64-bit Alpha and Itanium, have only 1 GB of normal&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;nbsp;process space for code, data and stack. 1/4 of the 4GB limit imposed by the old 32-bit implementation.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Not often I catch an error in one of Hein's posts... Small correction. Processes have 1GB for user code and data (P0 space). The stack lives in a separate 1GB region, also used&amp;nbsp;for some system code and data (P1 space).&amp;nbsp;There are vast tracts of 64 bit virtual address space available (P2 space), but you have to work to exploit it. Some languages make it easier than others, unfortunately for you, COBOL is NOT one of them.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Back in 1991 or so when Alpha was introduced, the "stretched" 32 bit&amp;nbsp;VA was a&amp;nbsp;very clever&amp;nbsp;way to introduce some 64 bit capability&amp;nbsp;while maintaining compatibility with 32 bit programs. 20 years later one would have hoped that stepshad been taken to move VMS from a 32 bit operating system with some 64 bit stuff tacked on the side, to be more like a real 64 bit operating system. Unfortunately that hasn't happened, and is unlikely in the future.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you need to maintain your COBOL logic, you could abstract the data structures into an external module written in&amp;nbsp; a more 64 bit friendly language. Take your pick, Fortran, C, whatever you have compiler for etc... A fairly simple model would be to implement each table as a pair of routines, a function to read a value:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Value= GET_TABLE_VALUE(dim1,dim2,dim3,...) of TABLE type&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and a function to write a value (optionally returning the old value):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;OldValue = PUT_TABLE_VALUE(NewValue,dim1,dim2,dim3,...) of&amp;nbsp;TABLE type&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Routines are fairly trivial, appropriate 64bit&amp;nbsp;structure definitions, and&amp;nbsp;references set or return the value. You&amp;nbsp;COBOL code doesn't change much, just replace references to the structure with calls to the routines.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ugly, but unfortunately necessary.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 06 May 2012 22:05:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/error-ilink-e-imexp0-linking-cobol-program-w-multimensional/m-p/5648151#M36835</guid>
      <dc:creator>John Gillings</dc:creator>
      <dc:date>2012-05-06T22:05:10Z</dc:date>
    </item>
    <item>
      <title>Re: Error %ILINK-E-IMEXP0 - Linking Cobol Program w/ Multimensional Tables -</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/error-ilink-e-imexp0-linking-cobol-program-w-multimensional/m-p/5648541#M36836</link>
      <description>&lt;DIV&gt;The VMS programming model is something like "ILP32/LLLP64", which means you&amp;nbsp;need a long long data type to get 64-bit integers and a long pointer type to&amp;nbsp;get 64-bit pointers. By default the VMS compilers are in the P32 mode: pointers are 32 bits. With the&amp;nbsp;known segmentation of the (32-bit) virtual address space into regions P0, P1&amp;nbsp;and S0/S1 VMS additionally limits the available address space for a user&amp;nbsp;program and its static data to P0. To use more than what fits into the P0&amp;nbsp;address space region, the programmer needs to set the compiler into a 64-bit&amp;nbsp;pointer mode. The compiler should then set the ALLOC_64BIT PSECT attribute&amp;nbsp;so that the linker can assign P2 virtual addresses to these&amp;nbsp;sections. On Alpha this is supported by FORTRAN and only data can be moved&amp;nbsp;to P2. On I64 there are more compilers that have a 64-bit mode and code and data can be moved to P2.&amp;nbsp;You have to change the programming language/compiler or your design if your compiler doesn't have a 64-bit mode. On I64&amp;nbsp;the linker can help, if the compiler has the 64-bit mode but doesn't set the&amp;nbsp;ALLOC_64BIT PSECT attribute.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Another more popular, but maybe less modern 64-bit environment with an LLP64&amp;nbsp;programming model shows a bigger but somehow similar limit&amp;nbsp;(&lt;A target="_blank" href="http://software.intel.com/en-us/articles/memory-limits-applications-windows/,"&gt;http://software.intel.com/en-us/articles/memory-limits-applications-windows/,&lt;/A&gt;&amp;nbsp;or just google LNK1248). There the limit is in the executable file format. As said above,&amp;nbsp;VMS executables allow bigger static data, but require compiler support.&lt;/DIV&gt;</description>
      <pubDate>Mon, 07 May 2012 06:41:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/error-ilink-e-imexp0-linking-cobol-program-w-multimensional/m-p/5648541#M36836</guid>
      <dc:creator>H.Becker</dc:creator>
      <dc:date>2012-05-07T06:41:25Z</dc:date>
    </item>
    <item>
      <title>Re: Error %ILINK-E-IMEXP0 - Linking Cobol Program w/ Multimensional Tables -</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/error-ilink-e-imexp0-linking-cobol-program-w-multimensional/m-p/5649439#M36837</link>
      <description>&lt;P&gt;Thank you for all smart people,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I change first occurs (10000 for 1000)&amp;nbsp;, the program linked ok, I'll check if&amp;nbsp;I need 10000 occurs and change the solution not the language,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks again,&lt;/P&gt;</description>
      <pubDate>Mon, 07 May 2012 14:18:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/error-ilink-e-imexp0-linking-cobol-program-w-multimensional/m-p/5649439#M36837</guid>
      <dc:creator>idiazr</dc:creator>
      <dc:date>2012-05-07T14:18:42Z</dc:date>
    </item>
    <item>
      <title>Re: Error %ILINK-E-IMEXP0 - Linking Cobol Program w/ Multimensional Tables -</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/error-ilink-e-imexp0-linking-cobol-program-w-multimensional/m-p/5654849#M36838</link>
      <description>&lt;P&gt;I received this answer from HP.com support (&amp;nbsp;&lt;A target="_blank" href="http://www.openvms.compaq.com/commercial/cobol/"&gt;http://www.openvms.compaq.com/commercial/cobol/&lt;/A&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;"We see this error message when linker does a check if short data fits in P0 space and it exceeds P0 address space(1GB limit).&lt;/P&gt;&lt;P&gt;It is because of generated image, especially &amp;lt;text&amp;gt;, exceeds P0 address space.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We would like to know how big is your Cobol application.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you check using qualifier "/SEGMENT_ATTRIBUTE=SHORT_DATA=WRITE" with the linker?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Notes from Linker Manual,&lt;/P&gt;&lt;P&gt;With the /SEGMENT_ATTRIBUTE qualifier you can change some attributes for a class of sections (SHORT_DATA, CODE, and SYMBOL_VECTOR).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The /SEGMENT_ATTRIBUTE=SHORT_DATA=WRITE command qualifier allows you to combine the read-only and the read-write short data segments into a single segment, reclaiming up to 65,535 bytes of unused, read-only space (default value for /BPAGE).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This qualifier is recommended only if your short data segment has reached the limit of 4 MB.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Vidya&amp;nbsp; "&lt;/P&gt;</description>
      <pubDate>Fri, 11 May 2012 13:37:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/error-ilink-e-imexp0-linking-cobol-program-w-multimensional/m-p/5654849#M36838</guid>
      <dc:creator>idiazr</dc:creator>
      <dc:date>2012-05-11T13:37:36Z</dc:date>
    </item>
    <item>
      <title>Re: Error %ILINK-E-IMEXP0 - Linking Cobol Program w/ Multimensional Tables -</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/error-ilink-e-imexp0-linking-cobol-program-w-multimensional/m-p/5654939#M36839</link>
      <description>&lt;DIV&gt;&lt;EM&gt;&amp;gt;&amp;gt;&amp;gt; It is because of generated image, especially &amp;lt;text&amp;gt;, exceeds P0 address space.&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Please don't misinterpret "&amp;lt;text&amp;gt;", it is not ".text". The linker reports this problem when adding the short data segments to the VA space of the image. As far as I remember, there are no other earlier checks, whether some code or data segments exceed the P0 limit. As said before, code (and this is sometimes referred to as ".text") is usually not the problem.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;&amp;gt;&amp;gt;&amp;gt; We would like to know how big is your Cobol application.&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I already recommended to use analyze/object to look at the size of the ELF sections. That's exactly what the linker will collect into your image.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;&amp;gt;&amp;gt;&amp;gt; This qualifier is recommended only if your short data segment has reached the limit of 4 MB.&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;That's not the case, here. SDATAEXC is the message when the short data segments exceed 4MB. So it's not recommended, here, but you can try it. It falls into the category &amp;nbsp;of minimizing the &amp;nbsp;number of image segments.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Again, you may be lucky with some linker options and qualifiers. But before trying this, I would determine the required VA space from the object module and its ELF sections. The sum needs to be below 1GB and then there needs to be enough room for the (linker generated) short data, max. 4MB plus some foot room and segment padding depending on the BPAGE size.&amp;nbsp;&lt;/DIV&gt;</description>
      <pubDate>Fri, 11 May 2012 15:06:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/error-ilink-e-imexp0-linking-cobol-program-w-multimensional/m-p/5654939#M36839</guid>
      <dc:creator>H.Becker</dc:creator>
      <dc:date>2012-05-11T15:06:09Z</dc:date>
    </item>
  </channel>
</rss>

