Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

Variable

&pagelevel(5)&pagelevel

A variable is an object to which values can be passed during program execution. It belongs to one of the data types and can be both written to and read.

Variables can be fixed-length strings (up to 133 characters), numeric values (4 bytes) or bit patterns (1 to 4 bytes).
During compilation, the data type of a variable is defined by statically the first assignment, and by the defined data type on the right of the assignment. See table 9 (Data types) for more details.
During runtime, any attempts to read a variable that has not yet been dynamically defined will result in a runtime error and in termination of the PRODAMP program.

Variables can also have a global scope. Global variables are declared with the GLOBAL keyword in the front of usual variable declaration. They are useful when a variable should be used in more than one procedure as easy way to transfer variable value between procedures. 
Global variables can be loaded to every procedure that shares the library with the procedure that they were declared in. Loading of global variables can be done with keyword LOAD_GLOBAL. After loading all variables from the specified procedure, which are declared as global, these are available for usage in the current procedure.