The CHANGE statement causes an external symbol to be replaced by
the symbol in parentheses following the external symbol. The external
symbol to be changed can be a control section name, a common area
name, an entry name, an external reference, or a pseudoregister. More
than one such substitution can be specified in one CHANGE statement.
The syntax of the CHANGE statement is:
CHANGE [-IMMED,] externalsymbol(newsymbol)
[,externalsymbol(newsymbol)]...
- -IMMED
- Causes the target of the CHANGE control statement to be the
sections already included in the module being bound.
- externalsymbol
- The external symbol that is changed.
- newsymbol
- The name to which the external symbol is changed.
Placement: In the job stream or input data
set, the CHANGE control statement must be placed before either the
module containing the external symbol to be changed, or the INCLUDE
control statement specifying the module. The scope of the CHANGE statement
is across the next object module, load module, or program object.
However
if the -IMMED option is specified, the CHANGE control statement should
be placed anywhere after the module being changed, or the INCLUDE
statement specifying the module. Note: - External references from other modules to a changed control section
name or entry name remain unresolved unless further action is taken.
- If both the original name and the new name specified for the external
symbol are already defined in the output module, the new name is deleted
from the module before the original name is changed. If the new name
defines a control section, the original section with the same name
will be deleted. The results received from the binder under this condition
vary from the results received from the linkage editor.
- When a REPLACE statement that deletes a control section is followed
by a CHANGE statement with the same control section name, the results
are unpredictable.
- If a CHANGE statement without the -IMMED option is not followed
by any included module, the binder issues a diagnostic message and
ignores the change.
- If a CHANGE statement appears in a module included from an automatic
call library, it will be ignored if it is not followed by a module
from the same member.
- The -IMMED option is not allowed during autocall processing.
- externalsymbol may be specified using the syntax $PRIVxxxxxx
(where xxxxxx is 6 hexadecimal digits) to represent an unnamed symbol.
To determine the appropriate value to use, it is necessary to rebind
the single module and produce a MAP and/or XREF. The $PRIVxxxxxx symbol
names from that binder output can be used in CHANGE statements on
the very next bind of the single module. Names $PRIV000000 - $PRIV00000F
are reserved by the Binder and may not be used as externalsymbol.