Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Corrected links that should have been relative instead of absolute.

The Advance 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.
This feature is available in:

Enterprise

Premier

Professional

Express

?

?

?

?

...

  1. On the Adeptia Suite homepage, go to Configure ? Services ? Schema and then click the Adv. Positional.

...

  1. Click the Create New link. This action will show the Create Advance Positional Schema screen.
  2. Enter the name and description for Advance Positional Schema in the Name and Description textboxes respectively.
  3. You need to create the schema definition for the Advance Positional Schema. You can define the schema in three ways. These are outlined as:
  • Import Definition file
  • Use Data Dictionary
  • Enter the Fields Sequentially
  1. Select the Import Definition File radio button, select the type of file from the dropdown list, and then click the Browse button to select the file that you want to use for defining the schema using[ the definition file .
  2. To define the schema using a data dictionary, click the Use Data Dictionary radio button, select the name of the data dictionary from the dropdown list, and then click the Select Record button. This will display you the Select Record screen (see Figure 222).

...

Image Removed

To know, how to create Data Dictionary, refer to the Creating Data Dictionary section.

  1. This screen will display you the name of the data dictionary and a list of all the records that are in the dictionary. Select the checkbox against the record that you want to display in the Advance Positional schema.

    Image Removed

    To display all records, select the Select All checkbox.

  2. Click OK. This closes the Select Record screen and displays the selected records under Record Definition on the Manage Advance Positional Schema screen (see Figure 223). You can view or delete a record from this screen by clicking the appropriate button for that record.

...

  1. To enter the fields manually, select the Enter the Fields Sequentially Using radio button and then click Record Definition.

...

  1. Enter the name and description of the field in the FieldName and Description textboxes respectively.
  2. Select the type of data from the Type dropdown list. For data type selection, please refer to Table 2.
  3. If data type is Date, select the format of date and time from the DateFormat and TimeFormat dropdown lists respectively.
  4. To define field position select one of the following options:
  • Field Length
  • Start & End Positions

...

Image Removed

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 sequence. For details, refer to the Defining Field Positions Non-Sequentially
section.

...

Image Removed

...

Image Removed

...

Image Removed

...

Record Identifier is used to identify the records which will be parsed through this definiton.
In Value you can also use regular expressions. To use regular expression enable Is Regex.

...

  1. Select a record from the Record ID list box.
  2. Select Y or N from the Required list box to indicate if a record will appear in the source file.
  3. 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.
  4. 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.

Using Hierarchy at Root Level

Steps to use a hierarchy at the Root Level

  1. Click the Add Root Record button. This creates a record at the same level as that of the previous root record as shown in the figure (see Figure 227).

...

Image Removed

Every record must have a unique Record ID. For example, if the first root record is John , then you need to select Stationary in the next root record.

Using Record at Child Level

...

Image Removed

A parent and child record must have a unique Record ID in one hierarchy. For example, if John is the parent record, then you need to select Stationary as the child record. Similarly, if you create another child record under Stationary, then you need to select North as its Record ID (see Figure 229).

...

Image Removed

You can remove a record by selecting the record and clicking the Remove button. This will display you a confirmation delete dialog box on clicking OK this action will delete the record.
Alternately, if you delete the last fieldname of a record and then save the schema, this action will delete the entire field. For example, a record has three fields – Name, Description, and Age. Now deleting Age will result in deletion of the entire field.
If a record has one or more child records then, deleting the parent record will result in deletion of all of its child records.

...

  1. Click the Populate button to view the XML code for the hierarchy you had just made.

As this field is editable, you can edit or enter new XML code for the hierarchy and this code will then override the existing hierarchy. In case there are numerous records then, you can create a flat hierarchy and edit that XML code to change the hierarchy as per your wish.

Image Removed

We recommend you to copy this XML code, edit it in another XML editor, and then make any changes. Once you are done with the changes, you can paste it into the Hierarchy XML field. Once you update the XML code, you should not click the Populate button again or make any changes to the Hierarchy, as these actions will then replace your XML code with the original XMLcode.

  1. If the source file does not have any carriage return then disable the Handle CR/LF (Source Data) checkbox.

By default, this option is checked, as the schema expects a file with carriage return. This option is applicable only if you are using the schema at the source end.

  1. Enter the record separator for the target records in the Target Record Separator textbox.
  2. If you want to pass a specific length of data and ignore the rest of the data then you can select the Data Truncation checkbox.
  3. If you want that the target record identifier in XML should match with the value specified in the schema then you need to select the Validate Target Record Identifier checkbox.

By default, this checkbox is unchecked. This means that if the Record Identifier Value is not exactly same, then it will not generate error records.

  1. If you want to parse the data even if the number of fields in the data file are less than the number of fields specified in the schema then, select the Allow Less Fields checkbox.

If you use the schema at the source end and check the Allow Less Fields checkbox then the schema will parse the input data and insert the empty tag for missing fields. If you use the schema at the target end then, the schema will write all the incoming tags in XML as input.

  1. If you want to generate error records when the number of fields in the source data is more than the number of fields specified in the schema then, uncheck the Allow More Fields checkbox.

If this checkbox is checked then your Process Flow will only parse those fields that you specify in your schema. It will ignore all the other fields.

...

Image Removed

To learn about other Advanced Properties refer to the Changing Advanced Properties section.

...

By default, XML creates the fields of a schema sequentially. At times, you may need to create a schema with field positions that are not in sequence. For example, there are 500 fields in the source file and you need to create a schema by using only 200 fields. But these 200 fields are not sequential. In such a case, you can create a schema by defining the start and end position of these fields in a non-sequential manner.
Steps to define field positions non-sequentially

...

This implies that, when you create a schema, field1 will have 10 positions. However, field2 will start at the 15th position. The positions between 11 and 14 will remain blank.

Image Removed

You can also change the field positions non-sequentially, while editing the schema.
This feature is available for Advance Positional and Positional Schemas only.

...

You can view the summary, record definition, and hierarchies of a schema in edit mode.
Steps to view Print page

  1. On the Adeptia Suite homepage, click the Develop tab.
  2. Go to Services ? Schema and then click Adv. Positional.

The Manage Advance Positional Schema screen is displayed (refer to Figure 221).

  1. Click the schema to view it in Edit mode or click the More Actions icon under the Actions column and select the View option.

...

  1. Click the Print button. This action will display you the Summary screen (see Figure 232).

...

Image Removed

You can print a summary of the EDI segment definition and hierarchies too.
Similarly, you can view the Print-friendly page for the Positional Data Dictionary, by clicking the Print-friendly Page button on the Edit Positional Data Dictionary screen.

...

Anchor_Toc226191156_Toc226191156 Anchor_Toc315524593_Toc315524593 Anchor_Toc317062179_Toc317062179Enable 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 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.

To create an Advanced Positional Schema:

  1. Go to Develop > Services > SchemaAdv. Positional

    Image Added

  2. Click Create New

    Image Added

  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:

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

      Image Added

    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.

      Image Added

     

    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.

      Image Added

    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.
    Image Added 

  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, type the minimum number of occurrences that you want a record to appear in the source file. If the value of the Required field is 'Y' then the minoccur must have at least minimum 1 occurrence in the source file. If the value of the Required field is 'N' then the minoccur field must be 0.
  11. In the maxoccur, type 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.

Using Hierarchy at Root Level

To use a hierarchy at the Root Level

  1. Click Add RootRecord. This creates a record at the same level as that of the previous root record as shown in the following figure.

    Image Added

  2. Select a record from the Record ID field and enter all the related information.
  3. Repeat step 8-11 to create another root record.

    Info

    Every record must have a unique Record ID. For example, if the first root record is John, then you need to select Smith in the next root record.

Using Record at Child Level

  1. Click Add Child. This creates a child record at a level below the Root record as shown in the following figure.

    Image Added

  2. Select a record in the Record ID field of the child record and enter all the related information.
  3. Repeat step 8-11 to create a child record.

    Info

    A parent and child record must have a unique Record ID in one hierarchy. For example, if John is the parent record, then you need to select Stationary as the child record. Similarly, if you can create another child record under Stationary then you need to select North as its Record ID.

    Info

    You can remove a record by selecting the record and then clicking Remove. Click OK, when prompted to confirm. Alternately, if you delete the last fieldname of a record and then save the schema, this action will delete the entire field. For example, a record has three fields – Name, Description, and Age. Now deleting Age will result in the deletion of the entire field.

    If a record has more than one child records then deleting the parent record will delete all its child records.

  4. Expand Advanced Properties

    Image Added

  5. Click Populate to view the XML code for the hierarchy you have just made.

    You can also edit or type new XML code for the hierarchy and this code will then override the existing hierarchy. In case there are numerous records then you can create a flat hierarchy and edit that XML code to change the hierarchy as per your wish.

    Info

    It is recommended to copy the XML code, edit it in another XML editor, and then make any changes. Once you are done with the changes, paste it into the Hierarchy XML. Once you update the XML code, don't click Populate again or make any changes to the Hierarchy, as these actions will replace your XML code with the original XML code.

  6. If the source file does not have any carriage return then clear the Handle CR/LF (Source Data) check box. By default, this option is checked, as the schema expects a file with a carriage return. This option is applicable only if you are using the schema at the source end.
  7. Type the record separator for the target records in the Target Record Separator.
  8. Select the Data Truncation check box to pass a specific length of data and ignore the rest of the data.
  9. Select the Validate Target Record Identifier check box to match the target record identifier in XML with the value specified in the schema. 
  10. Select the Allow Less Fields check box to parse the data even if the number of fields in the data file is less than the number of fields specified in the schema. If you use the schema at the source end and select the Allow Less Fields check box then the schema will parse the input data and insert the empty tag for missing fields. If you use the schema at the target end then the schema will write all the incoming tags in XML as an input.
  11. If you want to generate error records when the number of fields in the source data is more than the number of fields specified in the schema then clear the Allow More Fields check box. If you select this check box then your process flow will only parse those fields that you specify in your schema ignoring all the other fields.

  12. Select the Filter Invalid XML Characters check box to filter the invalid XML characters. 

  13. Select Remove Space(s) check box if on source side all the leading and trailing space need to be removed from the data value.

  14. Select Remove Leading Zero(s) check box if on source side all the leading zero(s) needs to be removed from the numeric data value.

    Info

    For information about other Advanced Properties, refer to Changing Advanced Properties.

  15. Click Save.

Anchor
creatingdatabaseschema
creatingdatabaseschema
Anchor
fieldpositionsnonsequential
fieldpositionsnonsequential
Anchor
_Defining_Field_Positions
_Defining_Field_Positions
Defining Field Positions Non-Sequentially

By default, XML creates the fields of a schema sequentially. At times, you may need to create a schema with field positions that are not in sequence. For example, there are 500 fields in the source file and you need to create a schema by using only 200 fields. But these 200 fields are not sequential. In such case, you can create a schema by defining the start and end position of these fields in a non-sequential manner. To define the field positions non-sequentially:

  1. Click Start & End Positions as a field separator.
  2. In the Record Definitions, type the name and description of the field in the FieldName and Description.
  3. Select the type of data from the Type.
  4. The default value of the start position in the Start is 1. You can edit the start position as per your requirement.
  5. Type the end position of the field in the End after which you want to create a field position that is not in sequence.
  6. In the next Start field, you can define a new start position for this field. For example, if the field that you made has 1 and 10 in the Start and End field respectively, so now you can define a start position (other than 11) such as 15 and the end position such as 25 for this new field that you are creating.
    This implies that, when you create a schema, field1 will have 10 positions. However, field2 will start at the 15th position. The positions between 11 and 14 will remain blank.

     

Anchor
_Viewing_Print-Friendly_Page
_Viewing_Print-Friendly_Page
Viewing Print Page

You can view the summary, record definition, and hierarchies of a schema in edit mode.

Steps to view Print page 

  1. Go to Develop > Services > Schema > Adv. Positional
  2. Click the schema to view it in an edit mode or click Image AddedView. This will display the Edit Advance Positional Schema screen.

    Image Added

  3. Click Print. This action will display you the Summary screen.

    Image Added

 

Special Usage Scenario

Enable IsRemoveHeader Attribute
If you use Advanced Positional Schema as a target schema then you can set the IsRemoveHeader attribute. This attribute skips the insertion/updation 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 To set the IsRemoveHeader attribute:

  1. In the Data Mapper, load the source and target schemas. In the target schema, there is

...

  1. an IsRemoveHeader

...

  1.  attribute.
  2. Create a constant that has a value 'true' and map it to IsRemoveHeader attribute of the target schema.
  3. Save the Mapping activity.

    Image Removed

    To learn
    Info

    For information on how to use Data Mapper, refer to

    the

    Using Data Mapper

    section

    .