CSLRMUPD: update resources

By issuing the CSLRMUPD request, you can create a resource if it does not exist, or update a resource if it does exist (as long as the version specified matches the version of the resource). A resource can be created or updated with or without client data.

This request is supported in assembler language.

CSLRMUPD syntax

CSLRMUPD DSECT syntax

Use the DSECT function of a CSLRMUPD request to include the following inputs and outputs in your program:

  • Equate (EQU) statements for the length of the CSLRMUPD parameter list
  • The CSLRMUPD return codes, reason codes, and completion codes
  • The CSLRUPDL DSECT to map the input update list
  • The CSLRUPDO DSECT to map the update output
Read syntax diagramSkip visual syntax diagramCSLRMUPD FUNC=DSECT

CSLRMUPD UPDATE syntax

Use the CSLRMUPD request to create or update a uniquely named resource on a resource structure.

Read syntax diagramSkip visual syntax diagramCSLRMUPD FUNC=UPDATE PARM= parm LIST= updlist LISTLEN= updlistlength OUTPUT= output OUTLEN= outputlength ECB= ecb RETNAME= returnname RETTOKEN= returntoken RETCODE= returncode RSNCODE= reasoncode SCITOKEN= scitoken

CSLRMUPD parameters

ECB=symbol
ECB=(r2-r12)
(Optional) - Specifies the address of a z/OS® ECB used for asynchronous requests. When the request is complete, the ECB specified is posted. If an ECB is not specified, the task is suspended until the request is complete. If an ECB is specified, the invoker of the request must issue a WAIT (or equivalent) after receiving control from CSLRM UPD before using or examining any data returned by this request (including the RETCODE and RSNCODE fields).
LIST=symbol
LIST=(r2-r12)
(Required) - Specifies the update resource list built by the caller. Each list entry is a separate update request. The list length can vary, depending upon the number of list entries and whether they contain DATA2.

The CSLRUPDL macro maps the update resource list entry. The list contains a header and one or more list entries. The list entries must reside in contiguous storage. Each update list entry contains the following:

  • Entry length - the update list entry length. The list entry length can vary, depending upon whether DATA2 is specified.
  • Resource name - client-defined name of the resource.
  • Resource type - the resource type is a client-defined physical grouping of resources on the resource structure. Valid values are 1-255.
  • Update options - options that indicate special processing to perform for the update.
  • Version - the resource version, which is the number of times the resource has been updated. The version must match the resource's version for an existing resource for the update to succeed. The version must be zero to create a resource.
  • Owner - owner of the resource.
  • DATA1 - a small piece of client data (fixed length, contained in the adjunct area of a data entry) for the resource to be updated.
  • DATA2 length - DATA2 length, if DATA2 is specified.
  • DATA2 - a large piece of client data (variable length, contained in one or more data elements of a data entry) associated with the resource to be updated. DATA2 is optional. The maximum size of DATA2 is 61312 bytes (X'EF80').
LISTLEN=symbol
LISTLEN=(r2-r12)
(Optional) - Specifies the 4-byte update resource list length. LISTLEN is required if LIST is specified.
OUTLEN=symbol
OUTLEN=(r2-r12)
(Required) - Specifies a 4-byte field to receive the length of the output returned by the CSLRMUPD request. OUTLEN contains the length of the output pointed to by the OUTPUT= parameter.

The output length is zero if no output is built, for example, if an error is detected before any output can be built.

OUTPUT=output
OUTPUT=(r2-r12)
(Required) - Specifies a 4-byte field to receive the address of the variable length output returned by the CSLRMUPD request. The output contains a header and one or more update entries for resource updates that were attempted. The output length is returned in the OUTLEN= field.

The output address is zero if no output was built, for example, if an error was detected before any output could be built.

The CSLRUPDO macro maps the output that is returned. The output contains a header and one or more list entries. The output header contains the following:

  • Eyecatcher
  • Output length
  • CSLRUPDO version
  • Time stamp
  • Resource entry count
  • CSLRUPDO header length (offset to start of entries)
  • Minimum entry length (offset to DATA2)

Each output entry represents a resource update that was attempted. Each entry contains the following:

  • Output entry length - the list entry length can vary, depending upon whether DATA2 is returned.
  • Resource type
  • Name type - the name type is a client-defined value associated with a resource type that ensures uniqueness of client-defined resource names within a name type. Valid values are 1-255.
  • Resource name
  • Version - new resource version, if update succeeded, or the resource version of an existing resource, if the failed because of a version mismatch.
  • Owner - resource owner of an existing resource, if the update failed because of a version mismatch and the option to read the owner was set.
  • DATA1 - a small piece of client data (fixed length, contained in the adjunct area of a data entry) associated with an existing resource, if the update failed because of a version mismatch and the option to read DATA1 was set.
  • DATA2 length - length of large piece of client data associated with an existing resource, if the update failed because of a version mismatch, DATA2 exists, and the option to read DATA2 was set.
  • DATA2 - a large piece of client data (variable length, contained in one or more data elements of a data entry) associated with an existing resource, if the update failed because of a version mismatch, DATA2 exists, and the option to read DATA2 was set. The maximum size of DATA2 is 61312 bytes (X'EF80').
  • Completion code for the update request - completion codes are mapped by CSLRRR. Possible completion codes are:
