Versions Compared

Key

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

The Advance Advanced Positional schema 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.

Steps to To create Advance an Advanced Positional schema

...

Schema:

  1. Go to Develop > Services > Schema and then click the Adv. Positional. The Manage Adv. Positional Schema screen is displayed.

    Image Removed

     

     

    Image Added

  2. Click the Create New link. This action will show the Create Advance Positional Schema screen.

    Image Added

  3. Anchor
    Advanced_Positional_Layout
    Advanced_Positional_Layout
    Enter Type the name and description for Advance of the new Advanced Positional Schema in the Name and Description text boxes respectively.
  4. You need to create Select the schema definition mode for the Advance Advanced Positional Schema. You can define the schema in the following three ways. These are outlined as:
     
    • Import Definition file
    • Use Data Dictionary
    • Enter the Fields Sequentially

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

     

    To define the schema using a data dictionary, click the Use Data Dictionary radio button, select If you have selected Use Data Dictionary as a definition mode, then do the following:

     

     

     

    Image Added

     

    1. Select the name of the data dictionary from the

    dropdown list
    1. Data Dictionary, and then click

    the
    1. Select Record

    button
    1. . This will display

    you the Select Record screen.

    Image Removed

    Info

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

    This screen will display you
    1. the Select Record window.

      Image Added

    2. This screen displays the name of the data dictionary and

    a
    1. the list of all

    the
    1. records that are in the dictionary. Select the checkbox against the record that you want to display in the

    Advance
    1. Advanced Positional

    schema
    1. Schema.
       

      Info
    To
    1. Click Select All checkbox to display all records
    , select the Select All checkbox
    1. .
    Click
    1. Click OK. This closes
    the
    1. the Select Record
    screen
    1.  window and displays the selected records under the Record Definition
    on the Manage Advance Positional Schema screen
    1. . You can view or delete a record from this screen by clicking the appropriate button (View or Delete) for that record.
    Image Removed

    1. Image Added

     To enter

    the fields manually, select the If you have selected Enter the Fields Sequentially Using radio button and then click Record Definition. This action will further expand to display the Record Definition fields. 

    Image Removed

     

    Enter

    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
    1. the FieldName
    and
    1.  and Description
    textboxes respectively
    1. .
    2. Select the data type
    of data
    1. from the Type
    dropdown list
    1. - number, string, or date.
    2. If
    data
    1. the data type is
    Date
    1. date, select the format of the date and time from
    the DateFormat and TimeFormat dropdown lists respectively.
  6. To define field position select one of the following options:
    • Field Length
    • Start & End Positions
  7. To define the field position using field length, select the Field Length radio button and then enter
    1. the Date Format and Time Format.
    2. If you have selected Field Length as a field separator then type the length of the field in the Length
    fieldEnter the end position of the field in the End textbox
    1. .
  8. To define the field position using start and end position, select the Start & End Position radio buttons.
  9. Enter the start position of the field in the Start textbox.
    1. 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.


    1. In a positional file, the schema counts a tab as one position and not eight positions.


    1. 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,

    refer to the Defining Field Positions Non-Sequentially section
    1. click here.

    2. Select the alignment of the field from the Align

    dropdown list. InfoFrom Align select
     L if the field is left aligned.
     R if the field is
    1. . Select L for left aligned and R for right aligned.


     
    To insert rows, specify the number and position of the rows that you want to add in the Number of Rows and at Position fields respectively and then click the Add Row button. You can add a maximum of 99 rows at a time.
    1. Select

    the
    1. Skip

    checkbox
    1.  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
    1. This Skip

    checkbox
    1.  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

    which
    1. that will now contain the required fields

    that we require
    1. .
       
      While editing an existing schema, the field file that you will download,

    the
    1. Adeptia Suite will represent the skipped fields by 'T' and

    the
    1. unskipped fields by 'F'

    (see Figure 225)
    1. . This depiction will remain

    the
    1. same while viewing the Print-Friendly Page.

    Image Removed
    1. Image Added

    Enter
    1. Type the name of any field in
    the
    1. the Record Identifier
    textbox and
    1.  and the value of the field in
    the
    1. the Value
    textbox
    1. .
    Info
    1.  Record Identifier is used to identify the records
    which
    1. that will be parsed through this definition.

    In Value you
    1. You can also use
    regular expressions. To use
    1. the regular expression
    enable
    1. as a value by clicking Is Regex.
    Click
    1. Click Add Record
    to
    1.  to define another set of data and repeat the steps
    from 6 to 20
    1. .
  10. After defining records, you need to define their hierarchy. This is mandatory for creating an Advance Positional schema.
  11. Once you finish adding the records, defining the Record Identifiers , and their values, click the Refresh button under  under Hierarchy Definition. This populates the Record Identifiers of the defined records , in the the Record ID field  field under Hierarchy Definition.

    Image Removed


    Image Added 

  12. Select a record from the Record ID

    list box

    .

  13. Select Y or N from the Required list box to indicate if a record will appear in the source file.
  14. 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.
  15. 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.

...

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

  2. Select a record from the Record ID field and enter all the related information.
  3. Repeat step 248-27 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 Stationary in the next root record.

    Using Record at Child Level

  4. Steps to use a record at the Child Level

...

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

  2. Select a record in the Record ID field of the child record and enter all the related information.
  3. Repeat step 248-27 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 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 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.

  4. Click Advanced Properties. Advanced properties of an advance positional schema is shown below.

     

  5. 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.

    Info

    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.

  6. 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 a carriage return. This option is applicable only if you are using the schema at the source end.
  7. Enter the record separator for the target records in the Target Record Separator textbox.
  8. 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.
  9. 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.

  10. 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.
  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, 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.

  12. You can filter the invalid XML characters by selecting the Filter Invalid XML Characters checkbox. If you want to prevent the abortion of the mapping process due to the invalid XML characters then this checkbox will help you achieve that.

    Info

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

  13. Click the Save button.

...

Anchor
creatingdatabaseschema
creatingdatabaseschema
Anchor
_Toc110927910_Toc110927910
Anchor
_Toc112820652_Toc112820652
Anchor
_Hlt113171631_Hlt113171631
Anchor
_Hlt113171708_Hlt113171708
Anchor
_Hlt113171786_Hlt113171786
Anchor
_Toc114994111_Toc114994111
Anchor
_Hlt114994286_Hlt114994286
Anchor
_Toc134848072_Toc134848072
Anchor
_Toc144314350_Toc144314350
Anchor
_Hlt145312006_Hlt145312006
Anchor
_Hlt145312018_Hlt145312018
Anchor
_Hlt145312026_Hlt145312026
Anchor
_Hlt147206877_Hlt147206877
Anchor
_Hlt147206920_Hlt147206920
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 a case, you can create a schema by defining the start and end position of these fields in a non-sequential manner.

...

Info

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

 

Anchor
_Viewing_Print-Friendly_Page
_Viewing_Print-Friendly_Page
Anchor
_Ref156148053
_Ref156148053

...

Viewing Print Page

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

...

Info

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.

...

...

Special Usage Scenario

...

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.

...