I think the LE compliant Assembler wrapper is way over-the-top for this.
LE compliant Assembler is *vital* of course when *it* calls an LE-compliant
subroutine, but when Assembler is the callee and the code is *very* short
and simple, the overhead really serves no purpose.
I'd also make your assembler code a prefix to the table itself rather than
a separate module. You describe the table as "... assembler" so you can
easily add a tiny bit of code to the table itself which can then tell COBOL
everything it needs to know -> table address, length, number of rows,
length of each row, etc, whatever you like. All that information can
easily be determined at assembly time and returned to COBOL, thus not
obliging the caller to figure them out (and possibly getting them wrong!).
Now, instead of calling something else to load the table, you just call the
table itself, dynamically, which then both loads it *and* tells you
everything you need to know about it.
To accomplish what your example describes, you just need the table address
and number of rows. So, assuming those criteria, I offer the the following
simplified example which does exactly the same thing:
IDENTIFICATION DIVISION.
PROGRAM-ID. SIZETST.
DATA DIVISION.
WORKING-STORAGE SECTION.
01 TABLE-DATA.
05 TABLE-ADDRESS POINTER.
05 ROWCNT PIC S9(9) COMP.
05 XML1V2K PIC X(8) VALUE 'XML1V2K'.
LINKAGE SECTION.
01 MYTAB.
05 MYROW PIC X(80)
OCCURS 1 DEPENDING ON ROWCNT INDEXED BY ROWNBR.
PROCEDURE DIVISION.
CALL XML1V2K USING TABLE-DATA
SET ADDRESS OF MYTAB TO TABLE-ADDRESS
PERFORM VARYING ROWNBR FROM 1 BY 1 UNTIL ROWNBR > ROWCNT
DISPLAY MYROW(ROWNBR)
END-PERFORM
GOBACK.
Here is a sample table of nine 80-byte rows, with that "tiny bit" of
assembler code at the end which gives COBOL needs.
XML1V2K CSECT
XML1V2K RMODE ANY
ROW1 EQU *
DC CL80'ROW1'
ROW2 EQU *
DC CL80'ROW2'
DC CL80'ROW3'
DC CL80'ROW4'
DC CL80'ROW5'
DC CL80'ROW6'
DC CL80'ROW7'
DC CL80'ROW8'
DC CL80'ROW9'
END EQU *
TSIZ EQU END-ROW1
RSIZ EQU ROW2-ROW1
INIT CSECT
INIT RMODE ANY
USING INIT,15
L 1,0(,1) R1 -> AREA TO RECEIVE TABLE ADDRESS, NBR OF ROWS
LM 15,0,TBL@ R15 = TABLE ADDRESS, R0 = NBR OF ROWS
STM 15,0,0(1) STORE IN CALLERS RECEIVE AREA
SR 15,15 SET R15 = 0
BR 14 RETURN
TBL@ DC A(ROW1) ADDRESS OF FIRST ROW (I.E. TABLE ADDRESS)
ROWS DC A(TSIZ/RSIZ) NBR OF ROWS = TABLE SIZE MINUS ROW SIZE
END INIT
Note that the END INIT statement sets the entry point to INIT, the
assembler suffix code, but the load point (start of table) remains the
same.