TAA Tools

The Display Duplicate Field  command checks a specific field  or fields
in a  data base member for duplicates.   The file is sorted  on up to 6
fields  and  a program  checks for  duplicate values.    Up to  3 print
fields  may  be specified  to  help  identify  the  records  that  have
duplicate values.

A typical command would be:

             DSPDUPFLD     FILE(xxx) FIELD(FLD1) PRTFLD(FLD2)

A  spooled file would  be displayed  of any  duplicate values  in FLD1.
For  each duplicate value  in FLD1,  the duplicate value  and the value
in FLD2 for the same record would  be listed.  The FLD2 value would  be
listed to help identify the records with the duplicates.

DSPDUPFLD escape messages you can monitor for

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

Command parameters                                    *CMD

   FILE          The  qualified name  of  the file  to  be checked  for
                 duplicate  values.    The  library  value defaults  to
                 *LIBL.  *CURLIB may also be used.

   FIELD         Up to  6  field  names to  be  checked  for  duplicate
                 values.  The file  is sorted using the field  names as
                 the  sort fields.   The field values  are concatenated
                 together  before checking  for duplicates.   Character
                 fields  must  be  50  characters  or  less.    Decimal
                 fields must be 15 digits or less.

   PRTFLD        A list  of up to 3  print fields that will  be printed
                 along  with the duplicate values  to help identify the
                 duplicates.   The default  is *NONE  meaning only  the
                 duplicate values will be listed.

                 Character  fields may  be  any  length, but  only  the
                 first  50 bytes  are listed.   Decimal fields  must be
                 15 digits or less.

   MBR           The member  to  be  processed  for  duplicate  values.
                 The  default  is  *FIRST based  on  the  create  date.
                 *LAST may  be specified to process the  last member in
                 the file based on create date.

   OUTPUT        How  to  output  the results.    * is  the  default to
                 display the  spooled file  if the  command is  entered
                 interactively.   The spooled file is  deleted after it
                 is displayed.

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


  **   The maximum record size is 9999 bytes.

  **   Character fields  for the  FIELD parameter must  be 50  bytes or

  **   Decimal fields must be 15 digits or less.

  **   Character  fields for  the PRTFLD parameter  may be  any length,
       but only the first 50 bytes are printed.

  **   The maximum  print  width  of  all fields  to  be  printed  plus
       spacing is 378.

  **   Variable length fields are not supported.


The following TAA Tools must be on your system:

     CHKOBJ3         Check object 3
     EDTVAR          Edit variable
     EDTVAR2         Edit variable 2
     EXTLST          Extract list
     EXTLST2         Extract list 2
     HLRMVMSG        HLL Remove message
     RSNLSTMSG       Resend last message
     RTVDBFA         Retrieve data base file attributes
     RTVFLDARR       Retrieve field array
     RTVSYSVAL3      Retrieve system value 3
     SNDCOMPMSG      Send completion message
     SNDESCINF       Send escape information
     SNDESCMSG       Send escape message
     SNDSTSMSG       Send status message
     SORTDBF         Sort data base file


None, the tool is ready to use.

Objects used by the tool

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

   DSPDUPFLD     *CMD                   TAADBKK       QATTCMD
   TAADBKKC      *PGM       CLP         TAADBKKC      QATTCL
   TAADBKKR      *PGM       RPG         TAADBKKR      QATTRPG

Added to TAA Productivity tools March 31, 2004

Home Page Up to Top