Space announcement This documentation space provides the same content as before, but the organization of the content has changed. The content is now organized based on logical branches instead of legacy book titles. We hope that the new structure will help you quickly find the content that you need.

Accessing a List of Db2 Tables


  1. Type =5.5.1 in the COMMAND field of any Code Debug CICS screen and press Enter to transfer to the following figure.

DB2 Table/View List Screen (5.5.1)

------------------------------- DB2 TABLE/VIEW LIST (5.5.1) ---------------C024
COMMAND ===>                                                   SCROLL ===> CSR
 MODULE:          CSECT:

                                                            ROW   177 OF 494

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
---   --------   ------------------   -----   --------   ----------
 _    DSN8230    TOPTVAL              TABLE   DSN8D23P   DSN8S23C
  _    DSN8230    VACT                 VIEW    DSN8D23A   ACT
  _    DSN8230    VASTRDE1             VIEW    DSNDB06    SYSVIEWS
  _    DSN8230    VASTRDE2             VIEW    DSN8D23A   DSN8S23E
  _    DSN8230    VCONA                VIEW    DSN8D23P   DSN8S23C
  _    DSN8230    VDEPMG1              VIEW    DSN8D23A   DSN8S23D
  _    DSN8230    VDEPT                VIEW    DSN8D23A   DSN8S23D
  _    DSN8230    VDSPTXT              VIEW    DSN8D23P   DSN8S23C
  _    DSN8230    VEMP                 VIEW    DSN8D23A   DSN8S23E
  _    DSN8230    VEMPLP               VIEW    DSN8D23A   DSN8S23E
  _    DSN8230    VEMPPROJACT          VIEW    DSN8D23A   EMPPROJA

The DB2 Table/View List screen (5.5.1) displays a list of Db2 tables and views you are authorized to access. The list is in alphabetical order by creator. Db2 security limits the list to tables and views you are allowed to access with your CICS user ID.

The list can be further restricted by entering CREATOR, DATABASE, TABLE/VIEW, TABLESPACE, or TYPE in the LIMIT LIST TO fields. If these fields were specified on the DB2 Setup screen (5.5.0), these values are carried forward and appear on this screen.

There are two choices from this screen: Q to create an SQL Easy Query or S to select a table or view on which to work.

2. Type the S line command in the CMD field next to any table and press Enter to display the DB2 Browse Result Table screen (5.5.4) (following figure.)

DB2 Browse Result Table Screen (5.5.4)

 -------------------------- DB2 BROWSE RESULT TABLE (5.5.4) ---------------C024
COMMAND ===>                                                   SCROLL ===> CSR
MODULE:          CSECT:
VALID COMMANDS: CANCEL   FIND   LOCATE   END

CREATOR: DSN8230  TABLE: EMP                                ROW     1 OF 49
                                                       POSITION     1 OF 139
   LINE COMMANDS:  D (Delete)  I (Insert)  R (Replicate)  S (Select)

   EMPNO   FIRSTNME   MIDINIT    LASTNAME     WORKDEPT PHONENO  HIREDATE    JOB
* ------ ------------ ------- --------------- -------- ------- ---------- -----
_ 000010 CHRIS        I       HAAS            A00      3978    1965-01-01 PRES
_ 000020 MICHAEL      S       THOMPSON        B01      3476    1973-10-10 ANALY
_ 000030 SALLY        b       KWAN            C01      4738    1975-04-05 ANALY
_ 000050 JOHN         B       PENDERS         E01      6789    1949-08-17 ANALY
_ 000060 IRVING       F       STERN           D11      6423    1973-09-14 ANALY
_ 000070 EVA          D       PULASKI         D21      7831    1980-09-30 ANALY
_ 000090 EILEEN       W       HENDERSON       E11      5498    1970-08-15 ANALY
_ 000100 THEODORE     Q       SPENSER         E21      0972    1980-06-19 ANALY
_ 000110 VINCENZO     G       LUCCHESI        A00      3490    1958-05-16 SALES
_ 000120 SEAN                 OCONNELL       A00      2167    1963-12-05 CLERK
_ 000130 DOLORES      M       QUINTANA        C01      4578    1971-07-28 ANALY
_ 000140 HEATHER      A       NICHOLLS        C01      1793    1976-12-15 ANALY
_ 000150 BRUCE                ADAMSON         D11      4510    1972-02-12 DESIG

This screen displays the rows in the selected table. The display is by column name, and the rows are automatically formatted. The ROW field shows the current top row and the number of rows in the resulting table. The total rows may be limited by the MAXIMUM ROWS TO SELECT parameter on the DB2 Setup screen (5.5.0). The FIND and LOCATE commands can be used to find a string or shift the display to a particular column.

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*