Db2 long identifier consideration (Code Debug CICS COBOL)
Related Topics
IBM Db2 UDB V8 for z/OS introduced many changes to the Db2 product, including the introduction of long identifier fields in Db2 V8 New Function Mode (NFM). The identifier lengths that affect the Code Debug CICS Db2 File Utility are as follows:
- The permissible length of the table creator name has increased from 8 to 128 bytes.
- The permissible length of the table/view name has increased from 18 to 128 bytes.
- The permissible length of the column name has increased from 18 to 30 bytes.
The Code Debug CICS Db2 File Utility provides all of the functionality of the previous releases of the Db2 File Utility, including support for Db2 and long identifiers. Because of screen limitations, however, the maximum display sizes for the creator, table name, and column name fields are limited to 8, 18, and 18 bytes respectively in Code Debug CICS. If a Db2 field exceeds these lengths, the field is truncated for display (only), and a plus character “+” is appended to the right of that field. For example, a creator name of CREATOR_NAME_IS_LONGER_THAN_V7 is truncated to 8 bytes and displayed as CREATOR_+, a table name of TABLE_NAME_IS_LONGER_THAN_V7 is truncated to 18 bytes and displayed as TABLE_NAME_IS_LONG+, and a column name of COLUMN_IS_LONGER_THAN_V7 is truncated to 18 bytes and displayed as COLUMN_IS_LONGER_T+. The full length of these fields is only displayed on the DB2 BROWSE GENERATED SQL CALL (5.5.3) screen.
Following are examples of three Db2 File Utility screens showing the result of displaying the Db2 long identifiers in the File Utility.
Following figure shows an example of the DB2 TABLE/VIEW LIST (5.5.1) screen. In the first row of this display the long creator ABCDEF_LONG_CREATOR_TEST has been truncated and is displayed as eight bytes ABCDEF_L and a plus sign (+) is appended to the right of the field. Likewise the table name of LONG_TABLE_NAME_FOR__TESTING_DCLGEN has been truncated to eighteen bytes and a plus sign appended.
DB2 Table/View List
COMMAND ===> SCROLL ===> CSR
MODULE: CSECT:
ROW 1 OF 90
LIMIT LIST TO: CREATOR: * TABLE/VIEW: * TYPE: *
DATABASE: * TABLESPACE: *
LINE COMMANDS: Q (SQL Easy Query) S (Select)
CMD CREATOR TABLE/VIEW NAME TYPE DATABASE TABLESPACE
--- -------- ------------------ ----- -------- ----------
_ ABCDEF_L+ LONG_TABLE_NAME_FO+ TABLE DBJAGTST DBJAGTST
_ ABCDEF_L+ LONG_TABLE_NAME_FO+ TABLE DBJAGTST DBJAGTST
_ ABCDEF_L+ LONG_TABLE_NAME_FO+ TABLE DBJAGTST DBJAGTST
_ ACMEJET0 AGEGROUP TABLE DJSMQTDB TSM00001
_ ACMEJET0 CITY TABLE DJSMQTDB TSM00001
_ ACMEJET0 CUSTOMER TABLE DJSMQTDB TSM00001
Typing a Q in the command field of the first row and pressing Enter causes the DB2 BUILD SQL EASY QUERY (5.5.2) screen in following figure to be displayed. In the heading both the CREATOR: and TABLE: data has been truncated for display and a plus sign has been appended to the right of each field. The long column name OBJS_RELATE_LONGER_CL_NAME has been truncated to eighteen bytes and a plus sign has been appended to the right of the field.
DB2 Build SQL Easy Query
COMMAND ===> SCROLL ===> CSR
MODULE: CSECT:
VALID COMMANDS: SHOW RESULT/SQL CHECK RESET END
CREATOR: ABCDEF_L+ TABLE: LONG_TABLE_NAME_FO+ ROW 1 OF 8
POSITION 1 OF 254
LINE COMMANDS: A (After) B (Before) M/MM (Move) S/SS (Select) X/XX (eXclude)
ORDER-BY WHERE CLAUSE
CMD COLUMN NAME ATTRIBUTES SEQ A/D VALUES AND OPERATORS
--------------------- --------------- --- --- ----+---10----+---20----+---30->
__ OBJS_ID CHAR(8) __ _
__ OBJS_RELATE_LONGER+ CHAR(16) __ _
__ OBJS_TYPE CHAR(2) __ _
__ OBJS_DBNAME CHAR(8) __ _
__ OBJS_TSNAME CHAR(8) __ _
__ OBJS_CREATOR_LONGE+ VARCHAR(228) __ _
__ OBJS_NAME VARCHAR(128) __ _
__ OBJS_RELNAME VARCHAR(128) __ _
Entering the primary command SHOW SQL, typing an S in the command field for the column name OBJS_RELATE_LONGER, and pressing Enter causes the DB2 BROWSE GENERATED SQL CALL (5.5.3) screen in following figure to be displayed. Notice on this screen that the full lengths of the creator, table name, and column are displayed in the generated SQL call.
DB2 Browse Generated SQL Call
COMMAND ===> SCROLL ===> CSR
MODULE: CSECT:
VALID COMMANDS: SHOW RESULT/SQL CHECK RESET END
CREATOR: ABCDEF_L+ TABLE: LONG_TABLE_NAME_FO+ ROW 1 OF 8
POSITION 1 OF 254
LINE COMMANDS: A (After) B (Before) M/MM (Move) S/SS (Select) X/XX (eXclude)
ORDER-BY WHERE CLAUSE
CMD COLUMN NAME ATTRIBUTES SEQ A/D VALUES AND OPERATORS
--------------------- --------------- --- --- ----+---10----+---20----+---30->
__ OBJS_ID CHAR(8) __ _
__ OBJS_RELATE_LONGER+ CHAR(16) __ _
__ OBJS_TYPE CHAR(2) __ _
__ OBJS_DBNAME CHAR(8) __ _
__ OBJS_TSNAME CHAR(8) __ _
__ OBJS_CREATOR_LONGE+ VARCHAR(228) __ _
__ OBJS_NAME VARCHAR(128) __ _
__ OBJS_RELNAME VARCHAR(128) __ _