MainframeSupports
tip week 03/2002:

So far I have been writing a lot of tips about the ISPF editor. Now it is time for a DB2 editor. Editing DB2 tables hasn't been one of IBM's greatest concerns. Other vendors have used this opportunity to develop some good DB2 editors, but generally these editors are hard to get started. Typically you have to go through a lot of ISPF menus before you get to the browsing or editing of the DB2 table. I have discovered some short cuts for at least two of these products.

File-AID for DB2 is delivered by Compuware Corporation and included in the package is a CLIST which enables you to activate edit or browse sessions directly from a REXX or CLIST. The name is F2XNTRFC and it is decribed in the File-AID for DB2 Installation Guide. There is also a sample CLIST called F2XNSAMP which demonstrates how to invoke F2XNTRFC. Lets look at some examples of invoking F2XNTRFC:

/* REXX */
ADDRESS TSO

/* Browse SYSIBM.SYSTABLES in DB2-subsystem DB2
"%F2XNTRFC SSID(DB2) ENTRY(TEMPLATE),
           QUAL(SYSIBM) NAME(SYSTABLES)"

/* Edit SYSIBM.SYSTABLES in DB2-subsystem DB2
"%F2XNTRFC SSID(DB2) ENTRY(TEMPLATE) OPTION(EDIT),
           QUAL(SYSIBM) NAME(SYSTABLES)"

To make this REXX work, you have to ensure that F2XNTRFC is in your TSO SYSPROC concatenation. Furtermore the CLIST F2LIBDEF must be customized to make LIBDEF's of the right datasets. You can talk to the system programmer for File-AID for DB2 to find out if this is done. Or you can try and see if the call to F2XNTRFC works.

Another popular vendor of a DB2 editor is Princeton SOFTECH with the product Access for DB2. They have a manual called Relational Tools: Installation & Administration Guide which decribes how to invoke their editor from a REXX or CLIST. This is how it is done from REXX:

/* REXX */
ADDRESS TSO

/* Browse SYSIBM.SYSTABLES in DB2-subsystem DB2
"%PST SSN(DB2),
      PARM('C=BROWSE TABLE SYSIBM.SYSTABLES SEL')"

/* Edit SYSIBM.SYSTABLES in DB2-subsystem DB2
"%PST SSN(DB2),
      PARM('C=EDIT TABLE SYSIBM.SYSTABLES SEL')"

In this example you must ensure that the PST CLIST is in your TSO SYSPROC concatenation. As a part of the product there is a sample CLIST called SAMPCALL which also shows you how to start PST. PST calls another CLIST which makes the neccesary LIBDEF's and just like F2LIBDEF it has to be customized.

You can start both DB2 editors with a lot of other parameters. They are described in the manuals I have mentioned, though they are not very well decribed for Access for DB2. Maybe I just didn't look hard enough. At last I can conclude that the good stuff is always hidden in the installation manuals. These manuals are typically read only by system programmers and they don't always share the same interests as the DBA people or the developers.

Previous tip in english        Sidste danske tip        Tip list