X 8.1.15.3 LABEL Declarative
X The LABEL declarative provides user label-handling procedures.
X >_Workstation_> Under AIX, OS/2, and Windows, USE...AFTER...LABEL
X PROCEDURE is not supported. If encountered, they are ignored and a
X warning message is issued. <_Workstation_<
X ___ Format 2--USE (LABEL Declarative) __________________________________
X | |
X | >>__USE__ ________ __AFTER__ __________ __ ___________ __ ______ ____> |
X | |_GLOBAL_| |_STANDARD_| |_BEGINNING_| |_FILE_| |
X | |_ENDING____| |_REEL_| |
X | |_UNIT_| |
| |
X | <_____________ |
X | >__LABEL PROCEDURE__ ____ __ ___file-name-1_|_ _____________________>< |
X | |_ON_| |_INPUT___________| |
X | |_OUTPUT__________| |
X | |_I-O_____________| |
X | |_EXTEND__________| |
| |
|________________________________________________________________________|
X AFTER
X User labels follow standard file labels, and are to be processed.
X The labels must be listed as data-names in the LABEL RECORDS clause in
X the file description entry for the file, and must be described as
X level-01 data items subordinate to the file entry.
X If neither BEGINNING nor ENDING is specified, the designated
X procedures are executed for both beginning and ending labels.
X If FILE, REEL, or UNIT is not included, the designated procedures are
X executed both for REEL or UNIT, whichever is appropriate, and for FILE
X labels.
X FILE
X The designated procedures are executed at beginning-of-file (on the
X first volume) and/or at end-of-file (on the last volume) only.
X REEL
X The designated procedures are executed at beginning-of-volume (on each
X volume except the first) and/or at end-of-volume (on each volume
X except the last).
X The REEL option is not applicable to direct-access files.
X UNIT
X The designated procedures are executed at beginning-of-volume (on each
X volume except the first) and/or at end-of-volume (on each volume
X except the last).
X The UNIT phrase is not applicable to files in the random access mode,
X because only FILE labels are processed in this mode.
X file-name-1
X Can appear in different specific arrangements of the format. However,
X appearance of a file-name in a USE statement must not cause the
X simultaneous request for execution of more than one USE declarative.
X file-name-1 must not represent a sort file.
X If the file-name-1 option is used, the file description entry for
X file-name must not specify a LABEL RECORDS ARE OMITTED clause.
X When the INPUT, OUTPUT, or I-O options are specified, user label
X procedures are executed as follows:
- X When INPUT is specified, only for files opened as input
- X When OUTPUT is specified, only for files opened as output
- X When I-O is specified, only for files opened as I-O
- X When EXTEND is specified, only for files opened EXTEND
X If the INPUT, OUTPUT, or I-O phrase is specified, and an input, output, or
X I-O file, respectively, is described with a LABEL RECORDS ARE OMITTED
X clause, the USE procedures do not apply. The standard system procedures
X are performed:
- X Before the beginning or ending input label check procedure is executed
- X Before the beginning or ending output label is created
- X After the beginning or ending output label is created, but before it
X is written on tape
- X Before the beginning or ending input-output label check procedure is
X executed
X Within the procedures of a USE declarative in which the USE sentence
X specifies an option other than file-name, references to common label items
X need not be qualified by a file-name. A common label item is an
X elementary data item that appears in every label record of the program,
X but does not appear in any data records of this program. Such items must
X have identical descriptions and positions within each label record.
X Within a Declarative Section there must be no reference to any
X non-declarative procedure. Conversely, in the non-declarative portion
X there must be no reference to procedure-names that appear in the
X Declarative Section, except that the PERFORM statement can refer to a USE
X procedure, or to procedures associated with it.
X The exit from a Declarative Section is inserted by the compiler following
X the last statement in the section. All logical program paths within the
X section must lead to the exit point.
X There is one exception: A special exit can be specified by the statement
X GO TO MORE-LABELS. When an exit is made from a Declarative Section by
X means of this statement, the system will do one of the following:
- X Write the current beginning or ending label and then reenter the USE
X section at its beginning for further creating of labels. After
X creating the last label, the user must exit by executing the last
X statement of the section.
- X Read an additional beginning or ending label, and then reenter the USE
X section at its beginning for further checking of labels. When
X processing user labels, the section will be reentered only if there is
X another user label to check. Hence, there need not be a program path
X that flows through the last statement in the section.
X If a GO TO MORE-LABELS statement is not executed for a user label, the
X declarative section is not reentered to check or create any immediately
X succeeding user labels.
© Copyright IBM Corp. 1991, 1998
IBM Library Server Copyright 1989, 2005 IBM Corporation. All rights reserved.
Return to library:
z/OS |
z/OS.e |
TPF |
z/VSE |
z/VM |
IBM Hardware |
IBM System z Redbooks
Glossary:
IBM terminology
Publications:
How to order publications
Readers:
Download IBM Library Reader |
Download IBM Softcopy Reader |
Download Adobe® Acrobat® Reader®
Library management:
Download IBM Softcopy Librarian
Contacts:
Contact z/OS
Adobe, the Adobe logo, Acrobat, the Acrobat logo, and Acrobat Reader are registered trademarks
of Adobe Systems incorporated.