The DEFINE RECORD statement is used to define the record of the output file. The following are the definitions that are made known by the DEFINE RECORD statement:
The following is the syntax definition of the DEFINE RECORD statement:
DEFINE RECORD record_name
[ OF FIXED LENGTH record_length
AS (
field_name position_specification type_specification,
...
)
]
[ FIELD DELIMITER delimiter_char ]
[ RECORD DELIMITER delimiter_string ] ;
position_specification::
POSITION ( start_position : end_position )
type_specification::
| CHAR
| SHORT
| LONG
| FLOAT
| DOUBLE
The following are the variable descriptions of the DEFINE RECORD syntax:
The first position of each record is 1 and not 0.
If DATE, TIME, and TIMESTAMP types are to be dumped they can be specified as characters in the commands file. If it is a fixed length record then the type specification can be CHAR.
The following is an example of the DEFINE RECORD statement for fixed length records:
DEFINE RECORD rec_one OF FIXED LENGTH 20
AS (
fld1 POSITION (1:4) SHORT,
fld2 POSITION (5:15) CHAR,
fld3 POSITION (16:20) CHAR
) ;
See also: