ddlUnload() - unload records from database
ddlUnload() - unload records from database
Prototype:
void ddlUnload(
CONTROL *ctl,
char *OptionString,
char *ArgString);
Permitted values in OptionString:
/B - data in OutputFileName is blocked in fixed length records with no CRLF;
/Cn - load the first n records only;
/H - insert column headings [applies only for Delimited RD]
/K - create unique output file
/Q - suppress quote characters for Delimited file
/R - reverse the byte order of all binary data types [must be used with /B option]
Form of ArgList:
<cx> <TableName> <RDname>
[(piname)] <OutputFileName> [ERROR <cxE>]
Description:
Unloads (exports) the record images to the file given by OutputFileName from the specified table.
The file <OutputFileName> can have one of three possible formats:
|
1)
|
Fixed column ascii (undelimited): in this case, each column is stored in
ascii in fixed columns, as defined in the RD. Each line of ascii text represents a single record; and is
terminated by CR-LF.
|
|
2)
|
Blocked format: in this case, each column is stored in fixed position in either ascii or binary format, as defined in the RD.
Each file record contains a fixed number of characters, and has no terminating character(s).
This mode requires the /B option on the ddlLoad() function.
| |
3)
|
Delimited ascii: in this case, each column is stored in variable length ascii fields,
with each field being separated by a specified delimiter.
The order of the fields is defined by the Delimited RD; that is:
RD <RdName> Delimited
|
|
Refer to the
UNLOAD command.
Values returned in Control Structure:
Control.Ans1 |
Number of records unloaded |
Control.Ans3 |
Number of records unloaded with errors |
Control.Ans3str[] |
Output file name if /K option is used |