1 9/29/88   write_data_file,  wdf
 2 
 3 Syntax:  write_data_file pathname {-control_args}
 4 
 5 
 6 Function:  retrieves the selected data and places it in an output file
 7 in a format suitable for input to the store_from_data_file request.
 8 
 9 
10 Arguments:
11 
12 pathname
13    is the name of the file where the data will be written to.
14 
15 
16 Control arguments:
17 
18 -column_delimiter X, -cdm X
19    where X is a single ascii character which will be used to delimit
20    the column values.  If this control argument isn't specified the
21    default column delimiter is the tilde.
22 
23 -create_columns STRING, -crc STRING
24    new columns with null values are placed in the column positions
25    specified by STRING.  STRING is a blank separated list of numbers.
26    (See "Notes" below.)
27 
28 -extend
29    specifies that if the file already exists it should be extended
30    rather than truncated.
31 
32 
33 -no_progress, -npg
34    specifies that progress messages should not be printed. (DEFAULT)
35 
36 -progress {N}, -pg {N}
37    specifies that a progress message should be printed after N tuples
38    have been processed, where N is any positive integer. If N is not
39    specified the default is to print a progress message after 1000
40    tuples.
41 
42 -row_delimiter X, -rdm X
43    where X is a single ascii character which will be used to delimit
44    the row values.  If this control argument isn't specified the
45    default row delimiter is the newline character.
46 
47 
48 -truncate
49    specifies that if the file already exists it should be truncated.
50    This is the default.
51 
52 
53 Notes:
54 
55 The -create_columns control argument is provided to aid in the
56 restructuring of tables.  The column positions specified are the
57 positions in the output file where the null value will be placed.  To
58 create two new columns as the third and fifth columns in the output
59 file the string "-create_columns 3 5" would be used.  The null value is
60 provided by placing two column delimiters together without any
61 intervening characters, and the zero length character string is
62 converted according to the data type of the column when the
63 store_from_data_file request processes the input file.
64 
65 
66 Column values are examined to determine if they contain quotes, column
67 delimiters, or row delimiters.  If any of these are found the column
68 value is requoted before it is placed in the output file.  The
69 store_from_data_file request removes this layer of quotes when
70 processing the file.
71 
72 
73 Examples:
74 
75 write_data_file employee_data
76 write_data_file employee_data -extend
77 write_data_file employee_data -create_columns 1 5
78 write_data_file employee_data -column_delimiter X