cancel
Showing results for 
Search instead for 
Did you mean: 

File structure

Former Member
0 Kudos

HI,

I am again posting this thread as none of the answers could help to solve this issues earlier.

to see it looks very simple scenario.

my file structure

<Startof file>

<field1>

<field2>

<field3>

<endof file>

every row has only one field.

all the fields are single occurence.

each field has different value.

for exampl

<start>

name:Jeff

age: 27

sex: male

<end>

thats it.. this is the file structure.

can any one tell me how to design the datatype structure. it looks simple.

but none of the suggestions worked.

still seeking solution.

regards,

Jeff

Accepted Solutions (1)

Accepted Solutions (1)

justin_santhanam
Active Contributor
0 Kudos

Jeff,

Please follow below the steps for creating Data type.

Create Data type : DT_SDNScenario

Right click on the root node and Click Sub-element create Startoffile node don't give any type over there and give the occurrence as 0 to unbounded.

Right click on the Startoffile Create Sub-element field1 with type String , occurrence as 1.

Right click on the Startoffile Create Sub-element field2 with type String , occurrence as 1

Right click on the Startoffile Create Sub-element field3 with type String , occurrence as 1

Hope this helps. If not reply back.

Finally you can see,

Type Occurrence

DT_SDNScenario

Startoffile 0...Unbounded

Field1 String 1..1

Field2 String 1..1

Field3 String 1..1

Best regards,

raj.

Former Member
0 Kudos

Hi,

I tried this option.

in this case it becomes one row and all fields in a row

like Name, Age, Sex

but i want

Name

Age

Sex

jeff

justin_santhanam
Active Contributor
0 Kudos

Jeff

DT_SDNScenario

Startoffile 0...Unbounded

Name String 1..1

Age String 1..1

Sex String 1..1

is it looks similar DT u have created?

Best Regards,

raj.

justin_santhanam
Active Contributor
0 Kudos

Jeff,

Have you created ? Let me know , I'll suggest you the option.

Best regards,

raj.

Former Member
0 Kudos

hi,

the payload looks like

- <Row>

<Name>Jeff</Name>

</Row>

- <Row>

<Name>27</Name>

</Row>

- <Row>

<Name>Male</Name>

</Row>

you can see Name repeats for all fields.

jeff

justin_santhanam
Active Contributor
0 Kudos

Jeff,

If you want to create DT for the below payload structure

- <Row>

<Name>Jeff</Name>

</Row>

- <Row>

<Name>27</Name>

</Row>

- <Row>

<Name>Male</Name>

</Row>

then

Create Row with no Type and occurrence as 0 to unbounded

Create Name(Sub-element of Row) with type String as occurrence as 1

Is this you needed?

Best Regards,

raj.

Former Member
0 Kudos

Hi raj,

this is what i did.

jeff

justin_santhanam
Active Contributor
0 Kudos

Jeff,

I don't know whether its your business reqmt or not. but the payload must look like

- <Row>

<Name>Jeff</Name>

<Age>27</Age>

<Sex>Male</Sex>

</Row>

- <Row>

<Name>Justin</Name>

<Age>25</Age>

<Sex>Male</Sex>

</Row>

Am I right, the payload won't look like this?

Best Regards,

raj.

Answers (0)