Assigns a value to a specified preprocessor variable.
%[label:]... preprocessor-variable = preprocessor-expression;
preprocessor-variable is a preprocessor variable reference, and preprocessor-expression is any valid expression.
Example 1.
%DECLARE A FIXED (B,C) CHARACTER; %A = 1024; %B = 'BALANCE(CUST(I,J),DATE())'; %C = 'ALLOCATE STRUC SET(STRUC_PTR);'; C STRUC.BAL(A) = B;
The text generated by this example would be as follows:
ALLOCATE STRUC SET(STRUC_PTR); STRUC.BAL(1024) = BALANCE(CUST(I,J),DATE());
Example 2.
%DECLARE (D,E) CHAR; %D = 'TEST_CASE'; %E = D || '_0'; F = E;
The text generated by this example would be as follows:
F = TEST_CASE_0;
Description
The %ASSIGNMENT statement is used to evaluate preprocessor expressions and to assign the result to a preprocessor variable.