batchassign
DSTPREFIX
,
SRCPREFIX
,
LIST
,
OPTIONS

The batchassign statement assigns a bunch of fields/variables to another bunch of fields/variables.


Parameters

This statement has four parameters:

dstprefix – Add this prefix to list of fields/variables being assigned to. Or if prefix begins with -, remove this prefix from each item in the list.

srcprefix – Add this prefix to list of fields/variables being assigned from. Or if prefix begins with -, remove this prefix from each item in the list.

list – List of fields and/or variables to copy

options – Option parameters:

variable=TYPE This option specifies that the destination variables should be created automatically. You can specify the type of variables to be created, either LOCAL, FILEGLOBAL, WINDOWGLOBAL, GLOBAL or PERMANENT. If this option is not specified you must create any variables being assigned in advance.

textconvert=YESNO If yes, data will be converted to text when it is copied from a field into a variable. When data is copied from a variable to a field, it will be converted from text into the proper format for the field (text, date or number). If this option is NO or missing then the data will not be converted to text.

zeroblank=YESNO This option only applies if textconvert=YES (see above). If zeroblank=YES, zeros will be copied into numeric fields as empty, rather than displaying the zero.


Description

This statement assigns a bunch of fields/variables to another bunch of fields/variables.

 /* convert all fields into corresponding variables (City becomes dupCity) in text format */
batchassign "dup","",dbinfo("fields",""),{variables=fileglobal textconvert=yes}
addrecord
/* copy the variables back into the new record */
batchassign "","dup",dbinfo("fields",""),{textconvert=yes zeroblank=yes} 

History

VersionStatusNotes
10.0No ChangeCarried over from Panorama 6.0.