HP 3000 Manuals

STOP Statement [ HP COBOL II/XL Reference Manual ] MPE/iX 5.0 Documentation


HP COBOL II/XL Reference Manual

STOP Statement 

The STOP statement provides a means of temporarily suspending execution
of your object program, as well as a means of stopping it completely.

Syntax 

[]
Parameters RUN if specified, causes the entire run-unit to cease execution when it is encountered, regardless of whether the STOP RUN statement is in a subprogram or a main program. Control is then returned to the operating system. literal-1 may be numeric, nonnumeric, or any figurative constant except ALL. If the literal is numeric, it must be an integer. Use of a literal in a STOP statement temporarily suspends the object program. The literal variation of the STOP statement is an obsolete feature of the 1985 ANSI COBOL standard. Description If the STOP RUN statement is used in a consecutive sequence of imperative statements within a sentence, it must appear as the last statement in this sequence. If STOP literal is used, the object program suspends and the literal is displayed at the operator's console. A system generated message is then displayed, followed by the message TYPE GO TO RESUME. When the operator responds with "GO", program execution resumes with the next executable statement following the STOP literal statement. For example: STOP "MOUNT TAPE COBTEST" OPEN INPUT COBTEST. The STOP statement above is to instruct the operator to mount a magnetic tape to be used as an input file for the program. After the operator mounts the tape and makes appropriate console responses, the program resumes execution when the word "GO" is typed in.


MPE/iX 5.0 Documentation