pull - pull records from an RMSfile
pull [-afdlmr] datafile [datafields] [selectionfields ]
Pull reads the specified RMSfile and produces on the standard output one text line for each selected record. Each output line is made up of fields separated by carets (^), followed by the record number in the RMSfile. A field in a data record is output only if it is listed as one of the datafield arguments in the command line. An output line is generated only if the data values in the record fall within the bounds specified by the selectionfield arguments.
A datafield argument specifies a field name within the RMSfile. A value is output onto the standard output file for each datafield listed in the order the datafields are listed.
A selectionfield argument has one of the following forms:
"fieldname>value" greater than
"fieldname>=value" greater than or equal to
"fieldname<>value" not equal to
"fieldname<=value" less than or equal to
"fieldname<value" less than
Only records that have values within the bounds specified will generate output lines. The value part of a selectionfield may be missing in which case the selectionfield is ignored. If there are several selectionfields, the record is output only if it meets all the selectionfield conditions. Selectionfields do not cause an output field to be generated. If the field is to be listed, it must also be listed as a datafield. Each selectionfield should be enclosed in quotes to prevent the shell from interpreting the > and < symbols.
If the -a flag is specified, then all of the fields in the RMSfile are pulled, and any datafields on the command line are ignored.
If the -f flag is specified, then the first line output contains the list of datafield names that are being output. Each datafield name is separated from the next by a caret in the same manner the datafield values are separated.
If the -d flag is used, DATE and TIME fields are output as decimal numbers with a value equivalent to the internal representation of the field. Normally, DATE and TIME fields are output in their standard format, i.e., dates are output as MM/DD/YY and times are output as HH:MM:SS. If the -d flag is used, date fields are not output in MM/DD/YY format, but instead are output in long integer format giving the number of days from January 1, 1800. This allows programs such as csort(C-1) to sort date fields in date order. Put(C-1) converts such fields back into their proper internal representation automatically.
The -m flag instructs pull to output the data records in a ASCII text format suitable to Multiplan. Pull generates the output in symbolic link format (SYLK), and this can be loaded directly by Multiplan. When the result of the -m flag is loaded by Multiplan, the first spreadsheet row contains each datafield name, one per column. Each following row has one of the selected data records, with each data field listed under its respective field name.
The -l flag instructs pull to output the data records in a ASCII text format suitable to Lotus 1-2-3. Pull generates the output in printed text form and this can be loaded directly by Lotus 123 using their /File Import command. When the result of the -l flag is loaded by Lotus 123, the first spreadsheet row contains each datafield name, one per column. Each following row has one of the selected data records, with each data field listed under its respective field name.
If the -r flag is used, the record numbers are stripped from the output.
The MS-DOS system has a great number of utilities that operate on lines of ASCII text. Pull and put(C-1) are intended for converting a data file to text lines, manipulating the text lines with MS-DOS utilities and then possibly restoring the data records again.
Pull and put can also be used for transferring data to and from other computer systems.
put(C-1), csort(C-1), npull(C-1).
C/Base Utilities Manual Chapter 6, Transferring C/Base Applications.