Record Wide Delimiters

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 1

You can specify delimiters to identify the end of a record as follows:

Record end [delimiter-string]


A delimiter is a character or string that marks the end of a data field. Specifying a
record delimiter indicates that

All the records end with the delimiter string.


The delimiter string does not occur within a record, except possibly as the
delimiter of the last field

Character set of the delimiter is the same as that of the record type.
Using record delimiters improve the performance of the graph that use variable
length records and degrade the performance of the graphs that use fixed length
records

Example
Record
String (,) first_name, last_name;
Decimal(3) age;
End (\n)
Default values for fields
Record
String(12) id;
String(10) first_name, last_name;
String(10) hoe_phone = None;
/* default value None */
String(10) work_phone = None;
/* default value None */
Int num_calls = 0;
/* default value 0 */
End
NULL default values
A record type can treat the default value of a field as NULL.
To specify that a record format treat the default value of a field as NULL, follow its
field name with an equal sign, the keyword NULL, and parentheses surrounding the
value you want to be considered equivalent to NULL. When a field so specified has
its default value, a reference to it results in NULL, in the same way that a reference
to a missing conditional fields or missing input variable results in NULL. For
example, the following specifier decribes a data record in which two fields, b and d
may be NULL, depending on their values: -1 for b, and all spaces for d.

You might also like