TAA Tools
CPYNULLFLD      COPY NULL FIELDS                       TAADBMG

The Copy  Null Fields  command copies  data from a  file that  contains
null  fields to a  corresponding file that  does not have  null fields.
The   null  values  are   changed  to  zeros.     You  may  create  the
corresponding file  or  replace the  data  in the  file if  it  already
exists.    CPYNULLFLD  may be  used  to  allow  functions that  do  not
operate on null field files to be used.

A typical command would be:


The  source used to create file  ABC would be accessed  and copied to a
temporary source  file  in  QTEMP.   Any  DDS  field  definitions  with
ALWNULL  specified  for  a  field  would  have  the  ALWNULL  attribute
dropped.   The  new ABC  file would  be created  in the  named library.
The data  would be  copied  to the  new file  specifying  FMTOPT(*MAP).
This would  cause any fields  containing null values  to appear in  the
new file as zeros.

The file  may now be processed  by a variety of TAA  tools that prevent
the  use of files which allow null  fields such as PRTDB and SCNDUPRCD.

If the source has been  moved from where the file was created,  you may
specify the  SRCFILE and  SRCMBR parameters.   If the source  no longer
exists, you may use RTVPFSRC to retrieve the source.

CPYNULLFLD escape messages you can monitor for

      TAA9891    The file does not have any null fields.

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

CPYNULLFLD Command parameters                         *CMD

   FROMFILE      The  qualified name  of  the From  file with  at least
                 one field that specifies  ALWNULL.  The library  value
                 defaults  to *LIBL.   A  specific  library or  *CURLIB
                 may also be used.

   TOFILE        The qualified  name of the To file.   If the file does
                 not exist, a library must  be specified.  If the  file
                 exists, *LIBL  may be  used or  a specific library  or

   FROMMBR       The  From  member  to  be  copied.    The  default  is
                 *FIRST.  A specific member may be named.

   TOMBR         The  To member to copy to.   The default is *FIRST.  A
                 specific member may be named.

                 If the  file  already  exists, the  member  must  also
                 exist.  If  the file is created, a  member of the same
                 name as the file will be added.

   MBROPT        The  member option to  be used.  *NONE  is the default
                 which  is  only  valid  when  the  To  file  is  being
                 created by CRTFILE(*YES).

                 If  the  To  file  already exists,  you  must  specify
                 *REPLACE or *ADD.

                 *REPLACE  causes the  member to  be cleared  first and
                 then records  are  copied.   You  must  have  *OBJOPR,
                 *OBJMGT, and *ADD authority to use *REPLACE.

                 *ADD causes  the records  to be  added to an  existing

   CRTFILE       A  *YES/*NO parameter for  whether the file  should be

                 *NO  is  the  default  and  should  be  specified when
                 adding records to an existing file member.

                 *YES  may be  specified  to  clear the  member  before
                 adding records.

   SRCFILE       The  fully qualified  name  of the  source file  which
                 should  be used  to create the  file.   The default is
                 *OBJ meaning the same source  file used to create  the
                 original file.

                 The  library qualifier  defaults to  *OBJ meaning  the
                 same source  file library that was  used to create the
                 original file.

   SRCMBR        The source  member  to  create the  file  from.    The
                 default is  *OBJ meaning the  same source  member that
                 was used to create the original file.


The  source used to  create the  file must  still exist where  the file
was created from.


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 base file attributes
     SNDCOMPMSG      Send completion message
     SNDESCINF       Send escape information
     SNDESCMSG       Send escape message


None, the tool is ready to use.

Objects used by the tool

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

   CPYNULLFLD    *CMD                   TAADBMG       QATTCMD
   TAADBMGC      *PGM       CLP         TAADBMGC      QATTCL
   TAADBMGR      *PGM       RPG         TAADBMGR      QATTRPG

Added to TAA Productivity tools April 15, 2009

Home Page Up to Top