xtsession

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

 

NAME

xtsession - generate new session number

 

SYNOPSIS

xtsession -f attribute(s) -v identification string -a new attribute [-k key attribute(s)] [-s sort order[%{n|r}]] [-C] [-q] [-i INPUT] [-o OUTPUT] [-z] [-t] [-T TEMP DIRECTORY]

 

DESCRIPTION

Creates a new session number by incrementing the key number if the value of an attribute at -f matches the character string -v and stores the output as a new attribute.

 

PARAMETERS

-k key attribute(s)
base unit of clearing a new session number
-s sort order
determines the ordering of records for records with the same key value
-f attribute(s)
attributes where session value is identified
-v identification string
identifies the end of session when the attribute matches the identification string
-a new attribute
name of a new attribute
-C increment session number when matches identification string
If this option is specified, the current line number is incremented when the specification string appears (without this option the line number [of the next line is incremented
-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.

 

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.
-T temp directory
the directory name for temporary files used in this command.
-z zip archive
compress the standard output to zip archive. When the option "-o" i s not given and "-z" is specified, the output will be compressed as zip archive.
-t plain text
treat the input and output data as plain text format.

 

USAGE

Input file - dat.xt:
<body><![CDATA[
A00001 1
A00001 2
A00001 9
A00002 1
A00003 2
A00003 9
A00004 0
A00004 1
A00004 3
A00004 9
A00005 1
A00005 2
A00005 3
]]></body>

Example 1. Count the number of customers by date. e.g. xtsession -k CustomerID -f Flag -v 1 -a Session -i dat.xt -o rsl.xt Output file -rsl.xt

<body><![CDATA[
A00001 1 0
A00001 2 1
A00001 9 1
A00002 1 0
A00003 2 0
A00003 9 0
A00004 0 0
A00004 1 0
A00004 3 1
A00004 9 1
A00005 1 0
A00005 2 1
A00005 3 1
]]></body>

 

SEE ALSO

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

 

BUG REPORT

If you find a bug in xtsession, 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
OPTIONS
USAGE
SEE ALSO
BUG REPORT
AUTHORS

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