SQLDARD command (X'2411')

The distributed data management (DDM) architecture SQL Descriptor Area Row Description with SQL Communications Area command (SQLDARD) provides metadata information about the columns being retrieved along with the communications area.

Format

Read syntax diagramSkip visual syntax diagramDSSHDRLLCPSQLCARDSQLDHGRPSQLNUMGRPSQLDAGRP

Parameters

DSSHDR
The 6-byte header field containing information about the DSS.
LL
A 2-byte field that has the length of the SQLDARD command.
CP(X'2411')
The 2-byte codepoint of the SQLDARD command.
SQLCARD
SQL Communications Area Row Description
SQLDHGRP
SQL Descriptor Header Group Description (column metadata that applies to all fields in the result set).

Format:

Read syntax diagramSkip visual syntax diagramFLAGSQLDHOLDSQLDRETURNSQLDSCROLLSQLDSENSITIVESQLDFCODESQLDKEYTYPESQLDRDBNAMSQLDSCHEMA_mSQLDSCHEMA_s

Parameters:

FLAG
A 1-byte field that determines if the value for the SQLDHGRP is null. A null indicator is denoted with the value X’FF.
SQLDHOLD
A 2 byte short field. This field can have a value of 0 or 1. A value of 1 indicates this statement is related to a cursor which is defined using the WITH HOLD clause. Otherwise, the value is 0.
SQLDRETURN
A 2-byte short field.
SQLDSCROLL
A 2-byte short field.
SQLDSENSITIVE
A 2-byte short field.
SQLDFCODE
A 2-byte short field.
SQLDKEYTYPE
A 2-byte short field.
SQLDRDBNAM
A variable character string that shows the name of the remote database.
SQLDSCHEMA_m
A variable character string that shows the name of the schema.
SQLDSCHEMA_s
A variable character string that shows the name of the schema.
SQLNUMBRP
SQL Number of Elements Group Descriptions.

Format:

Read syntax diagramSkip visual syntax diagramNumber of Columns

Parameters:

Number of Columns
A 2-byte short that represents the number of columns being returned by the query.
SQLDAGRP
SQL Data Area Group Description (column metadata specific to each column).

Format:

Read syntax diagramSkip visual syntax diagramSQLPRECISIONSQLSCALESQLLENGTHSQLTYPESQLCCSIDSQLDOPTGRP

Parameters:

SQLPRECISION
A 2-byte short field representing the precision for the column.
SQLSCALE
A 2-byte short field representing the scale for the column.
SQLLENGTH
An 8-byte field representing the length of the column in bytes.
SQLTYPE
A 2-byte short field representing the data type of the column.
SQLCCSID
A 2-byte short field representing the CCSID of the column.
SQLDOPTGRP
SQL Descriptor Optional Group Description

Format:

Read syntax diagramSkip visual syntax diagramFLAGSQLUNNAMEDSQLNAME_mSQLNAME_sSQLLABEL_mSQLLABEL_sSQLCOMMENTS_mSQLCOMMENTS_sSQLUDTGRPSQLDXGRP

Parameters:

FLAG
A 1-byte field that determines if the value for the SQLDHGRP is null. A null indicator is denoted with the value X'FF'.
SQLUNNAMED
A 2-byte short field.
SQLNAME_m
A variable character string that shows the column name.
SQLNAME_s
A variable character string that shows the column name.
SQLLABEL_m
A variable character string
SQLLABEL_s
A variable character string
SQLCOMMENTS_m
A variable character string
SQLCOMMENTS_s
A variable character string
SQLUDTGRP:
SQL User-Defined Data Group Description

Format:

Read syntax diagramSkip visual syntax diagramFLAGSQLUDTXTYPESQLUDTRDBSQLUDTSCHEMA_mSQLUDTSCHEMA_sSQLUDTNAME_mSQLUDTNAME_s

Parameters:

FLAG
A 1-byte field that determines if the value for the SQLDHGRP is null. A null indicator is denoted with the value X'FF'.
SQLUDTXTYPE
A 4-byte integer field.
SQLUDTRDB
A variable character string.
SQLUDTSCHEMA_m
A variable character string.
SQLUDTSCHEMA_s
A variable character string.
SQLUDTNAME_m
A variable character string.
SQLUDTNAME_s
A variable character string.
SQLDXGRP
SQL Descriptor Extended Group Description.

Format:

