Skip to Main Content
Status Under Review
Categories Natural (NAT)
Created by Detlef Ziermann
Created on Oct 23, 2023

Expand X-Arrays by variable

We would like to be able to expand tables (X-ARRAYS) via a statement: EXPAND ARRAY <#X-ARRAY-VAR> BY <#VAR-INT>

  • Admin
    Eli Cohen
    Reply
    |
    Dec 12, 2023

    Hello Detlef,


    I wish to understand exactly your request.


    Currently to achieve extending an array, you would need:

    DEFINE DATA LOCAL

    01 #VAR (I4) INIT <1>

    END-DEFINE


    Current

    #VAR := *OCC(#A) + 1

    EXPAND ARRAY #A TO (1:#VAR)


    and you wish to have only this statement:

    EXPAND ARRAY #A BY (1:#VAR)


    Does our assumption correct?

    1 reply