The REPLACE statement is used to replace sections and named common areas (also called common sections) by providing old and new section names. The name of the old section appears first, followed by the name of the new section in parentheses.
The scope of the REPLACE statement is the immediately following module, unless the -IMMED option is used. The REPLACE statement must precede either the input module that contains the section to be replaced, or the INCLUDE statement that specifies the input module. The replacing section can be either before or after the replaced section in the binder input. If a REPLACE statement appears in a data set included from an automatic call library and is not immediately followed by an object module in the same data set, the request is ignored.
If the -IMMED option is used with REPLACE, then the REPLACE operates against any sections that have already been included as part of the current bind operation. The module being built is searched immediately for a section name matching the specified old section name.
The output module contains BINSRCH instead of SEARCH; any references to SEARCH within the module refer to BINSRCH. Any external references to SEARCH from other modules will not be resolved to BINSRCH.
See REPLACE statement for more information on using the REPLACE statement.