ROLL command

The Roll (ROLL) command is used to dynamically back out changes. You cannot use this command in a CICS® program;

Format

Read syntax diagramSkip visual syntax diagramEXECDLIROLL

Options

No options are allowed with the ROLL command.

Usage

When a batch program determines that some of its processing is invalid, two commands make it possible for the program to remove the effects of its inaccurate processing. These are the rollback commands, ROLL and ROLB.

You can use ROLL in batch programs.

Issuing the ROLL causes CICS and DL/I to back out any changes your program has made to the database since its last checkpoint, or since the beginning of the program provided your program has not issued a checkpoint. When you issue a ROLL command, DL/I terminates your program after backing out the updates.

Example

EXEC DLI ROLL;
Explanation

This example shows how to dynamically back out changes with the ROLL command.

If you use the ROLL command, IMS terminates the program with user abend code U0778. This type of abnormal termination does not produce a storage dump.

Restrictions

Restrictions for the ROLL command:

  • You cannot use this command in a CICS program.
  • You must first define an I/O PCB for your program before you can use this command.
  • You cannot reestablish position in the midst of nonunique keys or nonkeyed segments.
  • You cannot use this command when the system log is stored on direct access storage and dynamic backout has been specified. You must also specify BKO=Y in the parm field of your JCL when you execute the program.