Scripts usually make extensive use of variables. Variables may be defined and modified using the $set_var command. This command allows you to do assignments, as well as additions, subtractions, concatenation, extraction, and various conversions on variables. There are also standard system variables that are always defined for all scripts. These variables usually contain information about the call or other system information, and assignment to some 'smart' variables can also trigger external actions such as deletion of a specific file named in the assigned value. You can see a list of system variables in the System Variables appendix.

Additional variables may also be defined using the $var_def command in various configuration files. Each call has its own variable name space, so any changes to variables do not affect variables for other lines. To avoid conflicts with system and control variables when choosing variable names, avoid embedded underscore ('_') characters, because new system and control variables introduced in the future will always contain this character. Variable names are not case-sensitive.

There is a fixed limit of about 16kb for all variable and values used in a call.  The use of a fixed limit allows for maximum efficiency in setting and retrieving variables.  You may extend this limit by means of the COPIAFACTS run-time option Maximum Variable Space, if your application has unusually large requirements for variables.