TAA Tools
FIXDECERR       FIX DECIMAL ERRORS                     TAADBLN

The Fix Decimal Errors  command fixes packed and/or zoned  fields in an
externally described  file member.   Packed fields are set  to zeros if
invalid  decimal  data exists.   Zoned  fields with  invalid characters
have the  characters made  valid.   Use the  VALDBF tool  to check  for
decimal errors (does not change values).

For a  discussion of VALDBF, see  the section on  'Checking for invalid
decimal data'.

You  must  have all  rights to  the  file to  use  FIXDECERR.   The RPG
compiler is required.

FIXDECERR creates  a  specific  RPGLE  program in  QTEMP  to  read  and
update the specified member  of a file.  The program is  called as part
of the  processing and deleted when the  command completes.  The FIXNBR
parameter function of CRTBNDRPG is used to correct the data.

A typical command would be:

            FIXDECERR  FILE(xxx)

By default, both  packed and  zoned fields  would be  corrected if  any
exist.

No information  is provided as  to how many  fields were corrected  nor
the records that were changed.

Checking for invalid decimal data
---------------------------------

The VALDBF command  will allow a check of zoned  and packed fields in a
file.   A spooled file is  output describing the relative record number
and any  field in error.   If  a packed field  is in  error, a zero  is
shown.   If a zoned  field is in  error, but would convert  properly to
decimal (such 1A3), the data is shown.

Invalid  decimal  data  can  occur if  a  program  is  written  using a
program described  version  of  the  file  (instead  of  an  externally
described version), and  the field definition allows  character data to
be written to a decimal field location.

A typical  error is where the program  described definition is one byte
off and has overlaid part  of a decimal field.   If only a few  records
are impacted, it may  be possible to reconstruct the data  using a tool
like EDTDBF.   It will show the  hex value of the data  and allow it to
be corrected.

Using  FIXDECERR will  reset all  error conditions  to zeros,  but will
not report  how many  error conditions  existed nor  what records  were
changed.

FIXDECERR escape messages you can monitor for
---------------------------------------------

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

FIXDECERR Command parameters                          *CMD
----------------------------

   FILE          The qualified  name of the  file to be processed.   It
                 must  be a physical file.   The library value defaults
                 to *LIBL.  A specific  library or *CURLIB may also  be
                 used.

   MBR           The member  to be processed.   *FIRST is  the default.
                 A specific member name or *LAST may be entered.

   TYPE          The type of field to be corrected.

                 Packed  fields with  invalid decimal  data are  set to
                 zeros.   Zoned  fields with  invalid  characters  have
                 the  characters  made  valid.   An  RPGLE  program  is
                 created  and   run  using  the   FIXNBR  parameter  of
                 CRTBNDRPG.      For   detail   information,   see  the
                 CRTBNDRPG command FIXNBR parameter help text.

                 *BOTH  is  the default  to  correct  both  packed  and
                 zoned fields.

                 *PACKED or  *ZONED may be  specified to change  only a
                 specific type of field.


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

  **   You must have all rights to the file to use FIXDECERR.

  **   The file must be an externally described physical file.

  **   The RPGLE compiler is required.

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

The following TAA Tools must be on your system:

     CHKOBJ3         Check object 3
     EDTVAR          Edit variable
     HLRMVMSG        HLL Remove message
     RSNLSTMSG       Resend last message
     RTVDBFA         Retrieve data file attributes
     RTVFMT          Retrieve format
     SNDCOMPMSG      Send completion message
     SNDESCINF       Send escape information
     SNDESCMSG       Send escape message
     WRTSRC          Write source

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

None, the tool is ready to use.

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

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

   FIXDECERR     *CMD                   TAADBLN       QATTCMD
   TAADBLNC      *PGM       CLP         TAADBLNC      QATTCL
					

Added to TAA Productivity tools September 15, 2007


Home Page Up to Top