EXCSQLIMM command (X'200A')
The distributed data management (DDM) architecture EXCSQLIMM command executes an insert, update, or delete operation on an IMS database.
Format
DLI Flow:
Parameters
- DSSHDR
- The 6-byte header that contains information about the data stream structure (DSS).
- LL
- The length specified as a 2-byte binary integer. This length includes LL and CP.
- CP
- X'200A', the 2-byte code point of the EXCSQLIMM command.
- QRYINSID
- An 8-byte query instance identifier. Restriction: This parameter is required if the EXCSQLIMM command is operating on a positioned delete/update SQL statement and more than one query instance exists for the section associated with the query.
- PCBNAME
A required parameter that specifies the PCB name that uniquely identifies the query made by a DL/I call. The PCB name is specified as a character string. The value is initially sent with the original OPNQRY command. The same value must subsequently be sent in commands such as CNTQRY, CLSQRY, and RLSE for proper correlation with the original OPNQRY call. The codepoint for the PCBNAME parameter is X'C907'.
- PKGNAMCSN(X'2113')
- Specifies the fully qualified package name, consistency token,
and section number within the package that is used to execute the
SQL. The PKGNAMCSN can have one of the following formats, depending
on the length of the RDBNAM, RDBCOLID, and PKGID contained therein:
- RDBNAM, RDBCOLID, and PKGID each have a length of 18. This format of the PKGNAMCSN is identical to the sole format used before DDM Level 7, where the length is fixed at 68. The use of the SCLDTALEN is disallowed with this format.
- At least one of RDBNAM, RDBCOLID, or PKGID has a length > 18. This format of the PKGNAMCSN requires the SCLDTALEN precedes each of the RDBNAM, RDBCOLID, and PKGID. With this format, the PKGNAMCSN has a minimum length of 75 and a maximum length of 785.
Format:
Parameters:
- RDBNAM
- An 18- to 255-byte character field that represents the relational database name.
- PKGID
- An 18- to 255-byte character field that represents the relational database package identifier.
- PKGNAM
- An 18- to 255-byte character field that specifies the fully qualified name of a relational database package.
- PKGCNSTKN
- An 8-byte character field that verifies that the requester’s application and the relational database package are synchronized. Mutually exclusive with PKGSN.
- PKGSN
- A 2-byte short field that represents the Section Number. Mutually exclusive with PKGCNSTKN.
- SCLDTALEN
- Specifies the length of the instance variable that immediately
follows:
- RDB collection identifier (RDBCOLID)
- Relational database name (RDBNAM)
- RDB package identifier (PKGID)
- RDBCOLID
- An 18- to 255-byte character field that identifies a unique collection of objects that are contained in a relational database. It is used for user-defined grouping.
Note: If the length of any one of RDBNAM, RDBCOLID, or PKGID exceeds 18 bytes, the SCLDTALEN is mandatory and must precede the RDBCOLID. Otherwise, the SCLDTALEN is disallowed. - RDBCMTOK
- An optional parameter (X'2105') that specifies whether the database
allows the processing of commit and rollback operations. Set the value
to X'F1' (TRUE), which indicates that the database does allow commit
and rollback processing.Note: IMS Universal drivers always send a value of TRUE.
- RTNSETSTT(X'210E')
- If any special register setting was modified during command execution, the return SET statement controls whether the target server must return one or more SQLSTT reply data objects upon successful command processing. Each SQLSTT reply data object contains an SQL SET statement for a special register whose setting was modified on the current connection.
- MONITOR(X'1900')
- FLAGS
- A 4-byte flag value.
Usage
The DDM command EXCSQLIMM (execute immediate SQL) executes a replace, insert, or delete operation on an IMS database.
If no errors occur during the processing of the EXCSQLIMM command, the IMS target server returns the database update reply message RDBUPDRM (X'2218').
Chained command objects
The following command objects can be chained to the EXCSQLIMM command:
- INAIB (X'CC01')
- Contains AIB data. If the DLIFUNC value is either DELETE or UPDATE, the AIB parameter is required.
- DLIFUNC (X'CC05')
- The DL/I call to execute on the database. The DL/I call is specified as a character string and defines the action to perform on the database. For a description of the possible values for DLIFUNC, see the description of DLIFUNC.
- FLDENTRY (X'CC03')
- If DLIFUNC is set to ISRT, REPL, or UPDATE, the FLDENTRY parameter is required.
- SSALIST (X'CC06')
- Lists the segment search arguments. If DLIFUNC is set to UPDATE or DELETE, the SSALIST parameter is required. If DLIFUNC is set to DLET, ISRT, or REPL, the SSALIST parameter is optional.
Positive reply messages
In response to the EXCSQLIMM command, the IMS target DDM server returns to the source server the following positive reply message:
- RDBUPDRM (X'2218')
- Database update reply message.
Reply data objects
No reply data objects are returned in response to the EXCSQLIMM command.
Error reply messages
In response to the EXCSQLIMM command, the IMS target DDM server can return to the source DDM server the following error reply messages:
| Code point of reply message | Name of reply message | Meaning of reply message |
|---|---|---|
| X'121C' | CMDATHRM | Not Authorized to Command |
| X'1232' | AGNPRMRM | Permanent agent error |
| X'1233' | RSCLMTRM | Resource limits reached |
| X'1245' | PRCCNVRM | Conversational protocol error |
| X'124C' | SYNTAXRM | Data stream syntax error |
| X'1250' | CMDNSPRM | Command not supported |
| X'1251' | PRMNSPRM | Parameter not supported |
| X'1252' | VALNSPRM | Parameter value not supported |
| X'1253' | OBJNSPRM | Object not supported |
| X'1254' | CMDCHKRM | Command check reply message |
| X'125F' | TRGNSPRM | Target not supported |
| X'2204' | RDBNACRM | Database not accessed |
| X'220D' | ABNUOWRM | Abnormal end of unit of work condition |
| X'220E' | DTAMCHRM | Data Descriptor Mismatch |
| X'2213' | SQLERRRM | SQL error condition |
| X'2225' | CMMRQSRM | Commitment request |
EXCSQLIMM examples
The following example shows EXCSQLIMM that is part of the request to an OPNQRY call.
[ibm][ims][drda][t4] SEND BUFFER: EXCSQLIMM (ASCII) (EBCDIC)
[ibm][ims][drda][t4] 0000 0060D0510002005A 200A00442113E2C1 .`.Q...Z ..D!... .-}....!......SA
[ibm][ims][drda][t4] 0010 D4D7D3C540404040 4040404040404040 ....@@@@@@@@@@@@ MPLE
[ibm][ims][drda][t4] 0020 D5E4D3D3C9C44040 4040404040404040 ......@@@@@@@@@@ NULLID
[ibm][ims][drda][t4] 0030 4040E2E8E2E2C8F2 F0F0404040404040 @@........@@@@@@ SYSSH200
[ibm][ims][drda][t4] 0040 404040405359534C 564C303100410005 @@@@SYSLVL01.A.. ...<.<......
[ibm][ims][drda][t4] 0050 2105F10005210E01 0008190080000000 !....!.......... ..1.............