Rational Developer for System z
COBOL for Windows, Version 7.5, Programming Guide


Resetting switches and flags

Throughout your program, you might need to reset switches or flags to the original values they had in their data descriptions. To do so, either use a SET statement or define a data item to move to the switch or flag.

When you use the SET condition-name TO TRUE statement, the switch or flag is set to the original value that it was assigned in its data description. For a level-88 item that has multiple values, SET condition-name TO TRUE assigns the first value (A in the example below):

88 Record-is-Active Value “A” “O” “S”

Using the SET statement and meaningful condition-names makes it easier for readers to follow your code.

Example: set switch on
Example: set switch off


Terms of use | Feedback

Copyright IBM Corporation 1996, 2008.
This information center is powered by Eclipse technology. (http://www.eclipse.org)