on 11-30-2007 10:57 AM
Hi All,
I have a requirement wherein I have to generate the target record nodes based on the number of characters on the source field.
My source structure contains one field and the length of the field is 120.Target structure contains 3 fields the length of each field is 10.the first 30 characters of the source field must generate 1 record with 10 cahracters in each of the target field.And the next 30 caharacters must generate second record on the target side containing the same 3 fields and so on..So total 4 Records containing 3 fields in each record should be generated on the target side..
Source -----------> Target
Record Record1(30)
Field(120) -------------> Field1(10)
Field2(10)
Field3(10)
Record2(30)
-------------> Field1(10)
Field2(10)
Field3(10)
Record3(30)
-------------> Field1(10)
Field2(10)
Field3(10)
Record3(30)
-------------> Field1(10)
Field2(10)
Field3(10)
Can any one help me getting this
Thanks in advance,
Vikram
Hi,
I guess using the function "<b>substring</b>" in mapping can solve your problem. Just give a try lik this.
<b>For Record1</b>
Source -
> Substring (0.....10) -
> Field1
Source -
> Substring (11...20) -
> Field2
Source -
> Substring (21...30) -
> Field3
<b>Similarly for Record2, 3 & 4</b>.
Source -
> Substring (31...40) -
> Field1
*
*
*
*
and so on..
Regards,
Sarvesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for the reply,
But the target records Record1 to Record4 must be created based on the length of the source field length i.e, if the source field length is only 90 then only 3 records must be created.maximum length of the source field is 120.The source and the target structure are as shown
Source Target
Record Record(30)
Field(120) -------------> Field1(10)
Field2(10)
Field3(10)
Source -----------> Target
Record Record1(0 to30)
Field(120) -------------> Field1(0 to 10)
Field2(10 to 20)
Field3(20 to 30)
Record2(30 to 60)
-------------> Field1(30 to 40)
Field2(40 to 50)
Field3(50 to 60)
Record3(60 to 90)
-------------> Field1(60 to 70)
Field2(70 to 80)
Field3( 80 to 90)
Record3(90 to 120)
-------------> Field1(90 to 100)
Field2(100 to 110)
Field3(110 to 120)
Hope you understood my question
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
in sender side
RecordSet Structure=Record,*
Record.fieldNames=field1
Record.fieldFixedLength=120
in Receiver side
Recordset structure=Record1,Record2,Record3,Record4
Record1.fieldnames=field1,field2,field3
Record1.fieldFixedLength=10,10,10
Record2.fieldnames=field1,field2,field3
Record2.fieldFixedLength=10,10,10
Record3.fieldnames=field1,field2,field3
Record3.fieldFixedLength=10,10,10
Record4.fieldnames=field1,field2,field3
Record4.fieldFixedLength=10,10,10
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.