Reklama
Reklama
EXEC CICS DELAY
TIME(124500)
ILE C supports the packed decimal argument type and, consequently, the use of the INTERVAL and TIME options. It is recommended, however, that you use the
FOR and UNTIL options for portability of applications between CICS platforms.
There are two ways to enter the interval or time value using FOR or UNTIL:
1. A combination of at least two of HOURS(0–99), MINUTES(0–59), and
SECONDS(0–59). For example, HOURS(1) SECONDS(3) means one hour and three seconds (the minutes default to zero).
2.
Any one of HOURS(0–99), MINUTES(0–5999), or SECONDS(0–359999). For example, HOURS(1) means one hour; MINUTES(62) means one hour and two minutes; and SECONDS(3723) means one hour, two minutes, and three seconds.
The following example shows how to suspend the processing of a task for five minutes, using the FOR option:
EXEC CICS DELAY
The following example shows how to suspend the processing of a task until 12:45, using the UNTIL option:
EXEC CICS DELAY
UNTIL HOURS(12) MINUTES(45)
DELETE
Delete a record.
(1)
DELETE FILE (
name
)
SYSID (
name
)
RIDFLD (
data-area
)
KEYLENGTH
GENERIC
(
data-value
NUMREC (
)
data-area
RRN
)
Notes:
1
DATASET is also accepted, but FILE is the preferred term (see “DATASET option” on page 311).
344
CICS for iSeries Application Programming Guide V5
Conditions:
DISABLED, DUPKEY, FILENOTFOUND, ILLOGIC, INVREQ, IOERR,
ISCINVREQ, NOTAUTH, NOTFND, NOTOPEN, SYSIDERR
Description
DELETE deletes a record from a file that refers to a KSDS, a path over a KSDS, or an RRDS. (Records cannot be deleted from an ESDS.) The file may be on a local or a remote system. You identify, in the RIDFLD option, the specific record to be deleted.
You can delete a group of records in a similar way with a single invocation of this command, except that you identify the group by the GENERIC option.
You can also use a different form of this command to delete a single record that has previously been retrieved for update (by a READ UPDATE command). The record is deleted, instead of being rewritten, by this command. In this case, you must not specify the RIDFLD option.
Refer to Chapter 10, “File control,” on page 115 for more information.
Options
FILE(
name
)
specifies the name of the file to be accessed. The name must be alphanumeric, up to 8 characters long, and must have been defined in the file control table
(FCT) unless the SYSID option specifies a remote system.
If a nonlocal SYSID is specified, the underlying file is assumed to be on a remote system irrespective of whether the name is defined in the local FCT.
Otherwise, the FCT entry is used to determine whether the underlying file is on a local or a remote system.
GENERIC
specifies that the search key is a generic key with a length specified in the
KEYLENGTH option. The GENERIC option may only be used with a KSDS or a path over a KSDS. The search for a record is satisfied when a record is found with a key that has the same starting characters (generic key) as those specified.
KEYLENGTH(
data-value
)
specifies as a halfword binary value the length of the key supplied in the
RIDFLD option. If a specified KEYLENGTH value differs from the length defined for the underlying file and the operation is not generic, the INVREQ condition occurs.
INVREQ also occurs if you specify GENERIC, and the KEYLENGTH value is not less than that defined for the file.
Note:
If you specify GENERIC and KEYLENGTH(0), CICS/400 deletes all the records from the file.
NUMREC(
data-area
)
specifies a halfword binary data area that CICS sets to the number of records that have been deleted.
RIDFLD(
data-area
)
specifies the record identification field. The contents can be a key or a relative record number. For a relative record number, the format of this field must be fullword binary and the RIDFLD can be greater than or equal to 1.
Chapter 32. Application programming commands - reference
345
RRN
specifies that the record identification field specified in the RIDFLD option contains a relative record number. Use this option only when deleting records from an RRDS.
SYSID(
name
)
specifies the name of the system to which the request is directed. The name can be up to 4 characters long.
If you specify SYSID, and omit RRN, you must also specify KEYLENGTH; it cannot be found in the FCT.
Exception Conditions
Note:
RESP2 values are not set for files that are on remote systems.
DISABLED
RESP2 values:
50
A file is disabled.
A file may be disabled because: v It was initially defined as disabled and has not since been enabled. v
It has been disabled by an EXEC CICS SET FILE command. v It has been disabled by the CEMT transaction.
This condition cannot occur when deleting a record just read for update.
Default action: Terminate the task abnormally.
DUPKEY
RESP2 values:
140
A record is deleted from a VSAM emulated file that allows duplicate keys, and another record with the same key exists.
Default action: Terminate the task abnormally.
FILENOTFOUND
RESP2 values:
1
The name specified in the FILE option cannot be found in the FCT.
Default action: Terminate the task abnormally.
ILLOGIC
RESP2 values:
110
There is an error that does not fall within one of the other CICS response categories. (Further information is available in the EIBRCODE
field; refer to Appendix A, “EXEC interface block,” on page 529 for
details.)
Default action: Terminate the task abnormally.
INVREQ
RESP2 values:
20
Delete operations are not allowed according to the file entry specification in the FCT.
21
A DELETE command is issued for a file referring to an ESDS.
346
CICS for iSeries Application Programming Guide V5
22
25
26
31
32
42
A generic delete is issued for a file that is not a KSDS.
The KEYLENGTH and GENERIC options are specified, and the length specified in the KEYLENGTH option is greater than or equal to the length of a full key.
The KEYLENGTH option is specified (but the GENERIC option is not specified), and the specified length differs from the length defined for the file.
A DELETE command without the RIDFLD option is issued for a file for which no previous READ UPDATE command has been issued.
A DELETE command with the RIDFLD option specified is issued for a file when a READ UPDATE command is outstanding.
The KEYLENGTH and GENERIC options are specified, and the length specified in the KEYLENGTH option is less than zero.
Default action: Terminate the task abnormally.
IOERR
RESP2 values:
120
There is an I/O error during the file control operation. An I/O error is any unusual event that is not covered by a CICS exception condition.
(Further information is available in the EIBRCODE field; refer to
Appendix A, “EXEC interface block,” on page 529 for details.)
Default action: Terminate the task abnormally.
ISCINVREQ
RESP2 values:
70
The remote system indicates a failure that does not correspond to a known condition.
Default action: Terminate the task abnormally.
NOTAUTH
RESP2 values:
101
A resource security check has failed on FILE(
name
).
Default action: Terminate the task abnormally.
NOTFND
RESP2 values:
80
An attempt to delete a record based on the search argument provided is unsuccessful.
Default action: Terminate the task abnormally.
NOTOPEN
RESP2 values:
60
One of the following has occurred: v
The requested file is CLOSED and UNENABLED. The CLOSED,
UNENABLED state is reached after a close request has been received against an OPEN ENABLED file and the file is no longer in use.
Chapter 32. Application programming commands - reference
347
Stáhnout
Reklama