DECLARE lets you create a new variable in the Glossary and to assign or compute values into the new variable.
Syntax:
DECLARE new variable
DECLARE new variable,new variable,new variable
DECLARE new variable = variable
DECLARE new variable = value or DECLARE new variable = (value)
DECLARE new variable = variable (or record/column) operator variable (or record/column)
DECLARE new variable = variable (or record/column) operator value
(where n specifies the width of the new variable)
DECLARE new variable:n
DECLARE new variable:n,new variable:n,new variable:n
DECLARE new variable:n = variable
DECLARE new variable:n = value or DECLARE new variable:n = (value)
DECLARE new variable:n = variable (or record/column) operator variable (or record/column)
DECLARE new variable:n = variable (or record/column) operator value
Abbreviation: DEC
Usage:
You can create new variables and reference the new variables in your job file. You can save the new variables to your data file using the Save Data As option of Setup|Glossary Variables. New variables created using the DECLARE instruction are added at the end of the record when you are saving the data file using the Save Data As option. The new variables are added in the order they are specified in the Glossary.
Note: 1. Indexed variables cannot be used with the DECLARE instruction. 2. New variables declared in the Glossary can be used with LOC+. 3. New variables declared in the Glossary cannot be used with VAR+ without first saving the data file using the Save Data As option on the Setup Glossary Variables dialog. |
Related topics: