Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

7.20 DEF_ARRAY

Note

Note:   Usage options

The DEF_ARRAY command is used to define an array structure within an RDML function.

The array created by this command can be used for:

...

  1. Grouping up to

...

  1. 100 individual identical fields into contiguous storage, thus allowing "indexed" references to be made to any one of the fields. To do this, use the OF_FIELDS parameter. This is the only option supported for RDMLX fields. Note that if an object is not enabled for RDMLX it is limited to 100 fields.

...

  1. Overlaying a large field with an array structure, thus allowing "indexed" references to individual areas within the larger field. To do this, use the OVERLAYING parameter. This option is not supported when using an RDMLX field.

This command provides full array support to LANSA applications.

However, it must be emphasized that the use of array constructs in database files is NOT considered to be the best long-term strategy in terms of relational database design.

...

Whenever hardware resources permit, a fully relational design will always yield a simpler, easier-to-use, easier-to-maintain, and longer-lasting solution.

Also See

7.20.1 DEF_ARRAY Parameters

7.20.2 DEF_ARRAY Comments / Warnings

7.20.3 DEF_ARRAY Examples


Panel
bgColor#ffffcc

                                                                                           Required

  DEF_ARRAY 

No Format
                                                        Required   DEF_ARRAY

----

NAME

 NAME ---------

#name of array

 #name of array ----------------->

             >

                    >--

INDEXES

-------

#index

field

name

--------------->

                             |                    |                               


                                                |                                     |
                                                 -------

50

max

---------

             >

                  >--

OF_FIELDS

-------

#field

name

--------------------->

                             |  expandable group expression    |                               


                                                   |  expandable group expression    |
                                                    ----------

100

max

--------------

                   

 

                         --

OR

--

             >

                 >--

OVERLAYING

---

#field

name

--

start

position

------>

 ------------------------------------------------------------------

                                                         Optional              >-- TYPE

-----
                                                                                            Optional

                 >-- TYPE ---------

*CHAR

*DEC

*PACKED

*SIGNED

----->

             >

                 >--

TOT_ENTRY

-

---

total

entries

(1-9999)

-------------->

             >

                 >--

ENTRY_LEN

-

---

entry

length

(1-256)

--------------->

             >

                >--

ENTRY_DEC

---

-

number

of

decimals

(0-9)

-----------|