Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The Advanced Positional Schema activity defines the procedure to read data from and write data to a multiple record format file. You can do this by specifying the names and positions of the fields from which you want to fetch the data from.

...

  1. Go to Develop > Services > SchemaAdv. Positional

  2. Click Create New



  3. Anchor
    Advanced_Positional_Layout
    Advanced_Positional_Layout
    Type the name and description of the new Advanced Positional Schema in the Name and Description.
  4. Select the definition mode for the Advanced Positional Schema. You can define the schema in the following three ways:
     
    • Import Definition file
    • Use Data Dictionary
    • Enter the Fields Sequentially

  5. If you have selected Import Definition File as a definition mode, select the type of file from the Definition File (XSD or Field), and then click the Choose File to select the file that you want to use for defining the schema using the definition file.

    If you have selected Use Data Dictionary as a definition mode, then do the following:

     

     

     

    Image Removed

     

    1. Select the name of the data dictionary from the Data Dictionary, and then click Select Record. This will display the Select Record window.



    2. This screen displays the name of the data dictionary and the list of all records that are in the dictionary. Select the checkbox against the record that you want to display in the Advanced Positional Schema.
       

      Info
      Click Select All checkbox to display all records.
    3. Click OK. This closes the Select Record window and displays the selected records under the Record Definition. You can view or delete a record from this screen by clicking the appropriate button (View or Delete) for that record.

     

    If you have selected Enter the Fields Sequentially as a definition mode, then do the following:

    1. Select the field position - Field Length or Start & End Positions.
      Field Length: Select this option if the field length is used to set the field positions.
      Start & End Positions: Select this option if the start and end positions are used to set the field positions.

    2. Expand Record Definition or it will be automatically expanded on the selection of this option. 

    3. Type the name and description of the field in the FieldName and Description.
    4. Select the data type from the Type - number, string, or date.
    5. If the data type is date, select the format of the date and time from the Date Format and Time Format.
    6. If you have selected Field Length as a field separator then type the length of the field in the Length.
    7. If you have selected Start & End Positions as a field separator then type the start and end positions in the Start and End.

      Info

      The starting position of a row in a positional file is 1. In a positional file, the schema counts a tab as one position and not eight positions. By default, the schema creates these field positions in a sequence. You can also create a schema with fields that are not in a sequence. For more details, click here.

    8. Select the alignment of the field from the Align. Select L for left aligned and R for right aligned.

    9. Select Skip checkbox if you want to skip some fields while generating the XML for your schema. For example, your source file has over 1500 fields, but you only need to use 1000 fields. This Skip checkbox will omit the 500 unrequired fields and it will not read them when it parses the data to XML. However, the fields will be visible in the file. If you create the schema using an existing XSD, then the skipped fields will appear blank. However, when you will use the same schema in other activities such as Mapping, it will display all the fields of the file.

      Info

      The skipping of fields is useful in case where a standard XSD has a large number of fields. Skipping reduces the size of the XML that will now contain the required fields.
       
      While editing an existing schema, the field file that you will download, Adeptia Suite will represent the skipped fields by 'T' and unskipped fields by 'F'. This depiction will remain same while viewing the Print-Friendly Page.

    10. Type the name of any field in the Record Identifier and the value of the field in the ValueRecord Identifier is used to identify the records that will be parsed through this definition. You can also use the regular expression as a value by clicking Is Regex.

      Image Added

    11. Click Add Record to define another set of data and repeat the steps.
  6. After defining records, you need to define their hierarchy. This is mandatory for creating an Advance Positional schema.
  7. Once you finish adding the records, defining the Record Identifiers and their values, click Refresh under Hierarchy Definition. This populates the Record Identifiers of the defined records in the Record ID field under Hierarchy Definition.

     

  8. Select a record from the Record ID.

  9. Select Y or N from the Required list box to indicate if a record will appear in the source file.
  10. In the minoccur field, enter the minimum number of occurrences that you want a record to appear in the source file. If the Required field has the value as 'Y', then the minoccur field should at least have a minimum 1 occurrence in the source file. If the Required field has the value as 'N', then the minoccur field can be 0.
  11. In the maxoccur field enter the maximum number of occurrences that you want a record to appear in the source file. The maximum allowable value that you can enter in the maxoccur field is 2147483647.

...

Enable IsRemoveHeader Attribute
If you use Advance Positional schema as a target schema then, you can set the IsRemoveHeader attribute. This attribute will help you to skip the insertion/update of a record from the source file to the target database. You only need to set the IsRemoveHeader attribute to 'True'. This attribute is set in the Data Mapper, while mapping source and target schemas.
 

Steps to set IsRemoveHeader attribute
In the Data Mapper, load the source and target schemas. In the target schema, there is an IsRemoveHeader attribute.

...