Data types you can use for DBCS data
You can save DBCS data in your database if you define the columns in which you save the data as character or graphic.
- If the column contains DBCS data strings and SBCS data strings, or if it contains a string with both DBCS and SBCS data, define the column as character.
- If the column contains only DBCS data, define the column as character if the SO and SI delimiters must be saved in the database with the double-byte characters. Otherwise, define the column as graphic.
Standard data types for DBCS data
When surrounded by single-byte, single quotation marks, DBCS data can appear in columns with a character data type. QMF also allows DBCS data strings that are mixed with SBCS data strings. Use this data type if all entries in the column have the same length, up to a maximum of 255 bytes.
QMF can put only DBCS data of a fixed length into columns that are defined with a graphic data type. Use this data type if all entries in the column have the same length, up to a maximum of 127 double-byte characters.
- Variable character
Use this for variable-length entries of up to 32,704 bytes. When surrounded by single-byte, single quotation marks, DBCS data can appear in columns with a variable data type. QMF also allows DBCS data strings that are mixed with SBCS data strings.
- Variable graphic
QMF can put only DBCS data of variable length up to 16,352 DBCS characters into a column that is defined with a VARGRAPHIC data type.
LOB data types
By default, QMF assigns an edit code of M to any columns that contain BLOB, CLOB, or DBCLOB data. The ability to change the edit code for LOB data is controlled by the value of the DSQEC_LOB_RETRV global variable. This global variable can also be set to display LOB data instead of metadata by default.
- For CLOB data, you can specify any edit code that is valid for character data.
- For BLOB data, you can specify B, BW, X, or XW.
- For DBCLOB data, you can specify G or GW.
- For CLOB data, set the column width on FORM.MAIN or FORM.COLUMNS to a value of up to 32767 and specify the CW edit code.
- For BLOB data, set the column width on FORM.MAIN or FORM.COLUMNS to a value of up to 32767 and specify the BW or XW edit code.
- For DBCLOB data, set the column width on FORM.MAIN or FORM.COLUMNS to a value of up to 16383 and specify the GW edit code.
If you are working with LOB data and you receive out-of-storage errors while using an edit code other than M, you can change the edit code to M to clear the error and display the report.
- By default, three-part names cannot be used to access remote tables that contain LOB data. However, you can set the DSQEC_LOB_RETRV global variable to 2 or 3 to access LOB metadata or data with a three-part name. Or, you can use the CONNECT command to connect to the database, and then run the query to access the remote table.
- You can use the EDIT TABLE command to edit a table or a view that contains columns with large-object data types; however, you cannot change columns that have CLOB or DBCLOB data types.
- Large-object data cannot be passed in a parameter on the CALL statement.