Skip to Main Content
Due to the recent acquisition by IBM, the Adabas & Natural Ideas Portal does not contain ideas from products ApplinX and EntireX any longer. Please refer to the IBM Ideas Portal for these products from now on (IBMid required). Existing content will be migrated during the next few weeks.
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