Read syntax diagramSkip visual syntax diagramFLAGSQLXKEYMEMSQLXUPDATEABLESQLXGENERATEDSQLXPARMMODESQLXRDBNAMSQLXCORNAME_mSQLXCORNAME_sSQLXBASENAME_mSQLXBASENAME_sSQLXSCHEMA_mSQLXSCHEMA_sSQLXNAME_mSQLXNAME_s

Parameters:

FLAG
A 1-byte field that determines if the value for the SQLDHGRP is null. A null indicator is denoted with the value X'FF'.
SQLXKEYMEM
A 2-byte short field.
SQLXUPDATEABLE
A 2-byte short field.
SQLXGENERATED
A 2-byte short field.
SQLXPARMMODE
A 2-byte short field.
SQLXRDBNAM
A variable character string that shows the name of the remote database.
SQLXCORNAME_m
A variable character string that shows the name of the table.
SQLXCORNAME_s
A variable character string that shows the name of the table.
SQLXBASENAME_m
A variable character string that shows the name of the table.
SQLXBASENAME_s
A variable character string that shows the name of the table.
SQLXSCHEMA_m
A variable character string that shows the name of the schema.
SQLXSCHEMA_s
A variable character string that shows the name of the schema.
SQLXNAME_m
A variable character string that shows the name of the column.
SQLXNAME_s
A variable character string that shows the name of the column.

SQLDARD examples

The following example shows SQLDARD that is part of the request to an OPNQRY call.

[ibm][ims][drda][t4]        RECEIVE BUFFER: SQLDARD             (ASCII)           (EBCDIC)
[ibm][ims][drda][t4] 0000   0185D0530002017F  2411000000000030  ...S....$......0  .e}...."........
[ibm][ims][drda][t4] 0010   3030303053514C30  3930373000000000  0000SQL09070....  ......<.........
[ibm][ims][drda][t4] 0020   0000000000010000  0040010000000000  .........@......  ......... ......
[ibm][ims][drda][t4] 0030   0000000000202020  2020202020202020  .....             ................
[ibm][ims][drda][t4] 0040   001253414D504C45  2020202020202020  ..SAMPLE          ....(&<.........
[ibm][ims][drda][t4] 0050   2020202000000000  FF00010000000000      ............  ................
[ibm][ims][drda][t4] 0060   0000550000000000  0000000003000000  ..U.............  ................
[ibm][ims][drda][t4] 0070   0000040000000000  0000F10100000000  ................  ..........1.....
[ibm][ims][drda][t4] 0080   000005454D504E4F  0000000000000000  ...EMPNO........  ....(&+|........
[ibm][ims][drda][t4] 0090   0000FF0000000000  0000000000065341  ..............SA  ................
[ibm][ims][drda][t4] 00A0   4D504C450006454D  504D444300000006  MPLE..EMPMDC....  (&<....(&(......
[ibm][ims][drda][t4] 00B0   454D504D44430000  0008524943485452  EMPMDC....RICHTR  .(&(............
[ibm][ims][drda][t4] 00C0   414E00000005454D  504E4F0000000000  AN....EMPNO.....  .+.....(&+|.....
[ibm][ims][drda][t4] 00D0   0004000000000000  00F1010000000000  ................  .........1......
[ibm][ims][drda][t4] 00E0   0004444550540000  0000000000000000  ..DEPT..........  ....&...........
[ibm][ims][drda][t4] 00F0   FF00000000000000  0000000653414D50  ............SAMP  ..............(&
[ibm][ims][drda][t4] 0100   4C450006454D504D  444300000006454D  LE..EMPMDC....EM  <....(&(.......(
[ibm][ims][drda][t4] 0110   504D444300000008  524943485452414E  PMDC....RICHTRAN  &(.............+
[ibm][ims][drda][t4] 0120   0000000444455054  0000000000000400  ....DEPT........  ......&.........
[ibm][ims][drda][t4] 0130   000000000000F101  0000000000000344  ...............D  ......1.........
[ibm][ims][drda][t4] 0140   4956000000000000  00000000FF000000  IV..............  ................
[ibm][ims][drda][t4] 0150   0000000000000006  53414D504C450006  ........SAMPLE..  ..........(&<...
[ibm][ims][drda][t4] 0160   454D504D44430000  0006454D504D4443  EMPMDC....EMPMDC  .(&(.......(&(..
[ibm][ims][drda][t4] 0170   0000000852494348  5452414E00000003  ....RICHTRAN....  ...........+....
[ibm][ims][drda][t4] 0180   4449560000                          DIV..             .....