Write Variable-Length File

Operation name

Write Variable-Length File

Function overview

Writes the input data to a text file in variable-length format.

Data model

The data model of this component is table model type.

Properties

= Remarks =

For details on use of variables, refer to Variables.

Basic settings

Item name

Required/Optional

Use of variables

Description

Remarks

Name

Required

Not available

Enter a name that is used on the script canvas.

 

Input data

Required

Not available

Select a component on the script canvas.

 

Required settings

Item name

Required/Optional

Use of variables

Description

Remarks

File

Required

Available

Enter the file path to a variable-length file to be written to.

The Browse button launches a file chooser that allows you to select a file.

Note

Delimiter mode

Required

Not available

Select a method to specify delimiter.

Select from list

(Default)

Select a delimiter character from the list.

Enter directly

Enter the delimiter character directly in the field.

Enter character code

Enter the delimiter character using character code in the field.

  • Depending on selected method, the corresponding input field (Delimiter list/Delimiter) is displayed.

Delimiter list

Optional

Not available

Select a delimiter character.

  • Space: (default)

  • TAB (Tab):

  • Comma:

  • Semicolon:

  • Slash:

  • New line:

  • Enabled when Select from list is selected in Delimiter mode.

Delimiter

Optional

Available

Enter a delimiter character.

For Enter directly

Directly enter from the keyboard.

For Enter character code

Enter a byte sequence in the encoding specified in Encoding.

You can enter the code as octal (with prefix "0" <number zero>), decimal (without prefix), and hexadecimal (with prefix "0x" <alphabet x with number zero> or "#").

If the delimiter character is a multi-byte string, enter it separated with a comma. Example: 0x10,0x13

  • Enabled when Enter character code or Enter directly is selected in Delimiter mode.

  • When using a multi-byte string, don't enter spaces before and after the comma.

Double quote escape

Required

Not available

Select whether to escape double quotes.

Disable

(Default)

Don't escape double quotes.

It's simple delimited data. Delimiter can't be held as field value.

Enable

Escape double quotes.

When the field value contains a delimiter character or a double quote, the field value is enclosed with double quotes.

When a double quote is contained in the field value, one double quote is represented by two consecutive double quotes.

  • When the field is enclosed with double quotes, and the value in the field doesn't contain any delimiter characters or double quotes to escape, an error occurs.

Format

Required

Not available

Select a format definition for variable-length files registered in data format resources.

= Remarks =

For how to configure settings, refer to Variable-Length Write Wizard.

Add

A new data format resource can be added.

Edit

Data format resource settings can be edited in > HULFT INTEGRATE > Data Formats.

 

Property actions

Item name

Description

Remarks

Preview

The previewer is started, and the contents of the file specified in File is displayed.

  • Disabled when the specified file doesn't exist or a variable is set in File.

  • The contents are displayed with the encoding specified in Encoding.

  • The contents of the file can't be edited.

  • The maximum file size that can be displayed in the previewer is 1MB. If the file size exceeds 1MB, the contents up to 1MB from the beginning of the file will be displayed.

Variable-Length Write Wizard

The Variable-Length Write Wizard is launched. For details, refer to Variable-Length Write Wizard.

 

Write settings

Item name

Required/Optional

Use of variables

Description

Remarks

Encoding

Required

Available

Select or enter an encoding for the file to read.

When you enter encoding, specify one of the encodings supported in Java SE Runtime Environment 8.

= Remarks =

