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 » Problem DFDL with for fixed length file

Post new topic  Reply to topic
 Problem DFDL with for fixed length file « View previous topic :: View next topic » 
Author Message
sselva86
PostPosted: Mon Mar 16, 2015 6:38 am    Post subject: Problem DFDL with for fixed length file Reply with quote

Novice

Joined: 25 Oct 2010
Posts: 17

Hi mates ,

Need your help with DFDL .

I am trying to develop DFDL to process fixed length file . Have 8 local elements on this DFDL . file is having is having more length than what I specified in length kind-length for last element . Because of that facing problem .
Getting below error while testing the DFDL .

CTDP3058E: Separator '%CR;%LF;%WSP*;' not found at offset '572' for sequence or choice within element '/DFDL_TAB_FIRST[1]'.



Have mentioned the option : document final terminator can be missing as YES , but still facing the problem .

can you please help to shed some light here .
Back to top
View user's profile Send private message
Vitor
PostPosted: Mon Mar 16, 2015 6:40 am    Post subject: Re: Problem DFDL with for fixed length file Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

sselva86 wrote:
Have 8 local elements on this DFDL . file is having is having more length than what I specified in length kind-length for last element .


Why? What's the extra length and why can't you just add a dummy element to the end of the DFDL schema to account for it?
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
sselva86
PostPosted: Mon Mar 16, 2015 7:14 am    Post subject: Reply with quote

Novice

Joined: 25 Oct 2010
Posts: 17

Thanks for reply mate

The problem is , file is not having specific length for last element . I gave the length for last element as 6 , project is expected value . but the file varies in each line for last element.
sample file :
125482 1218452 787458 653258 4596657
125482 1218452 787458 653258 459666458775
125482 1218452 787458 653258 4596671245

So i am not able to add dummy element with specific length . Is there any another way to terminate the line and come back to second line .
Back to top
View user's profile Send private message
Vitor
PostPosted: Mon Mar 16, 2015 7:41 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

sselva86 wrote:
The problem is , file is not having specific length for last element .


So explain to me, fairly slowly and using small words, how this is a "fixed length" file. Is this one of those new fangled "fixed but sort of changes a bit" files I heard Microsoft was working on?

sselva86 wrote:
I gave the length for last element as 6 , project is expected value .


So what you're saying (if I have this right) is that the file is a variable length file with 8 fixed length elements and a 9th element of indeterminate length that makes up the file record from the end of the 8th element to the delimiter at the end of the record, but the application / project for which this DFDL is intended only wishes to process the first 6 characters of this 9th element?

sselva86 wrote:
Is there any another way to terminate the line and come back to second line .


Yes. Model the record as I've described above. There's no capability in DFDL to say "once you've got to the end of the model, ignore everything you might find unless it's a delimiter".
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
kimbert
PostPosted: Mon Mar 16, 2015 7:57 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

So the 6th field on each line is not fixed length. It is terminated by the delimiter.
So...set lengthKind on the last element to 'delimited'.

Or did you try that already?
_________________
Before you criticize someone, walk a mile in their shoes. That way you're a mile away, and you have their shoes too.
Back to top
View user's profile Send private message
sselva86
PostPosted: Mon Mar 16, 2015 8:06 am    Post subject: Reply with quote

Novice

Joined: 25 Oct 2010
Posts: 17

1) All other fields are expected to have fixed length except the last element .
So I was forced to use fixed length for this file .

2) yes , the last element is having unknown length and application wants only 6 chars from this .

3) So there is no other ways except to have dummy element ?

Thanks for your reply mate [/code]
Back to top
View user's profile Send private message
Vitor
PostPosted: Mon Mar 16, 2015 8:13 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

sselva86 wrote:
3) So there is no other ways except to have dummy element ?


No, the DFDL model must describe the entire record. You need a dummy element as @kimbert suggests.

Enjoy his advice while it lasts.....
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
kimbert
PostPosted: Mon Mar 16, 2015 8:17 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Quote:
1) All other fields are expected to have fixed length except the last element. So I was forced to use fixed length for this file .
Why do you think the 'Length Kind' property applies to the entire file? Have you tried setting it for last element?
_________________
Before you criticize someone, walk a mile in their shoes. That way you're a mile away, and you have their shoes too.
Back to top
View user's profile Send private message
kimbert
PostPosted: Mon Mar 16, 2015 8:27 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Quote:
You need a dummy element as @kimbert suggests.
Do I? I thought you suggested that. I suggested setting lengthKind=delimited on the last field
_________________
Before you criticize someone, walk a mile in their shoes. That way you're a mile away, and you have their shoes too.
Back to top
View user's profile Send private message
kimbert
PostPosted: Mon Mar 16, 2015 8:42 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Just re-read the requirement.
Yes - you need a dummy element. And it should have lengthKind=delimited.
_________________
Before you criticize someone, walk a mile in their shoes. That way you're a mile away, and you have their shoes too.
Back to top
View user's profile Send private message
Vitor
PostPosted: Mon Mar 16, 2015 9:16 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

kimbert wrote:
Just re-read the requirement.
Yes - you need a dummy element. And it should have lengthKind=delimited.


BAZINGA!



(It's the kind of a day where I need to celebrate all my small triumphs)
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
sselva86
PostPosted: Tue Mar 17, 2015 1:11 am    Post subject: Reply with quote

Novice

Joined: 25 Oct 2010
Posts: 17

, Made dummy element with delimited and it worked . you made my day mates . thank you so much
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 » Problem DFDL with for fixed length file
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.