DELIMITER |
![]() ![]() ![]() |
The DELIMITER display option keyword specifies the separating character(s) to be used in a delimited report.
Format
DELIMITER "string"
where
A delimited report displays it output as a series of items separated by the given string instead of the usual tabular style of report. The DELIMITER keyword causes the query processor to produce this style of report and specifies the separator to be used. The output from a delimited report can, for example, be structured with comma separators, sent to a file using the LPTR keyword and then read into applications such as Microsoft Excel.
The string may contain tab characters by use of the special syntax "<TAB>". Other non-printing characters can be included by use of the ^nnn notation where nnn is the three digit character number from the ASCII character set.
In normal usage, the page heading and record counts would probably need to be suppressed using the HDR.SUP and COUNT.SUP keywords. The COL.SUP keyword can be used to suppress column headings.
The TO keyword can be used to specify the pathname of a file to receive the output. Use of this option implies use of HDR.SUP as the output is not paginated.
Examples
The command LIST INVOICES VALUE CUSTOMER.NAME DELIMITER "," HDR.SUP COL.SUP COUNT.SUP would produce a display such as that below.
74529,£1712.43,J McTavish 74273,£95.23,County Newspapers 63940,£141.00,R Bryant 74993,£9.29,Write Right Stationery
The command LIST INVOICES VALUE CUSTOMER.NAME DELIMITER "<tab>" HDR.SUP COUNT.SUP would produce a display such as that below where the spacing is performed by tab characters.
74529 £1712.43 J McTavish 74273 £95.23 County Newspapers 63940 £141.00 R Bryant 74993 £9.29 Write Right Stationery
See also: CSV |