NAT1257- Error-Code not in the manual

Hi,

i have the following Information in my Outputfile
0980 NAT1257 Zugriff auf nicht materialisiertes X-Array-Feld verboten.

This is my code:


0980 MOVE SUBSTR(#INFOS,#POSITION,6) TO #ARRAY_VSN(#LAUF)

#INFOS (a696)
#ARRAY_VSN (A6/1:*)
#Lauf (I2)

What is my mistake?

I have my error.

Hi Jörg,
Apparently, you simply “forgot” to “materialize” (allocate) your
#ARRAY_VSN

Try to add this before your 0980 MOVE:

EXPAND ARRAY #ARRAY_VSN TO (1:#LAUF)

Best regards,
NK

Thank you. This was my error.

No problem, Jörg

It think it is quiet NATURAL that before using its “dynamic” X-array (with variable dimensions) one must allocate the memory for that array, and this is done by EXPAND statement.

This is more about this subject:
http://techcommunity.softwareag.com/ecosystem/documentation/natural/nat426mf/pg/pg_defi_ldvfus.htm#dynam_xarray_pg_defi_ldvfus