TAA Tools
DSPUNQKEY       DISPLAY UNIQUE KEY                     TAADBNW

The Display  Unique Key command  displays the  number of unique  values
in  the access path  fields for a  data keyed  file (non source).   The
file  does  not have  to have  unique keys.    The system  provides the
number of unique  values for the first  4 key fields  of a file.   This
means a  count of the  unique values for key  1, key 1-2,  key 1-3, and
key  1-4.  One  line is  listed for each  member.   The information can
provide a better understanding of the data.

A typical command would be:

             DSPUNQKEY  FILE(ABC)

The access path  information for file  ABC would be  listed.  For  each
member  of the  file, one  line would  be listed  with a  count of  the
number of unique values for up to 4 key fields.

Example
-------

Assume a file with 3 key fields containing the following data:

            Key 1     Key 2     Key 3
            -----     -----     -----

              A         G         S
              A         G         T
              A         H         S
              A         I         T
              B         G         S
              B         G         S

The results of DSPUNQKEY for the 6 records would be:

        Key 1     = 2
        Key 1 - 2 = 4
        Key 1 - 3 = 5

There  are 2 unique  keys for the  first key.   For the  combined key 1
and key 2, there are  4 unique values.  For  the combined key 1,2,  and
3, there are 5 unique values.

DSPUNQKEY escape messages you can monitor for
---------------------------------------------

None.  Escape messages from based on functions will be re-sent.

DSPUNQKEY Command parameters                          *CMD
----------------------------

   FILE          The qualified  name  of the  keyed data  base file  to
                 display  key value  data for.    Either a  physical or
                 logical  file may be specified.   Only data files (not
                 source) are supported.

                 The  library value  defaults  to  *LIBL.   A  specific
                 library or *CURLIB may also be used.

   OUTPUT        How  to output  the  results.   *  is  the default  to
                 display  the spooled  file if  the command  is entered
                 interactively.  If  the display  is ended with  F3/F12
                 or the  Enter key, the  spooled file is  deleted after
                 it  is displayed.   To  retain  the spooled  file, you
                 may use the the  System Request 'Cancel' function  and
                 the spooled file will exist in a HLD status.

                 If  the command  is  entered  in  batch or  *PRINT  is
                 specified,  the spooled file  is output  and retained.


Restrictions
------------

None.

Prerequisites
-------------

The following TAA Tools must be on your system:

     EDTVAR          Edit variable
     RSNLSTMSG       Resend last message
     RTVDBFA         Retrieve data base file attributes
     RTVSYSVAL3      Retrieve system value 3
     SNDCOMPMSG      Send completion message
     SNDESCINF       Send escape information
     SNDESCMSG       Send escape message

Implementation
--------------

None, the tool is ready to use.

Objects used by the tool
------------------------

   Object        Type    Attribute      Src member    Src file
   ------        ----    ---------      ----------    ----------

   DSPUNQKEY     *CMD                   TAADBNW       QATTCMD
   TAADBNWC      *PGM       CLP         TAADBNWC      QATTCL
   TAADBNWR      *PGM       RPG         TAADBNWR      QATTRPG
					

Added to TAA Productivity tools October 15, 2013


Home Page Up to Top