xtnulto

Section: User Commands (1)
Updated: 2002-10-26
Index Return to Main Contents

 

NAME

xtnulto - replaces null value

 

SYNOPSIS

xtnulto -f attribute(s) -v value [-i INPUT] [-o OUTPUT] [-z] [-t]

 

DESCRIPTION

This command replaces the null values in the specific fields -f with values defined in the argument -v. These values can be numeric or characters as long as it is reasonable to the data set.

 

PARAMETERS

-f attribute(s)
a list of attributes
-v value
the value with which a null value is replaced

 

FILE OPTIONS

-i input filename
if a suffix of the filename is '.gz', the command acts as a filter, extracting the compressed file for processing. The command will read the file as standard input when "-i" is not specified.
-o output filename
if a suffix of the filename is '.gz', the command automatically returns the output data in zip archive. When "-o" is not specified, the result will sent to standard output.
-z zip archive
compress the standard output by gz: When -o is omitted and this option is specified, the command output the result zipped.
-t plain text
treat the input and output data as plain text format.

 

USAGE

Input file -dat.xt:
<field no="1">
<name>CustomerID</name>
</field>
<field no="2">
<name>Date</name>
</field>
<field no="3">
<name>Quantity</name>
</field>

<field no="4">
<name>Amount</name>
</field>
</header>
<body><![CDATA[
A00001 20020211 1 400
A00004 20020415 * 4349
A00004 20020625 3 5268
A00004 20020810 2 *
A00004 20021014 2 612
* 20020918 12 4554
* 20020923 1 491
]]></body>

Example 1. Replace null values in Quantity and Amount with 'NULL' e.g. xtnulto -f Quantity,Amount -v NULL -i dat.xt -o rsl.xt Output File - rsl.xt

<body><![CDATA[
A00004 20020214 1 365
A00004 20020415 NULL 4349
A00004 20020625 3 5268
A00004 20020810 2 NULL
A00004 20021014 2 612
A00004 20021016 11 3410
* 20020918 12 4554
* 20020923 1 491
]]></body>

 

DIAGNOSTICS

Make sure the value to replace the null values is defined in the -v argument.

 

SEE ALSO

xtdelnul(1) For complete documentation and tutorial of xtnulto and other commands, please visit http://musashien.sourceforge.net.

 

BUG REPORT

If you find a bug in xtnulto, please send an electronic mail to musashi@adm.osaka-sandai.ac.jp. Before sending a bug report, please verify that you have the lastest version of MUSASHI. Read this manual carefully to ensure the error is not caused by a quirk in the language.

 

AUTHORS

Yukinobu Hamuro, Naoki Katoh, Katsutoshi Yada, Stephane Cheung


 

Index

NAME
SYNOPSIS
DESCRIPTION
PARAMETERS
FILE OPTIONS
USAGE
DIAGNOSTICS
SEE ALSO
BUG REPORT
AUTHORS

This document was created by man2html, using the manual pages.
Time: 22:43:54 GMT, June 24, 2003