X'00000000'
Update request succeeded.
X'00000008'
Invalid resource type.
X'00000010'
Version mismatch. Resource already exists and version specified on input did not match.
X'00000014'
Resource already exists as a different resource type.
X'00000018'
Resource type is not registered. The resource type must be registered using a CSLRMREG request.
X'0000001C'
Resource structure is full.
X'00000024'
Resource structure is unavailable.
X'00000038'
Update failed because of CQS internal error.
X'0000003C'
Update failed because RM incorrectly built the CQSUPD list entry.
X'00000040'
Version mismatch. The resource already exists and the version specified on input did not match. The requestor requested that DATA2 be passed back, but RM encountered an error reading DATA2.

The output buffer is not preallocated by the caller. After the request returns it, this word contains the address of a buffer containing the update output. It is the caller's responsibility to release this storage by issuing the CSLSCBFR FUNC=RELEASE request when it is through with the storage. The length of the output is returned in the OUTLEN= field.

PARM=symbol
PARM=(r2-r12)
(Required) - Specifies the CSLRMUPD parameter list. The length of the parameter list must be equal to the parameter list length EQU value defined by RUPD_PARMLN.
RETCODE=symbol
RETCODE=(r2-r12)
(Required) - specifies a 4-byte field to receive the return code on output. RM return codes are defined in CSLRRR. SCI return codes are defined in CSLSRR. Possible return codes are described in the following table.
RETNAME=symbol
RETNAME=(r2-r12)
(Optional) - Specifies an 8-byte field to receive the RM name returned to the caller. This is the CSL member name of the target RM address space to which SCI sent the request.
RETTOKEN=symbol
RETTOKEN=(r2-r12)
(Optional) - Specifies a 16-byte field to receive RM's SCI token returned to the caller. This is the SCI token for the target RM address space to which SCI sent the request.
RSNCODE=symbol
RSNCODE=(r2-r12)
(Required) - Specifies a 4-byte field to receive the reason code on output. RM reason codes are defined in CSLRRR. SCI reason codes are defined in CSLSRR. Possible reason codes are described in the following table.
SCITOKEN=symbol
SCITOKEN=(r2-r12)
(Required) - Specifies a 16-byte field containing the SCI token. This token uniquely identifies this connection to SCI. The SCI token was returned by a successful CSLSCREG FUNC=REGISTER request.

CSLRMUPD return and reason codes

The following table lists the return and reason codes that can be returned on a CSLRMUPD request. Also included is the meaning of a reason code (that is, what possibly caused it).

Table 1. CSLRMUPD return and reason codes
Return code Reason code Meaning
X'00000000' X'00000000' The request completed successfully.
X'03000008' X'00002000' The client is not registered.
  X'00002100' The update-list length is invalid.
  X'00002108' The update-list address is invalid.
  X'0000210C' One of the list entries contains one of the following invalid list entry lengths:
  • Zero length
  • Smaller than the minimum list entry length
  • Beyond the end of the list passed in
  • Not on a fullword boundary
RM assumes that the rest of the list is invalid.
  X'00002110' The list version in the list header (UPDL_PVER) is zero, which is invalid. The list version must be set in the list header to the maximum list version (UPDL_PVERMAX).
  X'00002114' The list header length cannot be zero or greater than the list length that was passed in. The list header length (UPDL_HDRLEN) must be set in the list header to be the list header length.
  X'00002200' One of the list entries contains an invalid resource type, such as zero. RM assumes the rest of the list is invalid.
  X'0000220C' One of the entries in the list contains one or more invalid update options. RM assumes the rest of the list is invalid.
  X'00002404' No resource structure is defined.
X'0300000C' X'00003000' The request succeeded for at least one list entry, but not all. Check the completion code in each list entry in the OUTPUT buffer for individual errors.
  X'00003004' The request failed for all entries. Check the completion code in each list entry in the OUTPUT buffer for individual errors.
  X'00003008' The request failed for one or more list entries and all failures were version mismatches. Check the completion code in each list entry in the OUTPUT buffer for individual errors.
X'03000010' X'00004000' The CQS address space is unavailable. Retry the request to attempt routing the request to another RM with an available CQS.
  X'00004100' The requested version is not supported. The client compiled with a version of CSLRMUPD that is not supported by RM. All RMs must be migrated to a new release before IMS is migrated to a new release that uses a new CSLRMUPD function.
  X'00004104' The list version is not supported. The client created the update list at a version level that is not supported by RM. All RMs must be migrated to a new release before the client is migrated to a new release that uses a new CSLRMUPD function.
X'03000014' X'00005000' Storage allocation for the output buffer failed. The resource updates might or might not have succeeded.
  X'00005100'

Storage allocation for CQSUPD buffer failed.

  X'00005200'

CQS request resulted in unexpected error.

  X'00005204' The CQS request failed because RM incorrectly built the request input.