The DDS coding syntax for keywords and their parameter values is similar to
the CL syntax. The DDS syntax rules are:
- Code all DDS entries in uppercase except for character values enclosed in
apostrophes and extended names enclosed in quotation marks.
- Code keywords on the same (or subsequent) line as the entry with which
they are associated.
- Separate multiple keywords with at least one blank. Parameter
values for keywords must be enclosed in parentheses. The initial
parenthesis must immediately follow the keyword. For example:
KEYWORD(VALUE)
This rule is slightly different from that in control language. When
coding control language, the parameter values can be positional. Syntax
for DDS requires that the keyword be specified, except when specifying either
a constant or the parameter value for the DFT (Default) keyword.
- Separate multiple parameter values for the same keyword with at least one
blank. For example:
KEYWORD(VALUEA VALUEB)
- Enclose parameter expressions in parentheses. A parameter
expression consists of a special value followed by the parameter value.
The special value begins with an asterisk and must immediately follow the left
parenthesis. The parameter value must immediately precede the right
parenthesis. Separate the special value and the parameter value by at
least one blank. A parameter expression represents one parameter value
and must be separated from other parameter values by at least one
blank. For example:
KEYWORD(VALUEA (*special-value VALUEB) VALUEC)
- Use apostrophes to enclose character values. Numeric values appear
without apostrophes. See the coding examples for COMP, RANGE, and
VALUES keywords. Character values can appear in two places in the
syntax:
- As a parameter value for some keywords. For example, TEXT (all
types of files) and COLHDG (database files) require character strings as text
description. Other keywords, such as CAnn and CFnn, use character
strings as text descriptions for response indicators.
- As the default value of a constant field (either with or without the DFT
keyword) for display and printer files only. In display files, a
character constant can also be specified for named fields. Even if you
do not specify the DFT keyword, specifying a character constant implies the
DFT keyword.
- To specify an apostrophe within a character string, specify two
apostrophes so that one apostrophe appears in the output. For
example:
KEYWORD('Customer''s name')
appears as
Customer's name
- Use a plus (+) or a minus (-) sign as a continuation character when
a keyword and its parameter values do not fit on a single line. The
sign must be the last nonblank character in the functions field. A
single statement can be continued for a maximum of 5000 character
positions.
- A minus (-) sign means the continuation begins in
position 45 of the next line (the first position in the functions
field).
- A plus (+) sign means the continuation begins with the first
nonblank (first significant) character in the functions field on the next
line.
If you specify a continuation character within a parameter value, any
blanks preceding the continuation character are included in the parameter
value.
- Specify a plus (+) sign as the last nonblank character on a line to
continue conditioning for keywords specified on the next line. This is
helpful when a condition includes several option indicators and applies to
several keywords.
- The Operating System/400* (OS/400)* program continues a DDS statement
until you specify one of the following:
- A record format name (R in position 17).
- A field specification (field name or location).
- For physical or logical files, a key field specification (K in position
17).
- For logical files, a select or omit specification (S or O in position
17).
- For join logical files, a join specification (J in position 17).
- For display files, a help specification (H in position 17).
- For device files, an option indicator or condition name that conditions a
keyword, field, or field location.
- The maximum length of a DDS statement (5000 characters). The fixed
length entries (positions 1 through 44) of the first line are included in the
statement, so the maximum space available for keywords is 4956.
- Keyword descriptions use the following punctuation marks to indicate the
syntax for the keyword:
- ()
- Enclosed values are required.
- []
- Enclosed values are optional.
- [...]
- Specify additional values as needed.
- {}
- The upper value is the default value (see REFFLD).
- |
- Specify either the value to the left or to the right (may refer to
optional values).
(C) Copyright IBM Corporation 1992, 2006. All Rights Reserved.