File Record Edit command
This command carries out a record-by-record addition or deletion of newline characters in files converted to a CSV format or targeted by Receive processing of HULFT.
HULFT outputs the generated files either to the standard output or in the specified file.
Syntax for the File Record Edit command
utllf {-a|-d} {[-s separator-name]|[-sx separator-code]|[-l record-len]} [-k S|8|G] [-i filename] [-o filename] [-r]
Explanation of the parameters
- -a|-d
-
Specify whether newline characters should be added or deleted (Mandatory)
- -a:
-
Add carriage return line feed codes (CRLF)
- -d:
-
Delete carriage return line feed codes (CRLF)
- -s separator-name|-sx separator-code|-l record-len
-
Specify where to add or delete the newline character (Optional)
- -s:
-
Add a newline character after the specified separator (trailer) character.
- -sx:
-
Add a newline character after the specified separator (trailer) code.
The separator can be specified using hexadecimal. The code is specified in the format of '0xXX.' (XX specifies the code in hexadecimal.)
- -l:
-
In combination with -a, add a newline character after the specified record length.
In combination with -d, delete a newline character after the specified record length.
The maximum value that you can set is 32767 bytes.
One of the above three parameters must be specified when -a is set. When -d is specified, only -l can be specified. (Optional)
- -k S|8|G
-
Specify the Code Set for Transfer of the data (Optional)
- S:
-
Shift-JIS
- 8:
-
UTF-8
- G:
-
GB18030
HULFT uses the specified code set when re-formatting during editing of data. If you omit this parameter, HULFT uses Shift-JIS.
- -i filename
-
Specify the input file name (Optional)
Specify a character string within 256 bytes.
If omitted, HULFT uses the standard input.
- -o filename
-
Specify the output file name (Optional)
Specify a character string within 256 bytes.
If omitted, HULFT uses the standard output.
- -r
-
Specify override of the output file (Optional)
If you omit this parameter and the output file already exists, an error occurs.
Note
-
The newline character (0x0D0A) should exist in the byte position next to the record length specified by '-l.'
-
When sending format data to where the newline character (0x0D0A) exists in the record delimiter, specify '-l' to delete the newline character because '0x0D0A' is meaningless data in send destination hosts that are not Windows. Because HULFT cannot tell whether the newline character (0x0D0A) is binary data or a newline character in the format data, '-l' should be specified. If you delete the newline character from the text data, it is not necessary to specify '-l.'
-
'-k S|8|G' is not a parameter for specifying a conversion to the specified character code.