COBOL Manual for TNS/E Programs (H06.08+, J06.03+)

?Johann Philip Geissinger
Last name is......Geissinger
Rest of name is...JohannPhilip
Enter a name (or a space to terminate):
?Copernicus
Last name is......Copernicus
Rest of name is...
The portions of the rest of the name are not separated by spaces. If you want spaces, make the
STRING statement look like this:
STRING NAMES (NAME-INDEX) DELIMITED BY SPACE
" " DELIMITED BY SIZE
INTO REST-OF-NAME
POINTER POINTER-1.
USE
USE defines debugging or exception-handling procedures beyond the standard techniques of the
file system. USE also defines the conditions under which the procedure paragraphs following it
are executed.
USE can appear only as the first statement of a section in the Declaratives Portion of the Procedure
Division, and it must be the only statement in the sentence containing it. Any other statements that
the section contains must be organized into sentences belonging to paragraphs of the section.
Empty debugging declarative sections serve no purpose.
Each section containing a USE statement is a declarative procedure. A declarative procedure,
together with any associated utility sections, forms a logically discrete area. (The other logically
discrete area of a program is the remainder of the Procedure Division.)
Control statements (ALTER, GO TO, and PERFORM) specified in one logically discrete area are,
with a few exceptions, not permitted to refer to procedure-names defined within another logically
discrete area. For the detailed restrictions and permissions, see ALTER (page 291), GO TO (page 334),
and PERFORM (page 389).
USE DEBUGGING
NOTE: The 1985 COBOL standard classifies USE DEBUGGING as obsolete. The compiler does
not recognize it. For its description, see the COBOL Manual for TNS and TNS/R Programs.
USE AFTER EXCEPTION
USE AFTER EXCEPTION intercepts control when an input-output exception occurs. The input-output
system executes USE AFTER EXCEPTION procedures after it completes the standard input-output
error routine. It also executes USE AFTER EXCEPTION procedures when invalid-key or at-end
conditions arise and no INVALID KEY or AT END phrases apply to the file. After the USE procedure
executes, it returns control to the calling routine, unless the I-O status code is “4x ” or “90,” in
which case the process terminates.
484 Procedure Division Verbs