Author |
Message
|
SANTYP |
Posted: Mon Apr 14, 2008 9:43 am Post subject: Problem with TDS message set |
|
|
 Centurion
Joined: 27 Mar 2007 Posts: 142
|
Hi,
Iam working on Toolkit v6.0.2,Broker v6.0.0.3
I have an issue regarding TDS
i have an input file
data1*data2*data3*data4
In this input file data2 element is having 0 to n cardinality ,while doing mapping from source to target(fixed width structure), sometimes data2 element may not come from source.In this case i got the output structure as x1**x3*x4
but my requirement is
x1*x3*x4 (i need to suppress the delimiter(*) in the middle of the structure) |
|
Back to top |
|
 |
kimbert |
Posted: Mon Apr 14, 2008 10:55 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
So you want to generate an output message which cannot be parsed ( unless the receiving application counts the number of delimiters )?. I presume that x1, x2, x3 and x4 have some kind of record identifier ( tag ) which solves that problem. Please provide an example input message, and details of how the message should be parsed. |
|
Back to top |
|
 |
SANTYP |
Posted: Mon Apr 14, 2008 11:05 am Post subject: |
|
|
 Centurion
Joined: 27 Mar 2007 Posts: 142
|
There is no parsing problem.
I got the output as follows but there are some lines extra added those are line feeds(after H010 AND H025) if there is no input from source which is to be mapped
---------------- Output I am getting----------------------------
H010 fff 000000001094319255 20080325
H025AG SOURCE ONE HEALTHCARE TECHNOLOGIES 8020 TYLER
H025RE SOURCE ONE HEALTHCARE TECHNOLOGIES 8020 TYLER
H025RG SOURCE ONE HEALTHCARE TECHNOLOGIES 8020 TYLER
H025WE SOURCEONE SYOSSET 504 315 MICHAEL
D010000010 3.000 CA 7.80 1
D01501650419034612
D01502035041934612
D015002000000000001292044 ULTRAVIST VL 370MG/ML 125ML 10
D015003N50419034612
D015004
D020 3.000
S0101
-----------------------End of output--------------------------------------
Here you can see the empty lines which is not expected. I want to ignore the fields when they are not mapped from source. that means I should not get the empty lines.
Under H010 and H025 those empty lines are because of the other fields(H015 and H020) which are 0 to -1 occurances and they are not mapped. thats the reason we are getting the empty lines in the output.
The Properties of H015 and H020 are set as Min Occurance = 0, Max Occurance = -1 Repetng element delimiter = <LF>, Data element seperator = Fixed Length, Group Indicator = H015.
How do I over come this |
|
Back to top |
|
 |
kimbert |
Posted: Mon Apr 14, 2008 1:58 pm Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Quote: |
The Properties of H015 and H020 are set as Min Occurance = 0, Max Occurance = -1 Repetng element delimiter = <LF>, Data element seperator = Fixed Length, Group Indicator = H015.
How do I over come this |
Your data is tagged ( as I suspected ). You should be using Tagged Fixed Length.
On the parent complex type:
- Change the Data Element Separation to Tagged Fixed Length
- Set 'Tag Length' to 3
On the elements for H01, H02, D01 etc
- Set the tag to 'H01', 'H02', 'D01' etc
On the complex types for H01, H02, D01 etc
- Remove the Group Indicator
- Add '<LF> as Group Terminator |
|
Back to top |
|
 |
SANTYP |
Posted: Wed Apr 16, 2008 1:17 pm Post subject: |
|
|
 Centurion
Joined: 27 Mar 2007 Posts: 142
|
Hello Kim
Thats working fine but after the last element we are again getting Line Feed(a empty line). Can you tell me how to ignore that. |
|
Back to top |
|
 |
kimbert |
Posted: Thu Apr 17, 2008 1:47 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
If S01 is a trailer record, remove the Group Terminator from the complex type of S01.
Otherwise, define <LF> as a delimiter rather than a Group Terminator. To do that, you will need to change Data Element Separation to Tagged Delimited with delimiter set to <LF>. |
|
Back to top |
|
 |
SANTYP |
Posted: Thu Apr 17, 2008 10:19 am Post subject: |
|
|
 Centurion
Joined: 27 Mar 2007 Posts: 142
|
Thanks Kim its working now.. |
|
Back to top |
|
 |
|