# Data Structure

ISM data structures come from these source types.

<table><thead><tr><th width="175">Type</th><th>Description</th></tr></thead><tbody><tr><td>Manual</td><td><p>This type consists of field groups, and field groups are comprised by fields. This type data has master-detail hierarchy.</p><p>This type data structure is generated with this order.</p><p>·       Field - create fields one by one.</p><p>·       Field group - create field groups with fields.</p><p>·       Master/Detail - Assemble master/detail with field groups.</p></td></tr><tr><td>DB</td><td><p>This is from table. There are two types of data structure generation.</p><p>·       From table layout - ISM connects to the target database, retrieves table information, and choose a table.</p><p>·       From user query - ISM executes the query and generate a data structure.</p></td></tr><tr><td>Excel</td><td><p>This type is from an excel file.</p><p>There are two types of data structure generation.</p><p>From template - the excel sheet follows ISM data structure template.</p><p>From header - the values of the first row of the excel sheet are the names of the fields.</p></td></tr><tr><td>XML</td><td>This type is from a sample xml content.</td></tr><tr><td>JSON</td><td>This type is from a sample json content.</td></tr><tr><td>WSDL</td><td>This type is from a WSDL.</td></tr></tbody></table>

&#x20;

## **Manual**

This is the original type of data structure of ISM. This type of data structure consists of multiple (1..N) masters and multiple (0..N) details.

Master and detail are field groups. One master field group can have multiple (0..N) detail field groups.

!\[A screenshot of a computer

Description automatically generated with low confidence]\(<https://support.xnarum.com/download/manuals/ISM-Manual-2023.fld/image085.png>)

Detail field groups can be repeated.

<figure><img src="https://support.xnarum.com/download/manuals/ISM-Manual-2023.fld/image086.png" alt=""><figcaption></figcaption></figure>

The data above screenshot consists of one header part and repeated body part. This is the data structure of the data.

<figure><img src="https://support.xnarum.com/download/manuals/ISM-Manual-2023.fld/image087.png" alt=""><figcaption></figcaption></figure>

The header has 3 fields and body has 2 fields and repeatable. The repeat count, i.e., the record count is determined by the 3rd field of the header. The 3rd field of the header indicates repeat count is 5, and body part is repeated 5 times. If the repeat count is fixed, then no indicator is used.

This data has a record delimiter, and this record delimiter is used to separate master records and detail records in the master. If a record delimiter is set, then the same delimiter is used to separate the detail records.

These are the steps to create a new data structure.

·       Choose type - Manual(ISM)

<figure><img src="https://support.xnarum.com/download/manuals/ISM-Manual-2023.fld/image088.png" alt=""><figcaption></figcaption></figure>

·       Add master field group

&#x20;

1\)     Click Add Master button.

2\)     Double click a field group.

3\)     Selected field group is added as a master.

!\[A screenshot of a computer

Description automatically generated]\(<https://support.xnarum.com/download/manuals/ISM-Manual-2023.fld/image089.png>)

·       Add detail field group.

&#x20;

1\)     Click Add Detail button.

2\)     Double click a field group.

3\)     Selected field group is added as detail field group.

<figure><img src="https://support.xnarum.com/download/manuals/ISM-Manual-2023.fld/image090.png" alt=""><figcaption></figcaption></figure>

If this detail group is repeated, set the repeat count or indicator.

If any record delimiter is used, set the record delimiter. If no record delimiter is set, master records are separated by length.

## **DB**

The data structure from database requires system information. The target database should be registered before this step. These are the steps to create a data structure from database.

1\)     Choose the target database.

2\)     Click Retrieve button to load tables.

3\)     Select the target table and click Choose.

Then the fields are displayed.

&#x20;

<figure><img src="https://support.xnarum.com/download/manuals/ISM-Manual-2023.fld/image091.png" alt=""><figcaption></figcaption></figure>

Or these fields can be generated from a query.

<figure><img src="https://support.xnarum.com/download/manuals/ISM-Manual-2023.fld/image092.png" alt=""><figcaption></figcaption></figure>

The generated data structure is the same as ISM data structure. This data structure has one master field group.

&#x20;

## **Excel**

The data structure from an excel file comes from a sheet. The excel sheet can be a template excel sheet or just records with column names.

<figure><img src="https://support.xnarum.com/download/manuals/ISM-Manual-2023.fld/image093.png" alt=""><figcaption></figcaption></figure>

Drag and drop excel file and sheets are listed. Choose the target sheet, check/uncheck Template, and click Retrieve.

