FILE LOAD <Survo_data_file>,L
loads the active fields of the data file in the edit field from the line
L onwards. If L is omitted, the next edit line is used. IND and CASES
specifications are also available. To indicate the fields to be loaded,
a MASK specification may be used. If the name of the data file is
preceded by a '-', the header lines are not printed in front of the data
values.
Missing values are shown as '-'s. Any <string> may be used as a missing
value indicator in the output by giving specification MISSING=<string>.
This option applies to numeric fields only.
Example: MISSING=***
Unwanted characters are skipped by
SKIP=<list_of_characters>. Example: SKIP=,"
FILE LOAD <Survo_data_file> TO <text_file>
moves the active fields of the data file to a text file.
Also the header lines telling the name of the data file and the names
of the fields will be moved.
If <Survo_data_file> is preceded by a '-', the header lines are
not moved. This is useful in situations where several parts of a data
file has to be copied in a single text file.
Each record will appear as a line terminated by a line feed character.
In both forms above, fields in the output will be separated by a
space character. To use another character instead of a space, give
DELIMITER=<character>. Then all fields, except the the last one, will
be terminated by <character>. To terminate the last field as well
with <character>, give DELIMITER=<character>,1 .
DELIMITER=TAB is the same as DELIMITER=char(9).
If DELIMITER is used, both leading and trailing space characters
in each field are replaced by a character given by
SPACE=<space_character>. Those characters can be erased thereafter by TXTCONV.
The spaces and commas in string variables may be replaced by other
characters by using specifications STR_SPACE and STR_COMMA, respectively.
For example, STR_SPACE=_ STR_COMMA=; makes the output suitable for
plotting it as texts and labels (in GPLOT and PLOT).
By default names of fields are truncated according to the current format.
By NAMES8=1 field names are copied to the normal length of 8 characters.
NAMES8=2 works like NAMES8=1 but replaces the name of the first variable
by blanks. This a useful option in making data tables for R, for example. C
The default format of the output is a data matrix (table). Other formats
may be selected by a FORMAT specification. It has 3 different forms:
1. FORMAT=ORDER:<field_1>,<field_2>,...
reorders the fields for output.
2. FORMAT=LIST
gives the output in the form of a data list.
3. FORMAT=<name_of_format>
specifies that a special (multiline) format given in the current
edit field is to be used. This format has to be given in the form:
FORMAT <name_of_format>
one or several lines containing free text and field
descriptions of form name_of_field: ###.##
or [name_of_field]
END
If ###.## is missing, the default format for the field is used.
In the latter case (name in brackets []) the default format is
always used and the value overwrites the name of the field.
Example: (Results of FILE LOAD on line 41 appear from line 48 onwards.)
41 *FILE LOAD FINLAND,48 / FORMAT=PLAN1
42 *FORMAT PLAN1
43 *[Commune] [Province]
44 +[Popul] [Births]
45 *--------------------------------------
46 *END
47 *
48 *Helsinki UUS
49 +483057 5851
50 *--------------------------------------
51 *Tampere HÄM
52 +165453 2084
53 *--------------------------------------
54 *Turku TUR
55 +164081 2330
56 *--------------------------------------
etc.
Fields in format lines (lines 43-45 in the preceding example) can have
various display attributes (shadow characters) and these attributes
will be copied to each result line correspondingly. In this case,
make sure that there is room enough for new shadow lines by using
the REDIM command. Also control characters of format lines are copied.
These features are valid only when data is loaded into the edit field.
In the output of FILE LOAD, a code conversion is carried out by
a specification FILTER=<conversion_file> where the 256 first bytes
of the conversion file defines a characterwise mapping. This file
is generated by using a CODES SAVE command (See CODES?).
In this conversion, certain characters (usually blanks) are skipped
(left out) by mapping them to decimal value 0.
D = More information on data management