This property specifies the reconstruction field of the sort processing, merge processing and copy processing.
Syntax
object.RconCmdStr = string
object
This specifies object expressions that define references to objects.
string
This specifies the reconstruction field according to the formats.
Format of string
{ pos.len | slf.len typ } [ { pos.len | slf.len typ } ...]
pos.len
This specifies positions and length of the input record. Put a period ( . ) between pos and len. When the specified field does not exist in the input record, an error occurs. Specify pos and len to make the length shorter than the minimum record length in the file as for the text file or the files in the variable-length record format.
pos
This specifies positions of the reconstruction field. It is calculated making the head of the record to be 0. When text files are input, a floating field or fixed field is specified according to the value specified in the FieldDefinition property. For files other than text files, fixed field are always set. Specify the field number for the floating field and the column position for the fixed field.
len
This specifies length of the reconstruction field after period ( . ). In the text file floating field specification, if a longer field than the specified field length appears, the specified field length is processed. On the contrary, when a shorter field than the specified field length appears, the actual field length is processed.
slf.len typ
This specifies literal value by the value, length and data format. Put a period ( . ) between slf and len. For information about the data format and length that can be specified for literal value, refer to the 1.6.4.4 Data formats that can be specified in the literal value of the reconstruction field.
slf
This specifies literal value. The following 3 formats can be specified. However, only decimal numbers cannot be specified for text files.
Format | Specifying method | |
---|---|---|
Character string | 'Character string' | Enclose the character strings with quotation marks ('). |
Hexadecimal number | xHexadecimal number | Put x in the head and proceed with hexadecimal numbers. |
Decimal number | dDecimal number | Put d in the head and proceed with decimal numbers. Also, the signs (+, -) can be put. |
len
This specifies length of literal value after period (.).
typ
This specifies data formats of the literal value.
Description
The record reconstruction option enables you to change the configuration of the input record. To reconstruct records, specify the field that configures the input records sequentially from the left end. The methods for specifying the reconstruction field include copying from the input record and to specifying literal values.
To copy the field in the input record, specify positions and length of the field to be copied in the reconstruction field. To set literal values, set value, length, and data format. Field and literal values can be specified in combination.
To specify the field in the input record for the reconstruction field, specify the field in the input record. For text files or files in the variable-length record format, specify positions and length to make them less than the length of the minimum record in the input file.
To specify 2 or more reconstruction field, specify them delimiting with comma (,).
When a value specified with a literal value and the length specified with len are different, process them as shown below.
When the literal value is character strings, the literal value is specified to start at the left and any blank spaces to the right is filled with the appropriate number of spaces if the length of the character strings specified in the literal value is shorter than the length specified in len. If the length of the character strings specified in the literal value is longer than the length specified in len, it is an error.
If the literal value is number, convert the value specified in the literal value into the data format and the length specified in typ and len, and embed them. If the conversion result is more than len, it is an error.
Note
When you use the record reconstruction option, specify the key fields, position (pos) of the summation field and lengths (len) that are specified in KeyCmdStr property and SumCmdStr property for the record after the reconstruction.
Example
The fields in 10 bytes from the 20th byte, the one in 12 bytes from the 50th bytes, the one in 22 bytes from the 30th byte are sequentially copied and reconstruct the input records. The length of the record after the reconstruction is 44 bytes. The record separator is added for text files. In the text floating field specification, the field separation character is added.
19.10,49.12,29.22
Character string 'abc' of ASCII code that is 3 bytes long from the head of the record is embedded and a field in 10 bytes from the 20th byte of the input record is copied and the input record is reconstructed. The record length after the reconstruction is 13 bytes. The record separator is added for text files. In the text floating field specification, the field separation character is added.
'abc'.3asc,19.10