Definition Specification
*.. 1 ...+... 2 ...+... 3 ...+... 4 ...+... 5 ...+... 6 ...+... 7 ...+... 8 DName+++++++++++ETDsFrom+++To/L+++IDc.Keywords+++++++++++++++++++++++++++++
| Columns | Description |
| 1–5 | Sequence number |
| 6 | D
|
| 7-21 | Data item name. May be blank for filler fields or unnamed data structure. |
| 22 | Externally described: (Blank) = Program described E = Externally described
|
| 23 | Data structure type: (Blank) = Miscellaneous definition S = Program status data structureU = Data area data structure
|
| 24-25 | Type of definition: (Blank) = Data structure subfield C = ConstantDS = Data structurePI = Procedure interfacePR = PrototypeS = Standalone field, array, or table
|
| 26-32 | From position or reserved word |
| 33-39 | To position or length |
| 40 | Internal data type: (Blank) = Character if blank decimal positions entry; otherwise, packed numeric for standalone field or zoned numeric for subfield A = CharacterB = Binary numericC = UnicodeD = DateF = Float numericG = GraphicI = Signed integer numericN = IndicatorO = ObjectP = Packed-decimal numericS = Zoned numericT = TimeU = Unsigned integer numericZ = Timestamp* = Basing pointer or procedure pointer
|
| 41-42 | Decimal positions (0–63, blank) |
| 43 | (Reserved) |
| 44–80 | File keywords |
| 81–100 | Comments |
Definition Keywords
ALIGN
| Aligns data structure subfields of integer or float data type on word boundaries. |
ALT(array-name)
| Names a main array for use with this alternating array. |
ALTSEQ(*NONE)
| Definition ignores alternate collating sequence, if any. |
ASCEND
| Specifies that array or table entries are in ascending order. |
BASED(pointer-name)
| Names a pointer to the address of the data item. |
CCSID(*DFT | number)
| Specifies a character code set identifier. |
CLASS(*JAVA:class-name)
| Names a class for an object definition. |
CONST{(constant)}
|
|
CTDATA
| Specifies a compile-time table or array. |
DATFMT(format{separator})
| Default date format and separator. See Date Formats . |
DESCEND
| Specifies that array or table entries are in descending order. |
DIM(numeric-constant)
| Defines the number of elements in an array or table (1-16773104). |
DTAARA{({*VAR:}data-area-name | *LDA
| Associates the data item with an external data area. May be variable, if *VAR is specified. |
EXPORT{(external-name)}
|
|
EXTFLD(field-name)
| Renames a subfield in an externally described data structure. |
EXTFMT(code)
| Specifies an external data type for compile-time and pre-runtime numeric arrays and tables:B = BinaryC = UnicodeF = FloatI = Signed integerL = Left signP = Packed decimalR = Right signS = Zoned decimalU = Unsigned integer
|
EXTNAME(file-name{:format-name}{:ALL
| Names a file (and optional record format) containing field descriptions used for subfields in data structure. Optionally, may specify fields to use. |
EXTPGM(program-name)
| Names an external program whose prototype is being defined. |
EXTPROC({proc-type{:class}:}proc-name)
| Names an external procedure whose prototype is being defined. Normally takes the format EXTPROC(proc-name), but can also be any of the following:
|
FROMFILE(file-name)
| Names a file with input data for a pre-runtime array or table. |
IMPORT{(external-name)}
| Indicates that storage for the data item is allocated in another ILE module with the EXPORT keyword. This module can use the same storage. |
INZ{(constant) | *EXTDFT | *JOB
| Initializes the data item. |
LEN(number)
|
Specifies the data item’s length (1-16773104), for character or graphic data. |
LIKE(name)
|
|
LIKEDS(data-struct-name)
| Specifies that a data structure, data structure subfield, return value, or parameter has the same subfields as another data structure. |
LIKEFILE(file-name)
| Parameter is a file. |
LIKEREC(format-name{:*ALL | *INPUT
| Specifies that a data structure, data structure subfield, return value, or parameter has the same subfields as a record format. Optionally, may specify fields to use. |
NOOPT
| Specifies that no optimization be performed for this data item. |
OCCURS(numeric-const)
| Specifies the number of occurrences of a multiple-occurrence data structure (1-16773104). |
OPDESC
| Passes operational descriptors with parameters defined within a prototype. |
OPTIONS({*NOPASS} {*NULLIND} {*OMIT}
| Specifies one or more parameter-passing options:
|
OVERLAY(name{:pos | *NEXT})
| Specifies that a data structure subfield overlays the storage of another subfield. |
PACKEVEN
| Zeroes out the high-order digit when a packed field has an even number of digits. |
PERRCD(numeric-const)
| Specifies the number of elements per record for an array or table. |
PREFIX(prefix-string{:number})
| Specifies a string to be prefixed (added or replaced) to subfield names of an externally described data structure. |
PROCPTR
| Defines an item as a procedure pointer. |
QUALIFIED
| Specifies that the subfields in a named date structure must be qualified by the data structure name, i.e., they must be referred to in the format structure.field. |
STATIC{(*ALLTHREAD)}
|
|
TEMPLATE
| Data item is a template, used only for LIKE or LIKEDS definitions. |
TIMFMT(format{separator})
| Specifies a time format and separator. See Time Formats . |
TOFILE(file-name)
| Specifies a file to which an array or table is to be written. |
VALUE
| Specifies that a parameter will be passed by value instead of by reference. |
VARYING{(2|4)}
| Indicates a varying-length character or graphic field. |
Usage Conventions for syntax tables
Index | HomePage | Programming | RPG IV | Definition Specification