DELETE
Delete resource table records.
Description
This command deletes one or more resource
table records from a result set.
- The DELETE command always begins processing with the last record that was fetched, rather than the next one in the result set.
- The records you delete are marked as deleted, but they retain their positions in the result set. The remaining records also retain their positions; they are not renumbered. Any API commands that you issue after a DELETE command skip over the deleted records in a result set. One exception is the ORDER command, which sorts all the records in a result set, including deleted records. If you try to issue a command against a deleted record, you receive a RESPONSE value of NODATA.
- To remove deleted records and compress a result set, you can copy the remaining records to a new
result set. Use the COPY command with the ALL option to copy all the records in a
result set except those that have been deleted. Note: Deleted records are also removed and the remaining records renumbered when you issue a REFRESH command.
Related commands
- COPY
- DISCARD
- GET
- GROUP
- LOCATE
- MARK
- ORDER
- PERFORM OBJECT
- REFRESH
- SPECIFY FILTER
Options
- ALL
- Deletes all the resource table records in the result set.
- COUNT(data-ref)
- Names a variable to receive the number of resource table records in the result set after the delete process is complete.
- CURRENT
- Deletes only the current resource table record in the result set. Note: The record pointer remains positioned on the deleted record. If you issue another API command with the CURRENT option before repositioning the pointer, you receive a RESPONSE value of NODATA.
- FILTER(cpsm-token)
- Identifies a filter to be used for this operation. The FILTER option deletes only those resource
table records that meet the specified filter criteria.
The cpsm-token value that identifies a filter is returned by the SPECIFY FILTER command.
- MARKED
- Deletes only those resource table records that are marked in the result set. You can mark resource table records by using the MARK and UNMARK commands.
- NOTFILTER(cpsm-token)
- Identifies a filter to be used for this operation. The NOTFILTER option deletes only those
resource table records that do not meet the specified filter criteria.
The cpsm-token value that identifies a filter is returned by the SPECIFY FILTER command.
- NOTMARKED
- Deletes only those resource table records that are not marked in the result set. You can mark resource table records by using the MARK and UNMARK commands.
- REASON(data-ref)
- Names a variable to receive the fullword reason value returned by this command.
- RESPONSE(data-ref)
- Names a variable to receive the fullword response value returned by this command.
- RESULT(cpsm-token)
- Identifies the API result set to be processed by this operation. The result
set can be one produced by any of these commands:
- COPY
- GET
- GROUP
- PERFORM OBJECT
- THREAD(cpsm-token)
- Identifies the API thread to be used for this operation. The cpsm-token value that identifies a thread is returned by the CONNECT command.
Conditions
The following is a list of the RESPONSE values that can be returned by the
DELETE command. The description of each RESPONSE includes a list of associated
REASON values, if appropriate.
- 1024 OK
- The command completed processing successfully.
- 1027 NODATA
- No records were found that matched the specified search criteria.
- 1028 INVALIDPARM
- An invalid parameter was detected. The parameter that is invalid is returned as the reason
value:
- 1280 THREAD
- 1283 RESULT
- 1286 FILTER
- 1287 NOTFILTER
Check the command description for valid parameter syntax.
- 1029 FAILED
- The command failed for one of the following reasons:
- 1331 ABENDED
- Command processing abended.
- 1359 EXCEPTION
- Command processing encountered an exceptional condition.
- 1030 ENVIRONERROR
- An environment error occurred for one of the following reasons:
- 1320 SOLRESOURCE
- A required resource that is locally owned (that is, owned by the address space where the processing thread is running) is not available.
- 1321 SOCRESOURCE
- A required resource that is owned by the CMAS is not available.
- 1357 NOSTORAGE
- The application stub program could not obtain the necessary storage in the address space where the processing thread is running.
- 1358 NOSERVICE
- The application stub program could not load the API service module.
- 1032 BUSY
- A busy condition occurred for the following reason:
- 1283 RESULT
- The result set specified on the RESULT option is being processed by another command.
- 1033 SERVERGONE
- The CMAS to which the processing thread was connected is no longer active.
- 1034 NOTAVAILABLE
- A not available condition occurred for one of the following reasons:
- 1334 CPSMAPI
- The CMAS to which the processing thread is connected is not available for API processing.
- 1340 APITASK
- The API control subtask is not active.
- 1035 VERSIONINVL
- A version conflict occurred for one of the following reasons:
- 1335 NOTSUPPORTED
- The version of the application stub program used for this command is not supported.
- 1336 NOTVSNCONN
- The version of the application stub program used for this command is not the same as the version used with the CONNECT command.
