Friday, September 4, 2009

The ALTER Statement
Syntax
Format
ALTER {procedure-name-1 TO [PROCEED TO] procedure-name-2} ...
Description
The ALTER statement is used to modify the branching behavior of a GO TO statement.
In order to use the ALTER statement you must have a paragraph in the PROCEDURE DIVISION that consists of exactly one GO TO statement. The GO TO must be the only statement in the paragraph. Procedure-name-1 is the name that paragraph and procedure-name-2 is the name of any other paragraph in the PROCEDURE DIVISION. If the GO TO in procedure-name is subsequently executed, control will pass to procedure-name-2 instead of the name originally coded in the GO TO statement.

Tips
1. This statement was eliminated from the COBOL language and it was only included in this manual in case you encounter a previously coded program that uses this statement.
2. Use of this statement is considered to be a very bad idea.
3. If in spite of tips 1 and 2, you still elect to code an ALTER statement, please don't address your problems to the Ask The Expert section of this website.