The command recins adds new records to a recfile. It cannot however add fields to an existent record, and it would be cumbersome to do so manually. Such a task can be achieved automatically using recset and its -a flag.
Suppose that (after a stock inspection) you wanted to add an `Inspected' field to all the items in the recfile. The following command could be used.
$ recset -t Item -f Inspected -a 'Yes' stock.rec
Note that, because no record selection flag was provided, the command affected all the records (of type `Item'). We could limit the effect of the command using the -e, -q, -n or -m flags. For example to add the `Inspected' field to only the first item the following command is possible:
$ recset -t Item -n 0 -f Inspected -a 'Yes' stock.rec
Similarly, a selection expression could have been used with the -e flag in order to add the field only to records which satisfy the expression.
If you use recset with the -a flag on a field which already exists, a new field (in addition to those already present) will be appended with the given value.