!\[Shape

Description automatically generated with low confidence]\(<https://support.xnarum.com/download/manuals/ISM-Manual-2023.fld/image094.png>)

### **Template**

Template excel sheet looks like this screenshot. The sample template file(fieldgroup\_meta.xls) is located under data directory.

<figure><img src="https://support.xnarum.com/download/manuals/ISM-Manual-2023.fld/image095.png" alt=""><figcaption></figcaption></figure>

&#x20;

These are the attributes of the template sheet.

<table><thead><tr><th>Column Name</th><th width="258">Column Description</th><th>Input Type</th><th>Allowed Values</th></tr></thead><tbody><tr><td>FIDLE ID</td><td>Field ID to use. Automatically generated</td><td>not allowed</td><td> </td></tr><tr><td>Field Name</td><td>real field name : table column, message field</td><td>mandatory</td><td> </td></tr><tr><td>Field Description</td><td>Field description</td><td>optional</td><td> </td></tr><tr><td>Type</td><td>Field type</td><td>mandatory</td><td><ul><li>C - Char</li><li>N - Number</li><li>D - Date</li><li>B - Binary</li></ul></td></tr><tr><td>Length</td><td>Field length. If length is not fixed, just enter 0</td><td>mandatory</td><td>only number<br>for binary type, only 4 is allowed</td></tr><tr><td>format</td><td>Field format. Used for Number and Date<br>for Number, use NNNN.NN. The dot means a point. This point is included in the field length.<br>for Date, use java date format</td><td>optional<br>mandatory for date</td><td> </td></tr><tr><td>fill letter</td><td>this letter is used to fill remaining bytes, when the field is used for fixed length data<br>For Number type default fill letter is 0.<br>For char type default fill letter is ' '</td><td>optional</td><td>one byte letter.</td></tr><tr><td>alignment</td><td>alignment type - left, right.<br>For char type, left alighment is defult.<br>For number type, right alignment is default.</td><td>optional</td><td>L - left<br>R - right</td></tr><tr><td>length field type</td><td>indicates this field shows the length of partial or entire data</td><td>optional</td><td><ul><li>T - whole length</li><li>P - partial length</li><li>F - field group length</li><li>N - not a length field</li></ul></td></tr><tr><td>adjustment value</td><td>Used when this field is length field which shows partial or entire length of message. If the length shows the entire length, adjustment value is 0. But when this value doesn't include all the fields in the field group or entire message, the correct length should be adjusted by this adjustment value.<br>Add the adjustment value after calculating the length value.<br>for example,<br>length value is 100 and adjustment value is 8.<br>Result length value is 108.<br>length value is 100 and adjustment value is -8.<br>Result length value is 92.</td><td>optional</td><td>> 0<br>= 0<br>&#x3C; 0</td></tr><tr><td>is key</td><td>it shows this field is key field or not<br>several key fields are allowed for one field group</td><td>optional</td><td>Y = Key field<br>N = Normal field</td></tr><tr><td>nullable</td><td>used when this field stands for table column. If the input value is null, and nullable is true, then null data is inserted into table.<br>Default value is nullable</td><td>optional</td><td>Y = Nullable<br>N = Not null</td></tr><tr><td>is sql function</td><td>Used after transformation for table operation. If sql function flag is true, the result value of the transformation of this field is treated as a sql function and generated sql query contains the result as a part of the query, not the variable.</td><td>optional</td><td>Y = SQL Function<br>N = normal field</td></tr><tr><td>inout type</td><td>for stored procedure<br>default is input</td><td>optional</td><td>I = IN<br>O = OUT<br>B = INOUT</td></tr></tbody></table>

&#x20;

### **Data**

If the sheet is not a template, the first row is treated as header, parsed, and displayed. It is not necessary for the header to start from the first row of the sheet. The first row mean the first row which has data.

<figure><img src="https://support.xnarum.com/download/manuals/ISM-Manual-2023.fld/image096.png" alt=""><figcaption></figcaption></figure>

&#x20;

<figure><img src="https://support.xnarum.com/download/manuals/ISM-Manual-2023.fld/image097.png" alt=""><figcaption></figcaption></figure>

## **XML**

This type of data structure is generated from a sample xml. Enter a sample xml, click Parse button, and the parsed result is displayed at the bottom.

<figure><img src="https://support.xnarum.com/download/manuals/ISM-Manual-2023.fld/image098.png" alt=""><figcaption></figcaption></figure>

If an element is repeatable, set repeated attribute to the repeatable element.

<figure><img src="https://support.xnarum.com/download/manuals/ISM-Manual-2023.fld/image099.png" alt="" width="563"><figcaption></figcaption></figure>

The elements in the sample xml should contain dummy data. If the xml has empty element like this:

| <p>\<?xml version=-1.0- encoding="utf-8-"></p><p>\<doc></p><p>-</p><p>\<dummy>1\</dummy></p><p>\<empty1>\</empty1></p><p>\<empty2/></p><p>\</doc></p> |
| ----------------------------------------------------------------------------------------------------------------------------------------------------- |

\<empty1> and \<empty2> elements are ignored during the parsing.

If the sample xml is copied from an editor like Microsoft Word, xml parsing may fail. The single quotation('') and double quotation("") are not same as the text editor.

<figure><img src="https://support.xnarum.com/download/manuals/ISM-Manual-2023.fld/image100.png" alt=""><figcaption></figcaption></figure>

Quotation from MS Word - ![](https://support.xnarum.com/download/manuals/ISM-Manual-2023.fld/image101.png)

Quotation from text editor - ![](https://support.xnarum.com/download/manuals/ISM-Manual-2023.fld/image102.png)

There is a limit on XML data structure. Current XML data structure cannot handle the attributes of an element.

!\[Text

Description automatically generated]\(<https://support.xnarum.com/download/manuals/ISM-Manual-2023.fld/image103.png>)

The \<book> element above xml has id attribute. But this attribute is ignored and removed at the generated xml.

## **JSON**

This type of data structure is generated from a sample json. Enter a sample json, click Parse button, and the parsed result is displayed at the bottom.

!\[Graphical user interface, text, application, email

Description automatically generated]\(<https://support.xnarum.com/download/manuals/ISM-Manual-2023.fld/image104.png>)

There is a limit on JSON data structure. Current JSON data structure cannot handle primitive(number) and string array type.

!\[Graphical user interface, text, application

Description automatically generated]\(<https://support.xnarum.com/download/manuals/ISM-Manual-2023.fld/image105.png>)

GlossSeeAlso field from the above json is not parsed correctly.

## **WSDL**

This type of data structure is generated from WSDL url or file. Enter WSDL url, click Parse button, and the parsed result is displayed at the bottom.
