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 » CSV format

Post new topic  Reply to topic
 CSV format « View previous topic :: View next topic » 
Author Message
wmbdaniel1
PostPosted: Fri May 30, 2014 2:13 am    Post subject: CSV format Reply with quote

Newbie

Joined: 20 May 2014
Posts: 6

Let me first begin with CSV format
I have 1 Header with 5 fields in it & 5 records with 15 fields.
I constructed a DFDL message model for the CSV file.
I have a scenario where i need to check for file Integrity in first flow.
File input----> Compute----> File output

File integrity flow checks for number of records in header and the actual records and it also checks for file size in header and the actual file size. Only if both of these are equal it sends to second flow otherwise throws an error.

The input file may be empty also.so for this i made header and record as 0 occurance.

The issue now is if i send a file with header and record now it is taking header also as record not as an header where by integrity check is also not done and throwing an error.

If we give header and record as an optional does it take header also as a record.
Could any1 throw some light
Back to top
View user's profile Send private message
kimbert
PostPosted: Fri May 30, 2014 3:32 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Is this the same issue as http://www.mqseries.net/phpBB2/viewtopic.php?t=67546 ?
_________________
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
wmbdaniel1
PostPosted: Fri May 30, 2014 4:19 am    Post subject: Reply with quote

Newbie

Joined: 20 May 2014
Posts: 6

No Kimbert

Does a DFDL having 0 occurances in header and record level will take header as a record????
in my case its happening that the header is coming as record structure

IS it the default behaviour of FDDL???
Back to top
View user's profile Send private message
kimbert
PostPosted: Fri May 30, 2014 5:09 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

You need to understand a little about how DFDL works. DFDL is a 'backtracking' parser. If it fails to parse 'Header' and Header is optional then it will assume that Header is not in the data. It will then back out of Header and try Record. Check the DFDL trace and you will see it all happening.
To answer your question, yes this is the default behaviour of DFDL. It is the only consistent behaviour that is possible if the DFDL model is completely unconstrained. Read on to find out how to put constraints into your model...

You know that a Header looks different from a Record. DFDL does not, unless you provide that information in your model. You need to
- work out what make a Header different from a Record
- add a DFDL discriminator to 'Header' so that the DFDL parser realizes that it is definitely parsing a Header. Once the discriminator expression evaluates to 'true' the DFDL parser will not back out of Header. Any errors after that will be treated as evidence that Header is badly-formed ( which is what you need ).
_________________
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
wmbdaniel1
PostPosted: Fri May 30, 2014 6:36 am    Post subject: Reply with quote

Newbie

Joined: 20 May 2014
Posts: 6

Thanks kimbert
Given lot of info
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 » CSV format
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.