Thank you all for replying! I appreciate the help!
Woecki, I modified my code to define it as you suggested:
DCL 01 NITE_ARRAY (1500000) CONTROLLED,
++INCLUDE DSDNITE; /* 800 bytes long*/
ALLOCATE NITE_ARRAY; /* DYNAMICALLY ALLOCATE SPACE FOR THE ARRAY */
FREE NITE_ARRAY; /* FREE THE ARRAY SPACE AFTER USE */
The program compiled fine the way I had it with a size of 1,250,000, but not at 1,500,000.
With the changes you suggested, I can now get it to compile with a size of 1,500,000. However, when I run the job, it abends on the statement that initializes the array, regardless of whether this initialize statement is performed in the root module or the called module that loads the array with records from a file:
NITE_ARRAY (*) = '';
The Error message that is logged is:
THE SYSTEM COMPLETION CODE OF 0C4 IS ISSUED WHEN THE PROGRAM ATTEMPTS TO
USE STORAGE THAT IS NOT ACCESSIBLE.
Brataj, I agree, it is a large amount of space I am requesting. The business keeps adding more and more invoices to this system, and it was not designed to accomodate this many records. If there is a way around this issue by doing some special type of allocating, and being able to avoid an extensive redesign, that would be nice!
Robin400, Yes I do have one other array defined in the same program, but it is much, much smaller: (2000 records at 166 bytes each).
NJAH