Range of Occurrences

Fields in DP4 can have up to 99 occurrences. The use of occurrences allows lines of data and lists of numbers to be treated as a single field. For example, for an address field, you may allow four lines for an address:

13 Cherry Lane
Wheathampstead
Hertfordshire
AL10 6BP

The address field is defined as a multi-occurs field with four occurrences.

Numeric multi-occurs fields can be thought of as an array or list of numbers. If you wish to store 12 values representing the budget for each month of a year, you define a field BUDGET with 12 occurrences. To reference the budget for March, the programmer writes:

BUDGET[3]