newbadval - Change a variable's bad value

SYNOPSIS

newbadval  [ parameter=value ... ]  [ inputfile ... ]

Parameters are: include_vars, bad_value.

DESCRIPTION

newbadval changes a variable's bad (missing) value. Both the variable's data and the variable's bad value attribute are changed.

This differs from the editvar function, which can change only a variable's bad value attribute, but not its data.

Note, a variable can have more missing values after running newbadval than before. This may or may not be desireable. See the example below.

PARAMETERS

include_vars
List of variables to change. If the list is prefixed with a minus sign, all variables except those listed will be changed. Wildcards * and ? are allowed. The default is to change all variables.
bad_value
The new bad value. There is no default.

EXAMPLES

The following example shows how to use newbadval. The variable in testdata initially has a bad value of 3. When the bad value is changed to 5, the number of missing values increases from 4 to 8.

% printvar testdata
include_vars   : char(255) ? []
line_per_elem  : char(  3) ? [yes] n
list_dims      : char(  3) ? [yes]
printout       : char(  3) ? [no]
Printvar  testdata  Page 1

           x
       1   0   1   2 ***   4
       2   1   2 ***   4   5
       3   2 ***   4   5   6
       4 ***   4   5   6   7
       5   4   5   6   7   8
%
% newbadval testdata
include_vars   : char(255) ? []
bad_value      : real      ? 5
%
% printvar testdata
include_vars   : char(255) ? []
line_per_elem  : char(  3) ? [yes] n
list_dims      : char(  3) ? [yes]
printout       : char(  3) ? [no]
Printvar  testdata  Page 1

           x
       1   0   1   2 ***   4
       2   1   2 ***   4 ***
       3   2 ***   4 ***   6
       4 ***   4 ***   6   7
       5   4 ***   6   7   8
%
% contents testdata
printout       : char(  3) ? [no]
Contents of File: testdata    Page 1

Dimension    Size         Coord           Scale      Offset
 line            5         y                  1           0
 sample          5         x                  1           0

Attribute    Type         Units           Value
 history      byte

Variable     Type         Units
 x            byte

Variable     Dimension    Size
 x            line            5
 x            sample          5

Variable     BadValue    ValidMin    ValidMax       Scale      Offset
 x                  5           0         255           1           0

SEE ALSO

editvar


Last Update: $Date: 1999/05/10 20:45:31 $