Oglas
Oglas
DELAY
fields. This option applies to 3270 devices only. When this option is specified, the contents of all structured fields must be handled by the application program. (Structured fields are described in the
3270 Data Stream Programmer’s
Reference
..)
CTLCHAR and ERASE are mutually exclusive with STRFIELD, and their use with STRFIELD generates an error message.
TOFLENGTH(
data-area
)
is a fullword alternative to TOLENGTH(data-area).
TOLENGTH(
data-area
)
specifies as a halfword binary value the length of the data to be received. If you specify INTO, but omit MAXLENGTH, this specifies the maximum length that the program accepts. If the value is less than zero, zero is assumed. If the length of data exceeds the value specified, but NOTRUNCATE is omitted, the data is truncated to that value, and the LENGERR condition occurs. When the data is received, the data area is set to the length of the data. If you specify the
SET option, the argument must be a data area. When the data has been received, the data area is set to the length of the data.
For a description of a safe upper limit, see “LENGTH options” on page 312.
Exception Conditions
EOC
occurs when no other condition is raised. The EIBEOC field also contains this indicator.
Default action: Ignore the condition.
INVREQ
RESP2 values:
200
The command is issued in a DPL server program.
Default action: Terminate the task abnormally.
LENGERR
occurs in any of the following situations: v
Received data is discarded by CICS because its length exceeds the maximum that the program accepts (see the TOLENGTH, TOFLENGTH,
MAXLENGTH, and MAXFLENGTH options), and the NOTRUNCATE option is not specified. v
An out-of-range value is supplied in the FROMLENGTH, FROMFLENGTH,
MAXLENGTH, MAXFLENGTH, TOLENGTH, or TOFLENGTH option.
Default action: Terminate the task abnormally.
TERMERR
occurs if there is a terminal-related error.
Default action: Terminate the task abnormally (with abend code ATNI).
Delay the processing of a task.
Chapter 32. Application programming commands - reference
341
INTERVAL
DELAY
INTERVAL
TIME (
(
0
)
(
hhmmss hhmmss
)
) REQID (
name
)
FOR HOURS
MINUTES
(
SECONDS
(
data-value data-value
)
(
data-value
)
)
UNTIL HOURS
MINUTES
(
SECONDS
(
data-value data-value
)
(
data-value
)
)
Conditions:
EXPIRED, INVREQ
Description
DELAY suspends the processing of the issuing task for a specified interval of time or until a specified time of day. It supersedes any previously initiated POST command for the task.
See Chapter 18, “Interval control,” on page 193 for more information.
Options
FOR
together with one or more of the HOURS, MINUTES, and SECONDS options, specifies the interval of time for which the task processing is to be suspended.
HOURS(
data-value
)
specifies as a fullword binary value the number of hours for use in conjunction with FOR or UNTIL. The value must be in the range 0 through 99.
INTERVAL(
hhmmss
)
specifies the interval of time that is to elapse from the time at which the
DELAY command is issued until processing is resumed. The specified interval is added to the current clock time by CICS to calculate the expiration time. See
Chapter 18, “Interval control,” on page 193 for an explanation of how
expiration times are used with interval control.
INTERVAL(0) is the default. The maximum permitted INTERVAL value is
995959.
For compatibility between CICS platforms, it is recommended that the
INTERVAL option is not used in ILE C programs. You should use the FOR option instead.
MINUTES(
data-value
)
specifies as a fullword binary value the number of minutes for use in conjunction with FOR or UNTIL. The value must be in the range 0 through 59 if HOURS or SECONDS is also specified, or in the range 0 through 5999 otherwise.
REQID(
name
)
specifies a name that uniquely identifies the DELAY command. The name can be up to 8 characters long. This name is used as a temporary storage identifier.
342
CICS for iSeries Application Programming Guide V5
This option can be used when another task is to be provided with the capability of canceling an unexpired DELAY command.
SECONDS(
data-value
)
specifies as a fullword binary value the number of seconds for use in conjunction with FOR or UNTIL. The value must be in the range 0 through 59 if HOURS or MINUTES is also specified, or in the range 0 through 359999 otherwise.
TIME(
hhmmss
)
specifies the time at which the task is to resume processing. See Chapter 18,
“Interval control,” on page 193 for an explanation of how expiration times are
used within interval control.
For compatibility between CICS platforms, it is recommended that the
INTERVAL option is not used in ILE C programs. You should use the UNTIL option instead.
UNTIL
together with one or more of the HOURS, MINUTES, and SECONDS options, specifies the time at which the task is to resume processing.
Exception Conditions
EXPIRED
occurs if the time specified has already expired when the command is issued.
Default action: Ignore the condition.
INVREQ
RESP2 values: v
4
5
6
v
The DELAY command is not valid for processing by CICS.
Hours are out of range.
Minutes are out of range.
Seconds are out of range.
The DELAY command specifies a REQID name that already exists.
Default action: Terminate the task abnormally.
Examples
The following example shows how to suspend the processing of a task for five minutes, using the INTERVAL option:
EXEC CICS DELAY
INTERVAL(500)
The following example shows how to suspend the processing of a task until 12:45, using the TIME option:
Chapter 32. Application programming commands - reference
343
Preuzimanje
Oglas