ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » TDS Fixed Length - Ignore absent elements at end of record?

Post new topic  Reply to topic
 TDS Fixed Length - Ignore absent elements at end of record? « View previous topic :: View next topic » 
Author Message
BrisVegas
PostPosted: Wed May 13, 2009 8:51 pm    Post subject: TDS Fixed Length - Ignore absent elements at end of record? Reply with quote

Novice

Joined: 05 Aug 2004
Posts: 14
Location: Brisbane, Australia

Hi folks,

I'm receiving a flat file in Tagged Fixed Length format. Is there a way to ignore absent elements at the end of a record and use the delimter/Group Terminator to tell the parser that the record has ended??

TDS model:

Outer level - Tagged Delimited, tag length 30, delimter <CR><LF>
Inner records - Fixed Length, each field has field length defined.

eg. (SAP Idoc)
E1EDK01 000 NZD 0.0000000
E1EDKA1 AG 1234 JOE'S BAR
E1EDP01 1 0049 5.000 EA
etc

My model parses everything fine as long as all the fields are there, but the customer is not sending the empty ones at the ends of records....

As always, help is greatly appreciated.

BV
Back to top
View user's profile Send private message
MQEnthu
PostPosted: Wed May 13, 2009 9:55 pm    Post subject: Reply with quote

Partisan

Joined: 06 Oct 2008
Posts: 329
Location: India

I understand that yours is tagged FIXED LENGTH message. Delimiter is to seperate the records. There is no delimiter between the fields in a record. And sending system is not sending the empty fields.

AFAIK, fields can not be excluded when it is fixed length.
_________________
-----------------------------------------------
It is good to remember the past,
but don't let past capture your future
Back to top
View user's profile Send private message
kimbert
PostPosted: Thu May 14, 2009 1:07 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Please provide
- an example of a fully-populated record
- an example of a truncated record
- a correct description of your TDS model ( I don't believe Tag Length="30" is correct! )

Your example has spaces between the records. Did you insert those for readability, or are they really there in the input?

When you post again, please put [code] tags around your examples - it really helps those of us who have to read what you post.
Back to top
View user's profile Send private message
BrisVegas
PostPosted: Thu May 14, 2009 2:44 pm    Post subject: Reply with quote

Novice

Joined: 05 Aug 2004
Posts: 14
Location: Brisbane, Australia

Thanks kimbert & MQEnthu!

I trimmed the record so it would be readable, the IDOC records are massive. I was hoping my description would be enough for someone to chime in and say "oh, that's easy, you got this bit wrong blah blah.." !! So anyway, here's more information. Thanks in advance.

There are spaces in the records as it is fixed length, ie a 12 character field must be 12 characters, even if there is only 5 chars of data. The records parse ok up to the point where unpopulated fields at the end of the record are just not provided, ie. not space-filled. Does that make sense?

The tag length is 30. In the example below it is
Code:
'E1EDS01                       '


The first record is ok, as NZD is the last field. The second record is 23 chars too short, as they obviously did not sent a currency (NZD) for this amount.
Code:

E1EDS01                       20200000000000422170000670000000 ZFR0.00                 NZD
E1EDS01                       20200000000000422170000680000000 0011                       


1. Overall message structure INVOIC02


I broke it into two sections, as the Control section record had a tag length of 10, whereas the main IDOC seciton had a tag length of 30. ie.
Code:

EDI_DC40  2020000000000042217640 3022  INVOIC02 
E1EDK01                       20200000000000422170000010000000     NZDNZD1.00000   
E1EDKA1                       20200000000000422170000020000000 RS                  0000000496 


2. INVOIC02 settings

3. IDOC settings (CONTROL is the same except tag length is 10)

4. A sample record (E1EDKA1) as they're all the same.
Back to top
View user's profile Send private message
BrisVegas
PostPosted: Thu May 14, 2009 2:46 pm    Post subject: Reply with quote

Novice

Joined: 05 Aug 2004
Posts: 14
Location: Brisbane, Australia

kimbert - thanks for the tip about formatting
Code:
code
That's very handy!
Back to top
View user's profile Send private message
MQEnthu
PostPosted: Thu May 14, 2009 9:54 pm    Post subject: Reply with quote

Partisan

Joined: 06 Oct 2008
Posts: 329
Location: India

Is there any field which indicates the length of the record, or may length of the last field which may come or may not. Suppose if it is not coming, field indicating the length is zero. If you have some thing like this, then you can acheive by using length reference...

Otherwise AFAIK, it is not possible to exclude the fields when the complex type is of fixed length...
_________________
-----------------------------------------------
It is good to remember the past,
but don't let past capture your future
Back to top
View user's profile Send private message
BrisVegas
PostPosted: Sun May 17, 2009 5:59 pm    Post subject: Reply with quote

Novice

Joined: 05 Aug 2004
Posts: 14
Location: Brisbane, Australia

no, there's nothing of that sort. the total length for each record is derived by adding up the field lenths (done automatically by the TDS parser).
Back to top
View user's profile Send private message
kimbert
PostPosted: Mon May 18, 2009 1:49 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

The only way to parse this is to change from Fixed Length to Use Data Pattern. Let me know if you want to try it, and need some guidance.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » TDS Fixed Length - Ignore absent elements at end of record?
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.