MCMD handles plain text files in CSV format, where the data is a sequence of characters. Thus, it depends on how the specific command interprets the character string for the data type. For example, the data in field specified at f= in msum command is converted from a character string to a number. As shown in Table 2.1, MCMD can handle six types of data including numeric, character string, date, time, boolean and vector type.
Data type |
Notation of CSV Data type |
Details of Conversion |
Numerical type |
10, 2.5, 1.5E+10 |
Convert value to a double-precision real number |
Character string type |
abc, あいう |
Process CSV data as it is |
Date type |
20130920 |
Convert 8-digit fixed length string to Gregorian calendar object |
Time type |
20130920151154, 151154 |
Convert 6 digit or the 14-digit fixed length string to Gregorian calendar + POSIX time object |
Boolean type |
1,0 |
Convert character to boolean value. "1" is true and “0” is false |
Vector type |
a c b, 1 5 11 |
Character string delimited by space can be converted to any data type above. |
Further, list of data types of commonly used commands is shown in Table 2.2.
Data type |
Command |
Details |
Numerical type |
Calculate total of numeric field |
|
Calculate the similarity between two fields |
||
String type |
Combine fields from the reference file |
|
Enumerate combination |
||
Date type |
Calculate Age |
|
Determine leap year |
||
Time type |
Output the current time |
|
diffminute function of mcal |
Calculate the time difference in minutes |
|
Boolean type |
Compute the logical product |
|
Set the value of the criteria |
||
ベクトル型 |
Sort vector elements |
|
Extract unique vector elements |