Data

This method gets data from a Mobile Channels data file and returns an array of name and value pairs based on the current location and the specified block number. The names are the field names as specified in an ITEMFORMAT statement and the values are the data items, or lines, as retrieved from the data file. The maximum length of a value field is 1,024 characters.

Syntax

MC.Data(elementID, blockNum)

Remarks

The following code example shows that dataItems is an array to hold the data items, elementID is the current location within the CDF file — for example, the ID item for the Mobile Channels Data file (.mcd) — and blockNum is the block number within the file.

dataItems = MC.Data(elementID, blockNum)

Because blocks start with zero, the first repeating block is always block number one, even if there is no header. The resulting array, dataItems, contains an element for each item, or line, within the block. The items in a block are counted  from zero.

Each data item is, in effect, an object that supports the Tag, Type, and Value methods to expose its own properties.