Variables are symbolic names that represent stored data values. The value of a variable can be:
The value of a variable can be explicitly assigned by the programmer, or it can be the result of operations performed by the program during execution. Variables can change in value during program execution. At the start of program execution, all variables are unassigned. Any attempt to use an unassigned variable produces an error message.
A variable name must begin with an alphabetic character. It can also include one or more digits, letters, periods, dollar signs, or percent signs. Spaces and tabs are not allowed. A variable name can be any length up to the length of the physical line, but only the first 64 characters are significant. A variable name cannot be any of the BASIC Reserved Words listed in Appendix A. In InfoSphere® DataStage®, upper- and lowercase characters in a variable name are interpreted differently.
InfoSphere DataStage BASIC also provides a set of system variables called @Variables. Many of these are read-only variables. Read-only @variables cannot be changed by the programmer.
Most variables in BASIC remain available only while the current program or subroutine is running. Unnamed common variables, however, remain available until the program returns to the system prompt. Named common variables and @variables remain available until the user logs out of InfoSphere DataStage. See the COMMON statement for information about named and unnamed common variables.
In NLS mode you can include characters outside the ASCII character set only as constants defined by the $DEFINE statement and EQUATE statement statements, or as comments. Everything else, including variable names, must use the ASCII character set. .