[Migrated content. Thread originally posted on 17 April 2008]
I am writing a program to read three indexed files and from them to create a three-dimensional array for later use in creating a screen to navigate along a "Category/sub-category/sub-category" path.The screen is dispayed with three boxes:
First box contains Category
Second contains Sub-category
Third box contains Sub-sub-category
Navigation:
On entering the primary screen one is presented with a screen with all three boxes populated.
So, when one selects an item from the category list, the listing of sub-categories is displayed, and likewise when an item from the sub-category list is selected, the sub-sub-category list is displayed. From the sub-sub-category any selection will pass control for other processing, with a return to the main screen on exiting from later screens.
Programming:
The Acucobol reference manual suggests it is possible to create a three dimensional table, in fact if one was sufficiently mentally agile one could have upto 15 dimensions - but three dimensions is all I need. Below is a definition of the table:
01 SAVE-SUB-HEADING-TABLE.
03 SHT-IX-SH-MAIN PIC S999 COMP-3.
03 SHT-IX-SH-SUBHED PIC S999 COMP-3.
03 SHT-IX-SH-SBSBHD PIC S999 COMP-3.
03 S-M-T2 OCCURS 20.
05 SAVE-MAIN-ID PIC S9(05) COMP-3.
05 S-S-T2 OCCURS 150.
07 SAVE-SHEAD-IDX PIC S9(05) COMP-3.
07 SAVE-SHEAD-NAME PIC X(20).
07 SAVE-SHEAD-NUM PIC S9(07) COMP-3.
07 SAVE-SHEAD-END PIC S9(07) COMP-3.
07 S-S-S-T OCCURS 100.
09 SAVE-SS-SHEAD-IDX PIC S9999 COMP-3.
09 SAVE-SS-SHEAD-NAME PIC X(20).
09 SAVE-SS-SHEAD-NUM PIC S9(07) COMP-3.
09 SAVE-SS-SHEAD-END PIC S9(07) COMP-3.
When I compile the program, I get the following error message:
"Data item > 64K illegal here"
The manual suggests I ought to be using a 64-bit option, but the compiler sets the relevant compiler option as a default.
I have tried reducing the number of OCCURS, removing the NAME fields so that I am only left with numerics, and finally storing all the numeric fields as COMP-3 fields. Still the message relating to 64K illegality.
Short of buying a whole stack of new PCs withj 64-bit processors, is there anyhing I can do that would enable me to create a three-dimension table?
I am currently trying to create a three-dimension philosophy using two two-dimension tables, but the index pointers are currently not calculating correctly.
Thanks
Geoffrey



