xtdelnul

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

 

NAME

xtdelnul - delete records containing null value(s)

 

SYNOPSIS

xtdelnul -f attribute(s) [-k attribute] [-F] [-R] [-r] [-u EXCEPTION OUTPUT] [-q] [-i INPUT] [-o OUTPUT] [-z] [-t] [-T TEMP DIRECTORY]

 

DESCRIPTION

Removes records with null values in attributes specified in the -f argument. If the key attribute is defined with the option -k, records with the same key value will be accounted for removal.

 

PARAMETERS

-k key attribute
This parameter specifies the key attribute where records with the same key value as the record containing the null value will be removed. When this parameter is omitted, all records have distinct key values.
-f attribute(s)
This specifies the attribute(s) for the removal of null values.
-r
reversing the condition by selecting records with null values.
-F 'AND' condition between attributes
a record will be removed if all attributes are specified at option -f contain null values.
-R 'AND' condition between records
records with the same key value are removed only if all records within the same key value have null values for the attribute defined at option -f.
-q sequential processing
when this option is used with the -k parameter, the command processes the input data in original sequence of the records, instead of sorting by the key attribute -k.

 

FILE OPTIONS

-u output filename for data excluded
allows records secluded from the selection to be saved in the file assigned by option -u.
-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.
-T temp file directory
specify the directory name for temporal files used in this command.
-z zip archive
compress the standard output to zip archive. When the option "-o" is not given and "-z" is specified, the output will be compressed as zip archive.
-t plain text
xtagg treats the input and output data as plain text format.

 

USAGE

Input file - ref.xt:
<body><![CDATA[
A00005 20020918 1102 *
A00005 20020918 1107 0000441
A00005 20020918 * 0000337
A00005 20020918 1403 0000244
A00005 20020923 1403 0000137
A00033 20020618 1101 0000355
A00033 20020618 * 0000577
A00033 20020618 * *
A00033 20020618 1120 0000288
A00033 20020618 1403 0000341
A00033 20020618 1407 0000166
A00052 20020216 * *
A00052 20020216 * *
A00052 20020216 * *
]]></body>
</xmltbl>

Example 1. Remove records with null categorycode. e.g. xtdelnul -f CategoryCode4 -i dat.xt -o rsl.xt Output file -rsl.xt

<body><![CDATA[
A00005 20020918 1102 *
A00005 20020918 1107 0000441
A00005 20020918 1403 0000244
A00005 20020923 1403 0000137
A00033 20020618 1101 0000355
A00033 20020618 1120 0000288
A00033 20020618 1403 0000341
A00033 20020618 1407 0000166
]]></body>
</xmltbl>

Example 2. e.g. xtdelnul -k CustomerID -f CategoryCode4,ProductID -FR -i dat.xt -o rsl.xt Output file -rsl.xt

<body><![CDATA[
A00005 20020918 1102 *
A00005 20020918 1107 0000441
A00005 20020918 * 0000337
A00005 20020918 1403 0000244
A00005 20020923 1403 0000137
A00033 20020618 1101 0000355
A00033 20020618 * 0000577
A00033 20020618 * *
A00033 20020618 1120 0000288
A00033 20020618 1403 0000341
A00033 20020618 1407 0000166
]]></body>
</xmltbl>

 

SEE ALSO

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

 

BUG REPORT

If you find a bug in xtdelnul, 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 l anguage.

 

AUTHORS

Yukinobu Hamuro, Naoki Katoh, Katsutoshi Yada, Stephane Cheung


 

Index

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

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