list_file
Saves a list.
Available in:
| Apps (win) |
Apps (char) |
Reportwriter |
RPC |
Standalone PL |
| X |
X |
X |
X |
X |
Syntax
void list_file(list-name,file-name,file-type[,save-col,...])
list list-name
string file-name
string file-type
expr save-col
Description
Saves a list to a specified location.
|
list-name | specifies the list to save.
|
|
file-name | specifies the name to save to.
Whenever a file name is specified the extended file names are available.
Be sure to give a complete file
specification.
|
|
file-type | specifies the type. Values can be:
- a[a][sc[q]] --- store as text. [a] appends to text file.
If [sc] is not specified, then all columns are stored as one text line.
[sc] stores
the file with columns separated by c. For example, "as," creates a
new comma
separated data file; "aas," appends to an existing file. Non-integer numerics
will be written in scientific notation. [q] specifies q as the
character column quote
character. For example, "as,'" creates a new comma separated data file with
character column data delimited by "'".
- b[a] --- store as binary file. [a] appends to binary file.
Maintains list's column structure, but loses column names.
- s[n] --- store in shared memory. [n] allocates a new shared memory segment.
- x[d] --- store as text file in XML format. Maintains list's column structure and column names as well as recursive list structures. [d] stores only the data as text file in XML format.
|
|
save-col | (optional) specifies the columns to save.
Column numbers can be any expression that evaluates to either an integer or
a char string containing space-delimited
integers or any combination of these.
The default is
all columns.
|
Notes
To use the shared list option, the TRIM_SHM_FILE environment
variable must point to a valid file-name. Also, when using the
shared list option, save-col is ignored; in other words, all
columns are stored.
If you use the "?a" append option, the first list_file() call must not have the append option.
Example
Saves the parts list for later use.
list_file(xx,"parts.lst","b");
Prints part descriptions.
list_file(xx,"/dev/lp","a",1);