DDL Compiler Commands
Data Definition Language (DDL) Reference Manual — 426798-002
9- 72
NCLCONSTANT Command
NCLCONSTANT Command Guidelines
The following points are guidelines for using the NCLCONSTANT command:
•
When NCLCONSTANT is in effect, DDL translates only DDL Constant objects.
DDL record, definition, token type, token code, and token map objects are not
translated. The DDL compiler issues a warning message when attempting to
output a nonconstant in NCL.
•
A DDL constant name can contain up to 30 ASCII characters. As a result, the
maximum number of characters for an NCL constant name generated by DDL
is 30.
•
The value of a DDL string constant can be from 1 to 130 ASCII characters, not
including the beginning and ending quotation. Therefore, the NCL value for a string
generated by DDL can have up to 130 ASCII characters. The legal range of values
for numeric constants depends on the TYPE clause specified in the CONSTANT
statement as defined in
Section 4, Named Constants
.
•
DDL replaces any hyphen in a DDL Constant name with an underscore character
(_) before writing the name to the NCL source file.
•
All NCL constant names generated by the DDL compiler appear in uppercase
characters.
•
The specified NCL source file must be an EDIT file. If the source file exists but is
not an EDIT file, DDL issues an error message, does not open the file, and does
not output any NCL source.
•
Only one NCL source file can be open at a time. If you specify the
NCLCONSTANT command when you already have an NCL source file open, DDL
closes the current source file before opening the new source file.
•
If the NCL source file already exists and you omit the exclamation point, DDL
appends the Constant objects to the end of the original contents of the file. DDL
does not replace any existing objects.
•
The DDL compiler can translate DDL Constant objects specified in an OUTPUT
statement only if the dictionary containing these objects is open.
NCLCONSTANT Example
In the following example, the DDL compiler translates the specified DDL constants.
When ?NCLCONSTANT is in effect, DDL stores the constants in $vol.subvol.myncl:
?NCLCONSTANT $vol.subvol.myncl !
constant val-1 value 1.
constant VAL-2 value 2.
constant val-abc value "abc".
constant Val-3 value 3.
! for the following definition, DDL generates a warning
! message and does not translate def-1 to NCL