The scalar and compound data types may be combined into arrays as follows:
Description |
Example |
Fixed arrays of scalars |
MAP1 SALES(25),F,6 |
Fixed compound arrays |
MAP1 CUST(10) |
Dynamic arrays of scalars |
ECOUNT = 1000 |
Dynamic arrays of structures |
dimx CUSRECS(50),ST_CUST ! array of 50 ST_CUST
structures ? CUSRECS(25).CUSNO ! element.member notation |
Dynamic auto-extended arrays; may be either scalar or structure types |
dimx
CUSRECS(0),ST_CUST,auto_extend |
dimx $CAPITALS,
ordmap(varstr;varstr) ! map of
strings | |
dimx $STATES,
ordmap(varstr;varx) ! map of
blobs/structures Map1 STATE,ST_STATE ... $STATES(“California”) = STATE ! load structure into map ... STATE = $STATES(“California”) ! retrieve structure from map by key ? STATE.POPULATE, STATE.CAPITAL, … ! access members | |
dimx $JSONDOC,
mlist(varstr) ! JSON doc stored as multi-level
list |