TAA Tools
DSPDUPKEY       DISPLAY DUPLICATE KEYS                 TAADBOK

The Display  Duplicate Key  command checks  a keyed file  that has  not
been  specified for  Unique keys to  see if  any duplicate  keys exist.
The  file is  read in keyed  order per the  key fields  defined for the
file  and  compared to  the  previous  record.    The  relative  record
numbers of any duplicates are described.

A typical command would be:

             DSPDUPKEY   FILE(xxx)

A listing would be displayed of any records having duplicate keys.

To see  the detail  information for the  duplicates (if any),  you will
need  a function to display the records  by Relative Record number.  If
you do  not have such  a function,  consider the  use of  the TAA  Tool
EDTDBF.   You must have  *ALLOBJ authority or  all rights to  the file.
The command would be entered with the SEQ keyword as:

             EDTDBF      FILE(xxx) SEQ(*RRN)

Use F14 to prompt by Relative Record number.

DSPDUPKEY escape messages you can monitor for
---------------------------------------------

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

DSPDUPKEY Command parameters                          *CMD
----------------------------

   FILE          The  qualified name of  the file  to be checked.   The
                 library value defaults to  *LIBL.  A specific  library
                 or *CURLIB may also be used.

   MBR           The member to be  checked.  *FIRST is the  default for
                 the first member of the file.

                 A specific  member name or *LAST may  also be entered.

   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
------------

The file length may not exceed 9999 bytes.

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

The following TAA Tools must be on your system:

     CHKOBJ3         Check object 3
     EDTVAR          Edit variable
     FILEFDBCK       File feedback
     HLRMVMSG        HLL remove message
     RSNLSTMSG       Resend last message
     RTVDBFA         Retrieve data base file attributes
     RTVFLDARR       Retrieve field array
     RTVKEYLST       Retrieve key list
     RTVSYSVAL3      Retrieve system value 3
     SNDCOMPMSG      Send completion message
     SNDESCINF       Send escape information
     SNDESCMSG       Send escape message
     SNDSTSMSG       Send status message

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

None, the tool is ready to use.

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

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

   DSPDUPKEY     *CMD                   TAADBOK       QATTCMD
   TAADBOKC      *PGM       CLP         TAADBOKC      QATTCL
   TAADBOKR      *PGM       RPG         TAADBOKR      QATTRPG
					

Added to TAA Productivity tools January 15, 2014


Home Page Up to Top