gb_rec

Copy Fields Between Records

Syntax

call "gb_rec",gb__rec1$,gb__rec2$,gb__skip$,gb__copied$,gb__skipped$,gb__rec_err

Description

This called program is used to copy data from one record to another on a field-by-field basis. Data is copied based on identically named fields; data types are more or less unimportant, and data will be converted as necessary. Data that could not be converted (e.g. copying "X" to a numeric field) will be reported in the gb__skipped$ list.

Argument

Description

gb__rec1$

Fields are copied from here (the source record)

gb__rec2$

Fields are copied here (the target record)

gb__skip$

Linefeed -delimited list of fieldnames to skip from the copy (optional)

gb__copied$

Returns a linefeed-delimited list of each fieldname:dim that was copied

gb__skipped$

Returns a linefeed-delimited list of each fieldname:dim that was skipped

gb__rec_err

0 = success

-1 = gb__rec1$ doesn't have a template

-2 = gb__rec2$ doesn't have a template