Fixed-Length Write Wizard

Fixed-Length Write Wizard

Fixed-Length Write Wizard is a wizard with the ability to set the necessary schema definitions for generating fixed-length data from input data.
Refer to "Fixed-length text file" for details about fixed-length files

To launch Fixed-Length Write Wizard

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

Fixed-Length Write Wizard Screen Structure



Screen Element Number Name Description Remarks
(1) Column list Define structures of the input data.
Add fields which has the same number of columns in the input data and define structures which are the name, the type, the alignment, and the padding, etc. to the fields added.
  • The column list has the same structure as the Table model type.
    Refer to "Table model type" for details.
(2) Structure definition Define structures of the output data.
Define groups and records in the Structure Definition and add fields added in the column list to the groups and records added by drag and drop.
 
(3) Field(Column list)  
  • Fields are shown as yellow icons.
(4) 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.
(5) Add Add a field to the [Column list].
  • You can also operate to select [Add]-[Field] in the right-click menu of the "Column".
(6) Edit(Column list) Show the definition dialog of the field selected in the tree of the [Column list].
  • You can also operate to select [Property] in the right-click menu of the element.
(7) Group  
  • Groups are shown as blue icons.
(8) Record  
  • Records are shown as green icons.
(9) Fixed Value Field By adding fixed field to structure definition, it can be defined as constant field.
  • Fixed Value Fields are shown as yellow icons checked.
(10) Field(Structure Definition)  
  • Fields are shown as yellow icons.
(11) 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.
(12) Edit(Structure definition) 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.

Column List Configuration

Define a structure definition which defines columns of the input data as fields and define a record in the fixed-length data.

Field Configuration

Configure fields by the following steps.
  1. Operate either as follows to open "Field definition" dialog.
  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.
    • [String]:(default)
    • [Numeric]:
    • [Date]:
    • [Tag]:
    • [Numeric(Zoned decimal)]:
    • [Numeric(Packed decimal)]:
    • The records with the first field as [Tag] are treated as "Tag Records".
      • If the same tag records exist in several rows, only the first row will be output.
    Specify encoding Optional Select or enter any encoding.

    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.
    • Enabled when [String] or [Tag] is selected in [Field type].
    • When [Specify encoding] is not checked, uses [Encoding] in [Read settings].
    Field length Required Enter the length of the entire field in bytes.
    • When data in the input data is longer than the specified field length, data which is cut by the field length will be written.
    Starting position - Automatically displayed the start position of the field in the record.  
    Alignment Required Select the alignment of the field.
    • [Right]: (Default)
      Right-align the field.
    • [Left]:
      Left-align the field.
     
    Padding character Required Select a padding character.
    • [List]: (Default)
      Select from single-byte space(default), single-byte zero, double-byte space, double-byte zero.
    • [Direct]:
      Enter a padding character directly.
    • [Code]:
      Enter the character code of a padding character.
     
    Field type settings
    Item name Required / Optional Description Remarks
    Tag Optional Enter a 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".
    Number of decimal places Optional Enter the number of decimal places.
    • Enabled when [Numeric(Zoned decimal)] or [Numeric(Packed decimal)] is selected in [Field type].
    Zone nibble Optional Enter a nibble of the zone.
    • Enabled when [Numeric(Zoned decimal)] is selected in [Field type].
    • If you specify an zone nibble of 1 to 3 digits, zone nibble filled to 4 digits with "0" is set.
    • If omitted, the zone nibble is set based on the [Encoding] of [Read settings] in Read Fixed-length processing.Zone nibble set by the typical encoding is as shown below.
      Specify encoding Zone nibble
      Shift_JIS 0011
      Windows-31J 0011
      EUC-JP 0011
      ISO-8859-1 0011
      ISO-2022-JP 0011
      US-ASCII 0011
      UTF-8 0011
      UTF-16 0011
      UTF-16BE 0011
      UTF-16LE 0000
      EBCDIC(Cp930) 1111
    Sign format Optional Select the format of the code.
    • [None]: (default)
      Select if there is no sign.
    • [Leading]:
      Select when the sign is put into the first digit(Leading).
    • [Leading (Separate)]:
      Select when the sign is put as a separate byte before the first digit(Leading Separate).
    • [Trailing]:
      Select when the sign is put into the last digit(Trailing).
    • [Trailing (Separate)]:
      Select when the sign is put as a separate byte after the last digit(Trailing Separate).
    • Enabled when [Numeric(Zoned decimal)] or [Numeric(Packed decimal)] is selected in [Field type].
    Positive nibble Optional Enter a positive nibble.
    • Enabled when any sign format except the [None] in the [Sign format] is selected.
    • When a positive nibble is specified is less than 4 digits, the positive nibble will be 4 digits which consist of he specified value and "0" added.
    • "1100" is set when omitted.
    Negative nibble Optional Enter a negative nibble.
    • Enabled when any sign format except the [None] in the [Sign format] is selected.
    • When a negative nibble is specified is less than 4 digits, the negative nibble will be 4 digits which consist of he specified value and "0" added.
    • "1101" is set when omitted.

    Nibbles is a unit of information amount, it equal to 4 bits.

  3. Click the [Finish] button to add the field to the column list.

Structure Definition Configuration

Define structure of the output data.

Group Configuration

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

  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 Not used in write operation.  
    Omittable Optional Not used in write operation.  
    Unlimited Optional Not used in write operation.  

  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 and show the "Record definition" dialog.

  2. Configure properties in the "Record definition" dialog.
    Record Properties
    Item name Required / Optional Description Remarks
    Record name Required Enter a name of the record.  
    Occurrence Optional Not used in write operation.  
    Omittable Optional Select whether to write the input data corresponding to the record to each and every row.
    • [Checked]:
      • If the input data corresponding to the record is the same with the row before, output data could be omitted.
      • The output data is omitted when all the following conditions are matched.
        • In the subsequent records, there are no record with the [Omittable] which is "Not Checked".
        • In the subsequent records, record with the [Omittable] which is "Checked" exists, and the input data corresponding to the record is the same with 1 row before.
        • In the subsequent record, there is a record with the first field being tag field, and the input data corresponding to the record is the same with 1 row before.
        • It is not the end row of the input data.
    • [Not Checked]: (default)
      • Records are always written to each row.
     
    Unlimited Optional Not used in write operation.  

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

Field Configuration

Configure fields by the following steps.
  1. Select a field defined in the [Column list] and do drag and drop the record to a record defined in the [Structure Definition].



  2. Add a field to the structure definition and link the fields.

Fixed Value Field Configuration

Configure fields by the following steps.
  1. Select [Add]-[field] in the right click menu for record icons and show the "Field definition" dialog.

  2. Configure properties in the "Field definition" dialog.
    Refer to "Field Configuration(Column list)" for details.
    The [Field name] is written as an output value.

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

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,Windows-31J,3, ,L,0,,,,,true
    FIELD,String,string,,Windows-31J,5, ,L,0,,,,,true
    FIELD,Number,numeric,,,3, ,R,0,,,,,true
    FIELD,Date,date,$yyyy/$MM/$dd,,10, ,R,0,,,,,true
    FIELD,Zoned decimal,zoned,,,2, ,L,0,T,,1100,1101,true
    FIELD,Packed decimal,packed,,,2, ,L,0,T,1111,1100,1101,true

Import Structure Definition File

Import the following structure definition file .
GROUP,group,,false
RECORD,record,,false
FIELD,Tag,tag,HDR,3, ,L,0,,,,,true
FIELD,String,string,,Windows-31J,5, ,L,0,,,,,true
FIELD,Number,numeric,,,3, ,R,0,,,,,true

  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