About item name
Effective item name
Appointment of item name as an output
Substitution of item name
Available letter as follows is as an item name.
Japanese (EUC), alphabet (a-z and A-Z), number (0-9), sign (only
_)
In regard to the sign at present, the under bar (it
can utilize only the _).
Because the other signs are utilized, special character
(keyword) as at the time of appointing the command argument as an item
name it cannot utilize.
However at present, on command side, check of item name it does
not do strictly.
Command name |
Keyword |
New item name |
Wild card |
Item option |
The number of designated possible items |
Xtaccum
Xtagg
Xtbucket
Xtchgnum
Xtchgstr
Xtcombi
Xtcorrelation
Xtcut
Xtdelnul.
Xtduprec
Xtjoin
Xtnjoin
Xtnulto
Xtpattern
Xtproduct
Xtsed
Xtselstr
Xtsession
Xtshare
Xtslide
Xtstatistics
Xtsubstr |
F
F
F
F
F
F
F
F
F
F
F
F
F
F
F
F
F
F
F
F
F
F |
Yes
Yes
Yes Yes Yes
Failure
Failure
Yes
Yes Failure Yes Yes Yes Yes Yes
Yes
Failure
Failure
Yes
Yes
Yes
Yes |
Yes
Yes
Yes Yes Yes
Failure
Failure
Yes
Yes
Failure Yes Yes Yes Yes Yes
Yes Yes
Failure Yes Yes Yes
Failure |
Failure
Failure
Failure Failure Failure Failure
Failure
Failure Failure Failure Failure Failure Failure Failure Failure
Failure Failure
Failure
Failure
Failure Failure
Failure |
1 - 256 1 - 256 1 - 256 1 - 256
1 - 256
1
2
1 - 256
1 - 256
1 1 - 256 1 - 256 1 - 256 1 - 256 1 - 256 1 - 256
1 - 256
1
1 - 256
1 - 256 1 - 256
1 |
MUSASHI offers as for many commands, has the
parameter which appoints item name.
It can classify the parameter which appoints item, into 4
largely.
1) With the parameter which appoints the processing
object, as for keyword mainly "-f"
Appointment of new item name, appointment of the
wild card and appointment of item option are possible.
2) With the parameter which appoints key item, as
for keyword mainly "-k"
The item name which decides the unit of
processing
3) With the parameter which appoints sort
item, as for keyword "-s"
4) With the parameter which draws up new
item name, as for keyword "-a"
New item name
With appointment of key item
With XMLtable, in order to appoint data elements
due to item name, there are times when the necessity which modifies
item name depending upon processing contents, occurs.
- The case which the same item name to one chart occurs
Figure 1
<? Xml version= "1.0" encoding= "EUC-JP"?
>
<xmltbl version= "1.00" >
<head>
<field no= "1" >
<name> customer cord/code </name>
</field>
<field no= "2" >
<name> date </name>
</field>
<field no= "3" >
<name> quantity </name>
</field>
<field no= "4" >
<name> unit cost </name>
</field>
</head>
<body><! [ CDATA [
Customer A 19991103 1 2
Customer B 19991202 1 10
Customer C 19991204 10 0
Customer D 19991206 1 3
Customer E 19991206 2 1
] ] ></body>
</xmltbl> |
From this XML Table by xtcut command, it extracts
2 "date" items you think of that. As shown in figure 2, xtcut
command is utilized then. Here, -f in parameter like "date and
date" the same item name is appointed two.
Xtcut -f date and date <in.xt |
As an output, way it is shown in figure 3, date
two items it is expected that you can obtain the data which is
included.
Figure 3
<? Xml version= "1.0" encoding= "EUC-JP"?
>
<xmltbl version= "1.00" >
<head>
<field no= "1" >
<name> date </name>
</field>
<field no= "2" >
<name> date </name>
</field>
</head>
<body><! [ CDATA [
19991103 19991103
19991202 19991202
19991204 19991204
19991206 19991206
19991206 19991206
] ] ></body>
</xmltbl> |
But, the trouble that occurs the same item name
exists in the header of that output data.
To tell the truth, in this kind of case, command ends outputting
the error message "of same field names in output data".
It becomes necessary here to appoint item name as an
output data anew.
Designation method, way it is illustrated to figure 4 after the
input item name due to parameter, -f the colon (: ) Putting, it
appoints the item name of the output data.
Figure 4
Xtcut -f date and date: New date <in.xt |
As the result the output data as shown in figure
5, is designated anew 2nd item name as a "new date".
Figure 5
<? Xml version= "1.0" encoding= "EUC-JP"?
>
<xmltbl version= "1.00" >
<head>
<field no= "1" >
<name> date </name>
</field>
<field no= "2" >
<name> new date </name>
</field>
</head>
<body><! [ CDATA [
19991103 19991103
19991202 19991202
19991204 19991204
19991206 19991206
19991206 19991206
] ] ></body>
</xmltbl> |
Concerning the designation method of output item
name, compared to it is possible by appointing input item name due to
the #, to appoint output item simply.
For example figure 6 does the movement which is similar to
figure 4. Namely, in the new item name which is appointed below
the colon #, it is input item name, it is substituted by "date", it
becomes "new item name" as a result.
Figure 6
Xtcut -f date and date: New # <in.xt |
Several similar example is shown
Before the substituting |
After the substituting |
Amount: January (#)
Customer cord/code: #_ member
ABC: #-# |
January (amount)
Customer cord/code _ member
ABC-ABC |
|