Skip to content

DN

FUNCTION

DN is a data declaration statement for local data names in a script. DN is used to declare an alphanumeric, integer, or decimal data name and length.

SYNTAX

DN data-name-1 (numeric-value-a [* numeric-value-c])
[, data-name-1 ...]
DN data-name-2 (numeric-value-a.0 [* numeric-value-c])
[, data-name-2 ...]
DN data-name-3 (numeric-value-a.numeric-value-b
[* numeric-value-c]) [, data-name-3 ...]
data-name
an alphanumeric name used as a local data name.
numeric-value-a
a positive integer that specifies the length of the data.
numeric-value-b
a positive integer that specifies the number of decimal places.
numeric-value-c
a positive integer that specifies the number of occurrences.

NOTES

  • DN must be used prior to any procedures in the script to define any non-dictionary data names to be used in the script.

  • The length of a data name specifies the maximum size of the data to be handled by the data name and whether the data name accepts alphanumeric or numeric data.

    Data-name-1 specifies a field-length alphanumeric data name. An alphanumeric data name can be from 1 through 255 characters long.

    Data-name-2 specifies an integer data name. The length of an integer data name is made up of an integer part and a decimal part. The integer part equals the total length of the data, including the sign (+ or -). The decimal part must be a zero, which indicates the number of decimal places. For example, a length of 5.0 specifies an integer data name with a total length of 5 characters.

    Data-name-3 specifies a decimal data name. The length of a decimal data name is made up of an integer part and a decimal part. The integer part equals the total length of the data, including the decimal point and the sign (+ or -). The decimal part is the number of decimal places. For example: a decimal data name with a length of 8.2 specifies a numeric value with a maximum size of 8 characters, where 2 are decimal values, 1 is the sign, 1 is the decimal point, and 4 are integer values. The largest possible value in this decimal data name is +9999.99.

  • Multiple occurrences of a data name can be declared in the DN command. Reference to an occurrence of a data name is DATANAME(n), where n is the number of the selected occurrence. A reference to the first occurrence of a data name is specified as DATANAME(1).

  • The maximum number of occurrences allowed for a data name is 32,767.

  • Multiple data names, delimited by commas or spaces, can be defined with one DN statement.

EXAMPLES

DN INPUT-FLAG (1), VIEW-FLAG (1), TEXT-FLAG (1)
DN TAX-RATE (2.0), MONTHLY-SALES(13.2*12)

SEE ALSO

FN, LN, SN, VN, section on Creating Scripts in the Script-IV Developer Guide.

From the Script-IV Language Reference, version 8.9.1. Open this page in the PDF