OSVSVSC2 

The SERVICE Statement

The SERVICE statement is used to establish addressability to Linkage Section items usually in a CICS program.

General Format


The SERVICE Statement

Syntax Rules

  1. SERVICE LABEL is generated by the mainframe CICS preprocessor to indicate control flow. It is not intended for general use.
  2. The SERVICE LABEL statement can appear only in the Procedure Division, not in the Declaratives Section.
  3. 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

  1. At the statement following the SERVICE LABEL statement, all registers that can no longer be valid are reloaded.
  2. 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.
  3. 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.
  4. 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.
  5. The SERVICE RELOAD statement is documentary only in a program compiled with the VSC2 Compiler directive.