put - put text data into RMSfile
put [-ufv] datafile [datafields]
Put reads lines from the standard input, creates data records from
the
input and puts the data records into the specified RMSfile. Each
datafield argument is a data field in the data file, and each input
line
lists the values for these fields that make up one record. The fields
in each input line are separated by carets (^), and these fields
must
correspond to the order in which the datafields are listed. The
last
input field is a record number. The format of an input line is:
value^value^value^...^value^recordnumber
A data record is constructed from the input line, and the record
is added
to the data file. If the data record has additional fields that
are not
specified as one of the datafields, these fields are set to zero.
If a
record with the same key value already exists in the RMSfile, it
is not
deleted.
If the -u flag is used, the last field of each input line is assumed
to
be a record number in the RMSfile. In this case, the input lines
are
used to update the contents of an existing record in the RMSfile.
Any
data fields in the record not specified in the command line are
not
changed. Also, put does not change any fields that are key fields
when
the -u flag is used. This flag is meant to be used with output generated
by pull(C-1).
If the -f flag is specified, the first input line contains the list
of
data fields separated by carets and any datafields specified in
the
command line are ignored.
If the -v flag is specified, put will print out a running total
of how
many records have been put into this datafile.
Put can be used to load data that was produced by some other program
into
the data files. If the input file has been produced by some other
program,
a dummy field that represents a record number must be appended to
each
input line. In this case the -u flag must not be used, and the dummy
record number is not referenced.
pull(C-1).
C/Base Utilities Manual Chapter 6, Transferring C/Base Applications.