%REPLACE

Purpose

Specifies that an identifier is a constant of a given value.

Syntax

%REPLACE name BY constant;

Description

The %REPLACE statement specifies that an identifier is a constant of a given value.

Beginning at the point at which the %REPLACE statement is encountered, each occurrence of name that follows the %REPLACE statement, as interpreted by the macro preprocessor, is replaced by the constant until the end of compilation or until another %REPLACE statement that specifies the same name is encountered.

The %REPLACE statement is normally used to supply the sizes of tables or to give names to special constants whose meaning would not otherwise be obvious.

Example

%REPLACE MSG BY 'login'; 
PUT SKIP LIST(MSG);
...
%REPLACE MSG BY 'logout'; 
PUT SKIP LIST(MSG);