b = swap(group-name,record-number,record-number);
The swap function reorders the sequence of occurrences of records or items. It is useful for reorganizing the position (occurrence number) of items in a roster, for instance if you want to ensure that the head of household is the first person on the roster.
Swap is primarily intended for use in batch applications. It should be used with extreme caution in data entry applications because of possible conflicts between the operator's actions and the program logic.
The function returns a logical value 1 (true) if successful and 0 (false) otherwise.
See also: Sort Function