For details, refer to "Supported Encodings" (http://docs.oracle.com/javase/8/docs/technotes/guides/intl/encoding.doc.html).

  • The default encoding selected for Encoding of file type connectors is UTF-8.

New line code

Required

Not available

Select a newline code.

CR
LF
CR+LF

(Default)

  • If you used the Variable-length connector on or before February 26, 2023 with AUTO specified, the processing is performed with LF set.

    When you update the script, specify LF.

  • Because the newline code is encoded in the encoding specified in Encoding, the byte value depends on the encoding.

    • LF

      Encoding

      Byte value

      UTF-8

      0x0a

      Shift_JIS

      0x0a

      Windows-31J

      0x0a

      EUC-JP

      0x0a

      ISO-8859-1

      0x0a

      ISO-2022-JP

      0x0a

      US-ASCII

      0x0a

      UTF-16

      0xfe,0xff,0x00,0x0a

      UTF-16BE

      0x00,0x0a

      UTF-16LE

      0x0a,0x00

      Cp930 (EBCDIC)

      0x15


    • CR

      Encoding

      Byte value

      UTF-8

      0x0d

      Shift_JIS

      0x0d

      Windows-31J

      0x0d

      EUC-JP

      0x0d

      ISO-8859-1

      0x0d

      ISO-2022-JP

      0x0d

      US-ASCII

      0x0d

      UTF-16

      0xfe,0xff,0x00,0x0d

      UTF-16BE

      0x00,0x0d

      UTF-16LE

      0x0d,0x00

      Cp930 (EBCDIC)

      0x0d


    • CRLF

      Encoding

      Byte value

      UTF-8

      0x0d,0x0a

      Shift_JIS

      0x0d,0x0a

      Windows-31J

      0x0d,0x0a

      EUC-JP

      0x0d,0x0a

      ISO-8859-1

      0x0d,0x0a

      ISO-2022-JP

      0x0d,0x0a

      US-ASCII

      0x0d,0x0a

      UTF-16

      0xfe,0xff,0x00,0x0d,0x00,0x0a

      UTF-16BE

      0x00,0x0d,0x00,0x0a

      UTF-16LE

      0x0d,0x00,0x0a,0x00

      Cp930 (EBCDIC)

      0x0d,0x15

Overwrite

Optional

Not available

Select whether or not to overwrite when the specified file exists.

Selected

(Default)

Overwrite.

Not selected

Don't overwrite. When the file already exists, an error occurs.

 

Append

Optional

Not available

Select whether to append data to the end of the file or to overwrite the file if the specified file exists.

Selected

Append to the end of the file.

Not selected

(Default)

Overwrite.

  • Enabled only when Overwrite is selected.

Transaction

Item name

Required/Optional

Use of variables

Description

Remarks

Execute transaction processing

Required

Not available

Select whether or not to execute transaction processing.

Selected

Transaction processing will be executed.

Not selected

(Default)

Transaction processing won't be executed.

= Remarks =

For details, refer to Transactions for the connectors in the File category.

 

Comment

Item name

Required/Optional

Use of variables

Description

Remarks

Comment

Optional

Not available

You can write a short description of this connector.

 

Schemas

Input schema

The number of columns varies depending on the Format settings.

= Remarks =

For schema structure, refer to Table model type .

Output schema

None.

Loading schema in Mapper

The schema is loaded automatically.

= Remarks =

For details, refer to Edit Schema.

Transaction

Transaction is supported.

 

Transaction is enabled only when Execute transaction processing of Transaction is selected.

Parallel Stream Processing

PSP is supported.

= Remarks =

For details on PSP, refer to Parallel Stream Processing.

Available component variables

Component variable name

Description

Remarks

count

The number of written data records is stored.

  • The default value is null.

message_category

When an error occurs, the category of the message code corresponding to the error is stored.

  • The default value is null.

message_code

When an error occurs, the code of the message code corresponding to the error is stored.

  • The default value is null.

message_level

When an error occurs, the severity of the message code corresponding to the error is stored.

  • The default value is null.

error_type

When an error occurs, the error type is stored.

  • The default value is null.

  • The format of the error type is as follows.

    Example: java.io.FileNotFoundException

error_message

When an error occurs, the error message is stored.

  • The default value is null.

error_trace

When an error occurs, the trace information for the error is stored.

  • The default value is null.

Message codes, exception messages, and limitations

Connector

Message code

Exception message

Limitations

Messages and limitations of the Variable-Length connector

check

check

check

Notes