Q:

Create a TABLE in Cobol from a data structure?

I need to make a table out of the data structure below because I am not certain how many records that are each one line long will be in my input file. If I can make a table then I will be able to loop through them at a later time which is what I need to be able to do.
**Question: How to make a table out of the data structure before?
       Part B: An array in Cobol is an OCCURS 100 TIMES
01 PRECORD.                             
    05 JE.                              
       10 NE          PIC X(6)  VALUE SPACES.
       10 NM          PIC X(2)  VALUE SPACES.
    05 FILL1          PIC X(16) VALUE SPACES.
    05 TM             PIC X(7)  VALUE SPACES.
    05 FILL2          PIC X(6)  VALUE SPACES.
    05 TT             PIC X(7)  VALUE SPACES.
    05 FILL3          PIC X(13) VALUE SPACES.
    05 TTY            PIC X(10) VALUE SPACES.
    05 FILL4          PIC X(13) VALUE SPACES.

01 PRECORD. 
  02 table-counter  <-- this is used to hold the number of records                            
  02 tTable occurs 300 times. <-- creates a table with three hundred occurences
    05 JE.                              
       10 NE          PIC X(6)  VALUE SPACES.
       10 NM          PIC X(2)  VALUE SPACES.
    05 FILL1          PIC X(16) VALUE SPACES.
    05 TM             PIC X(7)  VALUE SPACES.
    05 FILL2          PIC X(6)  VALUE SPACES.
    05 TT             PIC X(7)  VALUE SPACES.
    05 FILL3          PIC X(13) VALUE SPACES.
    05 TTY            PIC X(10) VALUE SPACES.
    05 FILL4          PIC X(13) VALUE SPACES.

The code above is update with how I think that table should look. The table has to have a counter at the top and then under than it will have to have a occur and how many times the table should occur.
The question that I was asking was how do you make a table like above actually a table I did not know that you had to create an Occurs and then put everything below that level of the occurs.
  01 mytable.
     02 counter...
     02 tablevar occures 200 times.
        05 var...
        05 var2..

I just was not sure of the structure of a Cobol table. My question is what was the format of a Cobol data structure?

A:

Personally, I'd declare table-counter as a 77-level with a PIC 9(03). And you really should remove the VALUE clauses. Of course, this would need to be a WORKING-STORAGE entry, not an FD since the table isn't on the file. Other than that, what you've dome appears valid - but it's difficult to see what question you are asking. 

