Read Fixed-Length File

Operation Name

Read Fixed-Length File

Function overview

Reads a file of fixed-length.

Data model

Data model of this type of component is table model type.

Properties

For information about using variables, refer to "variables".
Basic settings
Item name Required / Optional Use of Variables Description Remarks
Name Required Not available Enter the name on the script canvas.  
Required settings
Item name Required / Optional Use of Variables Description Remarks
File Required Available Enter the file path to read a fixed-length.

Click [Browse] button to activate the file Selectr and Select the file.
Format Required Not available Select a file format definition that is fixed for global resources.
How to set the "Fixed-Length Wizard" Please for more information.
  • [Add]:
    Adds new global resource.
  • [Edit]:
    Global resource settings can be edited with "Edit Resource list".
 
Property Action
Item name Description Remarks
Preview Start the previewer, display the contents of the file specified in [File].
  • Disables when specified file dose not exist, or variables are set in [File].
  • Encode specified in [Encoding] is displayed.
  • You can not edit the file contents.
  • Files with file size smaller than 1MB can be displayed in previewer.If the file size exceeds 1MB, 1MB size contents from the beginning of the file are displayed.
Read settings
Item name Required / Optional Use of Variables Description Remarks
Encoding Required Available Select or input read file encode.

Use only the canonical name supported by Java SE Runtime Environment 8 when specifying the encoding directly in the field.
Refer to "Supported Encodings"(http://docs.oracle.com/javase/8/docs/technotes/guides/intl/encoding.doc.html) for details.
  • For information regarding the default values used, refer to "Default encoding".
New line code Required Not available Select a new line code.
  • [AUTO]: (default)
    Implementation-dependent
  • [NONE]:
  • [CR]:
    Primarily Mac OS (Version 9)
  • [LF]:
    Primarily UNIX/Linux
  • [CR + LF]:
    Primarily Microsoft Windows
 
Retrieves the suppressed characters as empty string Optional Not available Select whether to retrieve the value of the field as an empty string or as null if it consists of suppressed character.
  • [Checked]:
    Retrieved as empty string
  • [Not Checked]:(default)
    Retrieved as null
 
Retrieves the suppressed characters of the numeric type as 1 digit suppressed character Optional Not available If the numeric data field is composed only of padding characters, this will determine whether the value of this filed is retrieve as a single padding character.
  • [Checked]:
    Retrieved as a single padding character
  • [Not Checked]:(default)
    Retrieved as null or empty character.
  • Determined accordingly to the selection made for the [Retrieves the suppressed characters as empty string].
  • None numeric padding character is retrieved either as an empty string or null according to the selection for the [Retrieves the suppressed characters as empty string].
  • Zone Decimal and Pack Decimal values cannot be retrieved either as null or empty character.
Data processing method
Item name Required / Optional Use of Variables Description Remarks
Mass data processing Required Not available Select a data processing method.
  • [Use script settings]: (default)
    Use adapter to set script properties of the data process.
  • [Disable]:
    Mass data processing is not performed.
  • [Enable]:
    Mass data processing is performed.
 
Comment
Item name Required / Optional Use of Variables Description Remarks
Comment Optional Not available You can write a short description of this adapter.
The description will be reflected in the specifications.
 

Schema

Input Schema

None.

Output Schema

The number of columns varies depending on the [Format]
See "Schema of Table Model" for details regarding schema structure.

Loading schema in Mapper

Schema is loaded automatically.
For any details, please refer to the 'Editing Schema'

Mass data processing

Mass data processing is supported.

PSP Usage

PSP is supported.
For details on PSP, refer to "Parallel Stream Processing".

Available component variables

Component variable name Description Remarks
count Return number of read columns.
  • The value defaults to null.
  • Null when using Parallel Stream Processing.
message_category Stroes the category to which corresponding message code belongs to, when an error occurs.
  • The value defaults to null.
message_code Stores its corresponding message code of occured error.
  • The value defaults to null.
message_level Stores the severity of the corresponding message code of the occured error.
  • The value defaults to null.
error_type Stores the type of the occured error.
  • The value defaults to null.
  • Error is represented in the format depicted below.
    Example:java.io.FileNotFoundException
  • The message may vary depending on the DataSpider Servista version.
error_message Stores the error message for the occured error.
  • The value defaults to null.
  • The message may vary depending on the DataSpider Servista version.
error_trace Stores stack trace of the occurred error.
  • The value defaults to null.
  • The message may vary depending on the DataSpider Servista version or the client application used.

Null and empty string

Specification Limits

Main exceptions

Exception name Cause Solution
ResourceNotFoundException
Resource definition could not be found.Name:[]
The [Format] is not specified. Specify the [Format].
ResourceNotFoundException
Resource definition could not be found.Name:[<Global Resource Name>]
The resource definition specified in the [Format] is not found. Make sure the global resource specified in the [Format].
InvalidPropertyConfigurationException
<Property name> is not specified.
[<Property name>] is not specified. Specify the [<Property name>].
FileIsDirectoryException Path input in [File] is directory. Input file path in [File].
StructuredTextParseException
Could not read the file in the specified format.
The file specified in the [File] can not be parsed by the format specified in the [Format]. Make sure the [File] or [Format].
java.io.FileNotFoundException The file specified in [File] does not exist. Check the [File].
java.io.UnsupportedEncodingException The encoding that is not supported is specified in [Encoding]. Specify an encoding that is supported in Java SE Runtime Environment 8.
Refer to "Supported Encodings"(http://docs.oracle.com/javase/8/docs/technotes/guides/intl/encoding.doc.html) for details.