skip to main content

Procedure Division Statements : ALTER

ALTER
General Format
ALTER { Procedure-Name-1 TO [ PROCEED TO ] Procedure-Name-2 } ...
General Rules
1.
2.
Note - Since this statement is obsolete then it is not supported in COBOL classes while a warning message is showed every time it is used in COBOL programs.
Examples
Compute simple or complex tax doing an alter of a go to.
   perform tax-main thru tax-exit
   display message ws-tax
   goback.
   if tax-type = "complex" 
      alter go-to-compute-tax to proceed to compute-complex-tax
   end-if.
   go to compute-simple-tax.
   compute ws-tax = ws-amount * ws-base-percent * ws-tax-rate
   go to tax-exit.
   compute ws-tax = ws-amount * ws-tax-rate.
   exit.

Copyright (c) 2017 Veryant
Contact us
Please share your comments on this manual or on any
Veryant product documentation with the email button at the top left