Variable-Length Wizard

Variable-Length Wizard

Fixed-Length Wizard is a wizard with the ability to define schema of variable-length text file by drag&drop operation.
Refer to "Variable-length text file" for details about variable-length files.

To launch Variable-Length Wizard

You can click the [Variable-Length Wizard] in the configuration dialog for the variable-length format definition in the Global Resource to launch the Variable-Length Wizard.

Variable-Length Wizard Screen Structure



Screen Element Number Name Description Remarks
(1) Structure definition Define structures of a variable length file to read.
This adapter reads a variable length file by following the definition.
  • The structure definition is a tree structure which has a structure definition icon as a root element.
(2) Column list Define structures of the output data.
Data only defined in the structure definition is read.
  • Elements set in the structure definition can be added to the column list.

  • The column list has the same structure as the Table model type.
    Refer to "Table model type" for details.
(3) Group  
  • Groups are shown as blue icons.
(4) Record  
  • Records are shown as green icons.
(5) Field  
  • Fields are shown as yellow icons.
(6) Remove(Structure definition) Delete the element selected in the tree of the [Structure Definition].
  • You can also operate to select [Delete] in the right-click menu of the element.
(7) Edit Show the definition dialog of the element selected in the tree of the [Structure definition].
  • You can also operate to select [Property] in the right-click menu of the element.
(8) Add Add an element to the [Column list] selected in the tree of the [Structure definition].  
(9) Remove(Column list) Delete the element selected in the tree of the [Column list].
  • You can also operate to select [Delete] in the right-click menu of the element.
(10) Up Move up the order of the element selected in the tree of the [Column list].  
(11) Down Move down the order of the element selected in the tree of the [Column list].  

Structure Definition Configuration

Define data structures of a variable length file to read.

Group Configuration

Configure groups by the following steps.
  1. Select [Add]-[Group] in the right click menu for structure definition icons.

  2. Configure properties in the "Group definition" dialog.
    Basic settings
    Item name Required / Optional Description Remarks
    Group name Required Enter a name of the group.  
    Occurrence Optional Enter occurrence of the group.
    • Enabled when the [Unlimited] is not checked.
    Omittable Optional Select whether to omit the [Occurrence].
    • [Checked]: (default)
      Omit the [Occurrence].
    • [Not Checked]:
      Enter the [Occurrence].
     
    Unlimited Optional Select whether to set unlimited to the [Occurrence].
    • [Checked]: (default)
      Set unlimited to the [Occurrence].l
    • [Not Checked]:
      Set a limit to the [Occurrence].
     

  3. Click the [Finish] button to the group to the structure definition.

Record Configuration

Configure records by the following steps.
  1. Select [Add]-[Record] in the right click menu for structure definition icons or group icons.

  2. Configure properties in the "Record definition" dialog.
    Basic settings
    Item name Required / Optional Description Remarks
    Record name Required Enter a name of the record.  
    Occurrence Optional Enter occurrence of the record.
    • Enabled when the [Unlimited] is not checked.
    Omittable Optional Select whether to omit the [Occurrence].
    • [Checked]: (default)
      Omit the [Occurrence].
    • [Not Checked]:
      Enter the [Occurrence].
     
    Unlimited Optional Select whether to set unlimited to the [Occurrence].
    • [Checked]: (default)
      Set unlimited to the [Occurrence].l
    • [Not Checked]:
      Set a limit to the [Occurrence].
     

  3. Click the [Finish] button to the record to the structure definition.

Field Configuration

Configure fields by the following steps.
  1. Select [Add]-[field] in the right click menu for record icons.

  2. Configure properties in the "Field definition" dialog.
    Basic settings
    Item name Required / Optional Description Remarks
    Field name Required Enter a name of the field.  
    Field type Required Select a type of the field. Available characters are as follows.
    • [String]:(default)
    • [Numeric]
    • [Date]
    • [Tag]
     
    Tag Optional Enter tag (record identification code).
    • Enabled when [Tag] is selected in [Field type].
    Date format Optional Select or enter a date format.
    Year Meaning Display Example
    y Year Number 1996
    M Month Text or number July or 07
    d Day Number 10
    h Hour (1-12) Number 12.
    H Hour (0-23) Number 0
    m Minute Number 30
    s Second Number 30
    S Millisecond Number 978
    • Enabled when [Date] is selected in [Field type].
    • The default is "$yy$MM$dd".

  3. Click the [Finish] button to add the field to the structure definition.

Column List Configuration

Define an output format of the data to read by the structure definition.

Add element

Select an element in the [Structure definition], and click [Add] button of structure definition tree to add the field to the [Column list].
}Only fields can be added to the column list.
When a filed is selected and added to the column list, the last selected field will be added to the [Column list].
When a group or a record is selected and added to the column list, fields in the group or record will be added to the column list.
In the following cases, the order of the field added to the list columns can not be guaranteed.

Structure definition file export / import function

The column list and structure definitions defined in the wizard, can be saved in CSV file format, and the the column list and structure definitions can be restored from the file.
Once structure definition file is created, it can be used in both read and write process.

Structure Definition File Specifications

Export structure definition file

Export the following structure definition.



  1. Select [Export] from [Structure definition file] menu.

  2. Select or enter the destination file, and Press [Finish].
    Specify the absolute path of the DataSpider file system as the file path.
    Constrained characters of DataSpider File System cannot be used except for path separator "/".
    Click [Browse] button to activate the file Selectr and Select the file.
    Click [Preview] button to display the contents of the specified in file.

  3. "Export completion" dialog will appear when export succeeded.

  4. Exported content is as follows.
    GROUP,Group,,false
    RECORD,Record,,false
    FIELD,Tag,tag,HDR,false
    FIELD,String,string,,true
    FIELD,Number,numeric,,true
    FIELD,Date,date,$yyyy/$MM/$dd,false



    <= field output to column list
    <= field output to column list

Import Structure Definition File

Import the following structure definition file .
GROUP,group,,false
RECORD,record,,false
FIELD,Tag,tag,HDR,false
FIELD,String,string,,true
FIELD,Number,numeric,,true



<= field output to column list
<= field output to column list

  1. Select [Import] from [Structure definition file] menu.

  2. Select or enter the import file, and Press [Finish].
    Specify the absolute path of the DataSpider file system as the file path.
    Constrained Characters of DataSpider File System except for path separator "/" cannot be used.
    Click [Browse] button to activate the file Selectr and Select the file.
    Click [Preview] button to display the contents of the specified in file.
    If Structure definition already exists, an alert box appears to check whether to overwrite.

  3. The structure definition will be shown in the Wizard if following dialog will appear when export succeeded.



Note when editing the structure definition file

Specification Limits