Controls the way in which the Compiler generates code for data items that include the PROPERTY phrase, and which either include
the OCCURS phrase or are subsidiary to a group item with the OCCURS clause.
Restriction: This directive is supported for
JVM COBOL only.
Syntax:
>>----ILARRAYPROPERTY(integer)-----------><
Parameters:
- integer
-
- 0
-
The property is generated with a type determined by that of the data element. The property will have a number of parameters
equal to the dimensionality of the data item. You can only access these properties using COBOL. Other languages such as C#
and Visual Basic will not permit access to such properties with parameters. Use this setting to produce the code generated
by earlier versions of this product.
- 1
- 01 level arrays of native managed types will be generated as simple properties whose type is that of the array type (not the
element type). You can access these properties using other languages. Other data items with OCCURS, or subsidiary to OCCURS,
will be generated as for ILARRAYPROPERTY(0).
- 2
- As ILARRAYPROPERTY(1), except that non-native array properties will cause the GET and SET accessors to be generated for the
property, but not the property itself. This enables Visual Basic programs to access the property (via the accessor methods).
Properties:
Default:
|
ILARRAYPROPERTY(1)
|
Example:
Consider the following data structures:
data division.
working-storage section.
01 n1 string OCCURS 10 PROPERTY.
01 group1.
03 n2 PIC X(9) OCCURS 10 PROPERTY.
- With ILARRAYPROPERTY(0), n1 and n2 are both exposed as properties of type string, with an int parameter to indicate the occurrence
required.
- With ILARRAYPROPERTY(1), n2 is exposed, as above, but n1 is exposed as a property of type string[ ] (in C# notation).
- With ILARRAYPROPERTY(2), n1 is exposed, as for ILARRAYPROPERTY(1), but for n2, the Compiler will generate accessor methods
get_n2(int) (returning string) and set_n2(string, int), but no actual property.