IDD edit and code table displays as rows and columns
search cancel

IDD edit and code table displays as rows and columns

book

Article ID: 391834

calendar_today

Updated On: 03-25-2025

Products

IDMS

Issue/Introduction

In IDD, edit and code tables are not displayed in a user-friendly format of rows and columns such as an SQL table would be:

ADD
TABLE NAME IS SMPTCNUM VERSION IS 1
    PUBLIC ACCESS IS ALLOWED FOR ALL
    TYPE IS CODE
    SEARCH IS LINEAR
    ENCODE DATA IS ALPHANUMERIC
    DECODE DATA IS ALPHANUMERIC
    TABLE IS UNSORTED
    VALUES ARE ( 0 ZERO 1 ONE 2 TWO 3 THREE 4 FOUR 5 FIVE 6 SIX 7 SEVEN 8
          EIGHT 9 NINE )
    GENERATE
    .

Is there any way to display the VALUES in a more SQL-like format?

Environment

Release: All supported releases.

Resolution

Assuming the existence of an SQL schema pointing to the dictionary, e.g.

     CREATE SCHEMA APPLDICT
         FOR NONSQL SCHEMA SYSDIRL.IDMSNTWK VERSION 1
             DBNAME APPLDICT
         ;

Something like the following SQL SELECT will generate the values in a SQL-style result table:

SET SESSION CURRENT SCHEMA APPLDICT;
*+ Status = 0        SQLSTATE = 00000
SELECT CAST(SUBSTR(CMT_INFO_084_1,5,34) AS CHAR(8)) AS ENCODED,
       TRIM(SUBSTR(CONCAT(CMT_INFO_084_1,CMT_INFO_084_2),39,62))
         AS DECODED
  FROM "MODULE-067" INNER JOIN "MODCMT-084" ON "MODULE-MODCMT"
 WHERE MOD_NAME_067 = 'SMPTCNUM'
   AND IDD_SEQ_084=0;
*+ 
*+ ENCODED        DECODED
*+ -------        -------
*+ 0              ZERO
*+ 1              ONE
*+ 2              TWO
*+ 3              THREE
*+ 4              FOUR
*+ 5              FIVE
*+ 6              SIX
*+ 7              SEVEN
*+ 8              EIGHT
*+ 9              NINE
*+
*+ 10 rows processed

 

Batch report DREPORT 076 will also list the values in a structure row-by-row format.

SMPTCNUM                         VER    1     LANGUAGE TABLE
    PREPARED BY          XXXXXXX
    PUBLIC ACCESS ALLOWED FOR ALL AUTHORITY
    CODE TABLE   LINEAR SEARCH  NO DUPLICATES ALLOWED    LIST IS VALID         N
              ENCODE ALPHANUMERIC
              DECODE ALPHANUMERIC
         0                                 ZERO
         1                                 ONE
         2                                 TWO
         3                                 THREE
         4                                 FOUR
         5                                 FIVE
         6                                 SIX
         7                                 SEVEN
         8                                 EIGHT
         9                                 NINE