TAA Tools

The Scan and Update  Hex 00s command replaces X'00'  values with blanks
(X'40's) and  returns them in  the same variable.   The command  can be
useful  when dealing  with system data  which frequently  uses X'00' in
values.  The variable must be declared as 5000 bytes.

When system  data is accessed  which contains  X'00's, unusual  results
may appear to a typical application user.

  **   When printing  the value,  X'00' is considered  a null  and does
       not  print  a  character instead  of  a space.    Any  data that
       should be printed following the null is shifted to the left.

  **   If  the command  prompter  finds  a  value  with  X'00's  to  be
       prompted, it displays the value in hex.

Note that  displaying the  data is  not a  problem because the  display
file will translate any values below X'40'.

Assume your  variable to be scanned  is 100 bytes in  length.  You must
move  the  100  byte  variable   to  a  5000  byte  variable   (maximum
supported) and pass  the length of the data  to be scanned.   After the
command completes,  move the 5000  byte variable back to  your 100 byte
variable.  A typical series of commands would be:

             DCL        &CHAR5000 *CHAR LEN(5000)
             DCL        &VAR *CHAR LEN(100) /* Your variable */
             CHGVAR     &CHAR5000 &VAR
             SCNUPDHEX0 VAR(&CHAR5000) VARLEN(100)
             CHGVAR     &VAR &CHAR5000

After the commands are run, &VAR would not have any X'00's.

No error occurs if X'00's do not exist.

SCNUPDHEX0 escape messages you can monitor for

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

Command parameters                                    *CMD

   VAR           The  variable  to  be  scanned  and  updated.    X'00'
                 values would  be replaced  with blanks  (X'40').   The
                 variable  must be  declared  as *CHAR  LEN(5000).   No
                 error occurs if X'00' values do not exist.

   VARLEN        The  length of  the data to  be scanned.   The default
                 is  5000.   If  you  know  the  length  of  the  data,
                 entering  a value  will  only cause  a  scan for  that


Because  the command returns a  CL variable, it  may only be  used in a
CL program.




None, the tool is ready to use.

Objects used by the tool

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

   SCNUPDHEX0    *CMD                   TAACLRC       QATTCMD
   TAACLRCC      *PGM       CLP         TAACLRCC      QATTCL

Added to TAA Productivity tools September 15, 2002

Home Page Up to Top