Begin changeThe RFML data tag

The data tag can have the following attributes. Attributes enclosed in brackets, [], indicate that the attribute is optional. If you specify an optional attribute, do not include the brackets in your source. Some attribute values are shown as a list of choices enclosed in braces, {}, with possible choices separated by vertical bars, |. When you specify one of these attributes, do not include the braces in your source and only specify one of the choices shown.

<data type="{ char | int | packed | zoned | float | byte | struct }" ]
    [ bidistringtype="{ ST4 | ST5 | ST6 | ST7 | ST8 | ST9 | ST10 | ST11 | DEFAULT }"]
    [ ccsid="{ number | data-name }" ]
    [ count="{ number | data-name }" ]
    [ init="string" ]
    [ length="{ number | data-name }" ]
    [ name="name" ]
    [ precision="number" ]
    [ struct="struct-name" ]>
</data>

The following table lists the data tag attributes. Each entry includes the attribute name, the possible valid values, and a description of the attribute.

Attribute Value Description
type=

char
A character value. A char data value is returned as a java.lang.String. For more information, see the char values for length.

int
An integer value. An int data value is returned as a java.lang.Long. For more information, see the int values for length and precision.

packed
A packed decimal value. A packed data value is returned as a java.math.BigDecimal. For more information, see the packed values for length and precision.

zoned
A zoned decimal value. A zoned data value is returned as a java.math.BigDecimal. For more information, see the zoned values for length and precision.

float
A floating point value. The length attribute specifies the number of bytes: either 4 or 8. A 4-byte integer is returned as a java.lang.Float. An 8-byte integer is returned as a java.lang.Double. For more information, see the float values for length.

byte
A byte value. No conversion is performed on the data. A byte data value is returned as an array of byte values (byte[]). For more information, see the byte values for length.

struct
The name of the <struct> element. A struct allows you to define a structure once and reuse it multiple times within the document. When you use type="struct", it is as if the structure specified appears at this location in the document. A struct does not allow for a length value and has no value for precision.

Indicates the type of data being used (character, integer, packed, zoned, floating point, byte, or struct).

Values for the length and precision attributes are different for different data types. For more information, see the Values for length and precision.

bidistringtype=

DEFAULT
where DEFAULT is the default string type for non-bidirectional data (LTR).

ST4
where ST4 is String Type 4.

ST5
where ST5 is String Type 5.

ST6
where ST6 is String Type 6.

ST7
where ST7 is String Type 7.

ST8
where ST8 is String Type 8.

ST9
where ST9 is String Type 9.

ST10
where ST10 is String Type 10.

ST11
where ST11 is String Type 11.

Specifies the bidirectional string type for <data> elements with type="char". If this attribute is omitted, string type for this element is implied by the CCSID (whether explicitly specified or the default CCSID of the host environment).

String types are defined in the javadoc for the BidiStringType class.

ccsid= number
where number defines a fixed, never-changing CCSID.

data-name
where data-name defines the name that will contain, at runtime, the CCSID of the character data. The data-name specified can be a fully qualified name or a name that is relative to the current element. In either case, the name must reference a <data> element that is defined with type="int". See Resolving Relative Names for more information on how relative names are resolved.

Specifies the host coded character set identifier (CCSID) for character data for the <data> element. The ccsid attribute can be specified only for <data> elements with type="char".

If this attribute is omitted, character data for this element is assumed to be in the default CCSID of the host environment.

count= number
where number defines a fixed, never-changing number of elements in a sized array.

data-name
where data-name defines the name of a <data> element within the RFML document that will contain, at runtime, the number of elements in the array. The data-name specified can be a fully qualified name or a name that is relative to the current element. In either case, the name must reference a <data> element that is defined with type="int". See Resolving Relative Names for more information on how relative names are resolved.

Specifies that the element is an array and identifies the number of entries in the array.

If the count attribute is omitted, the element is not defined as an array, although it may be contained within another element that is defined as an array.

init=

string Specifies an initial value for the <data> element.

The initial value specified is used to initialize scalar values. If the element is defined as an array or is contained within a structure defined as an array, the initial value specified is used as an initial value for all entries in the array.

length= number
where number defines a fixed, never-changing length.

data-name
where data-name defines the name of a <data> element within the RFML document that will contain, at runtime, the length. A data-name can be specified only for <data> elements with type="char" or type="byte". The data-name specified can be a fully qualified name or a name that is relative to the current element. In either case, the name must reference a <data> element that is defined with type="int". See Resolving Relative Names for more information on how relative names are resolved.

Specifies the length of the data element. Usage of this attribute varies depending on the data type. For more information, see the Values for length and precision.
name= name Specifies the name of the <data> element.
precision= number Specifies the number of bytes of precision for some numeric data types. For more information, see the Values for length and precision.
struct= name Specifies the name of a <struct> element for the <data> element. A struct attribute can be specified only for <data> elements with type="struct".
End change