I guess it depends on what you want to do with the data you put in the array.
If you want to search the array for a specific value (like a SEARCH in COBOL), then there's no need for an array.... EZT handles that by TABLE files. Unfortunately the array needs to be sorted by its key and no duplicates are allowed (like in a SEARCH ALL). However even in this case you've gotta give EZT an approximate amount of how many entries the table will contain.
If it's something else, then you have no choice but to shoot for the moon when coding occurences and hope for the best (and remember that you've only got so much memory avaiable.....).
If it's a SEARCH you're looking for, here's an example: let's say you need to decode ISO country. So US--> United States of America, FR --> France and so on. Let's also assume you've got this information in a sequential file, but not in the right order
FILE ISOCODES
ISO 1 3 A
COUNTRY * 80 A
*
FILE DECODE TABLE 500 VIRTUAL F(83)
ARG 1 3 A
DESC 4 80 A
*
FILE OTHERFIL
ISO-COUNTRY 55 3 A
*
* PLEASE NOTE: WHEN USING TABLE FILES
* FIELDS MUST BE ARG AND DESC
*
WS-COUNTRY W 80 A
*
SORT ISOCODES TO DECODE USING ISO
*
JOB INPUT OTHERFIL
* .... WHATEVER LOGIC YOU NEED
SEARCH DECODE WITH ISO-COUNTRY GIVING WS-COUNTRY
IF NOT DECODE
DISPLAY 'UNKNOWN ISO CODE ' ISO-COUNTRY
END-IF
*....
"500" is a rough estimate of how many entries I'm going to load into the table; if I'll load less than 500 no problem; if I'll load 600, again no problem. I don't remember if there's a well defined tolerance, but I do remember that as the table gets bigger (in absolute size, not in # of elements) the tolerance gets smaller.
Another constrain for TABLEs is that you can only use ARG and DESC as fields; so if the key is composed of more than one field, you may need to build a WS variable to search. Same applies for what is returned from the search (DESC).
In case you don't want to use a VIRTUAL file, you need to allocate an adequate file in your JCL.
Edit:
I've just re-read your post.... there's one thing you need to understand: you coded
DEFINE W-DATA W 80 A OCCURS COUNT
Although EZT may look like it's interpreted (like the BASIC of old times), it is NOT. It doesn't matter where you code a variable: wherever it is, it will be as if it's coded at the top of your program. Therefore coding it right after COUNT has a meaningful value is irrelevant. Let alone that is not allowed!