The SERVICE statement is used to establish addressability to Linkage Section items usually in a CICS program.
General Format
Syntax Rules
- SERVICE LABEL is
generated by the mainframe CICS preprocessor to indicate control flow. It is
not intended for general use.
- The SERVICE LABEL statement can appear only in the Procedure Division, not in the Declaratives Section.
- Identifier should be
either
the first 01-level item representing the BLL-cell block in the Linkage Section, or another Linkage Section 01-level item for which addressability needs to be re-established following an EXEC CICS statement.
General Rules
- At the statement following the SERVICE LABEL statement, all registers that can no longer be valid are reloaded.
- If the OS/VS COBOL BLL mechanism is used in a CICS program, addressability to the parameter list must be established at the
start of the Procedure Division. This is done by adding a SERVICE RELOAD identifier statement at the start of the Procedure
Division where the identifier is the first item in the Linkage Section and it includes pointers to all other entries in the
Linkage Section.
- If a locate-mode EXEC CICS statement is included in a program compiled with the OSVS Compiler directive, then a SERVICE RELOAD
statement must follow each such CICS command and the identifier must be the same pointer (BLL-cell reference) used in the
CICS command.
- In a CICS program compiled with the OSVS Compiler directive, any time a reference is made to a Linkage Section which is greater
than 4096 bytes long, a SERVICE RELOAD statement should be made to re-establish addressability to that portion of the data
item greater than 4096 bytes.
- The SERVICE RELOAD statement is documentary only in a program compiled with the VSC2 Compiler directive.