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 » DFDL

Post new topic  Reply to topic Goto page 1, 2  Next
 DFDL « View previous topic :: View next topic » 
Author Message
chaitu
PostPosted: Mon Jul 13, 2015 8:25 pm    Post subject: DFDL Reply with quote

Voyager

Joined: 15 Apr 2014
Posts: 89

Hello All,

I am trying to generate a text file for that i created a DFDL like
A1,A2,A2.......A10. I am able to print the all the elements in each case but thing is i have repeate some fields in the list suppose like A1,A2,A3,A3,A4,A5,A6,A4,A5,A6,A7,A8,A9,A10.
depanding up on number of input records i have to repeate A4,A5,A6. i coded in ESQL but not able to get the file in above format i am getting in A!,A2,A3,.......A10. each time loop is repeated the A4,A5,A6 are replaced and finally appearing only one time. could any one please guide me where i went wrong.
Thanks for your valuable time in advance.
Back to top
View user's profile Send private message
kimbert
PostPosted: Tue Jul 14, 2015 1:40 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Quote:
could any one please guide me where i went wrong
Yes, I can help. But you will need to take a *lot* more time writing your next post, and you will need to provide a *lot* more information.

Please do all of the following steps:
1. Provide at least 2 example messages. Use [ c o d e ] tags around each input message so that white space is preserved.
2. Explain the structure of the message tree that you want to use. This will help us to understand the structure of the data that you are outputting.
3. Use the DFDL Test perspective to try out your model. There is no point in deploying a DFDL schema until you have tested it in the toolkit.
4. If you still do not get the output that you expected, show us the exact output that you received. You cannot describe the output accurately using English sentences. I'm a native English speaker, and I cannot do it!
_________________
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
chaitu
PostPosted: Thu Jul 16, 2015 2:21 am    Post subject: Reply with quote

Voyager

Joined: 15 Apr 2014
Posts: 89

Hello Kimbert,

Sorry for the late late reply and thanks for your quick response.
some how i traced out but new requirement came like.
my flow is like
MQI/P>>COMPUTE>>MAPPINGNODE>>FILEOUTPUTNODE.

based on input that is xml in compute node i retrive data from DB using query i have to map those fields and sent a flat file for that i designed a DFDL and doing mapping.

my DFDL is like A,B,C,D,E,F,G,H,I,J. with some sub fields in all A to J trees.
i have to generate my file like
AA1A2A3A5..
BB1B2B3B4...
CC1C2C3C4..
DD1
DD2
DD3 (which D1,D2,D3 are default values)
E
F
G
E
F
G
E
F
G
H
I
J.

I am able to generate the repeated trees EFG these will repeat based on number of records i will get from my DB Call if i get 3 then i have to repeat 3 times.

Now i am stuck with D tree they are default values but i have to repeate it 3 times in every file to get that what property i have to use. please guide me.

Thanks in advance.
Back to top
View user's profile Send private message
kimbert
PostPosted: Thu Jul 16, 2015 11:24 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Quote:
Now i am stuck with D tree they are default values but i have to repeate it 3 times in every file to get that what property i have to use. please guide me.
Please explain what you have tried already, and what happened.
_________________
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
chaitu
PostPosted: Thu Jul 16, 2015 7:38 pm    Post subject: Reply with quote

Voyager

Joined: 15 Apr 2014
Posts: 89

Hello,
I need to get the file in the following format.
C01Afggdfgdfg ars32423 071615
C021 Basic
[b]C08787687667
Co83242443
C08dgfghfhgfgA
C08743874874
C09TORIN JACKS (IMPORT) 4355 BRICKELL ST
C10TOLL FREE # 866-886-7465
C11ONTARIO CA 91761
C13FOBLJ25

C319878451
C331 EA 55.1 5.44000000001EA 000001000
C35BIG RED 3T GARAGE TO
C311020643
C332 EA 74 7.55000000001EA 000001000
C35
C318959801
C332 EA 9.88 8.85000000001EA 000001000
C35BIG RED 2T JACK STAN
C810003
C840000000000000000000000000000000000000000000000
C95XIRX071615

the element 31 33 35 will repeate based on number of records coming from DB. And I need to print C08 3 times irrespective of record size with default fields on it my question is how to repeat C08 which property i have to set in DFDL . Now i am able to generate only once like
C083242443dgfghfhgfgAdgfghfhgfgA.
If i understand correctly i need to set occurrence property in DFDL. Could you please guide me.
Thank you for the valuable time.
Back to top
View user's profile Send private message
kimbert
PostPosted: Fri Jul 17, 2015 10:59 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Yes, I think I worked out most of that from your previous explanation.

But you have not told us about your DFDL schema. What properties have you set on the C08 element. What are the values of minOccurs, maxOccurs, Occurs Count Kind ? Without that information it's very hard to advise you.
_________________
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
chaitu
PostPosted: Wed Jul 22, 2015 8:02 pm    Post subject: Reply with quote

Voyager

Joined: 15 Apr 2014
Posts: 89

Sorry I am out of city on some personal work,

Properties are
min occurrence 0 max1
occurrence count 2,2,15.
like
C08a2
C08b2
C08adfe65jnk2m1h5ji


Thanks for your Hard Work.
Back to top
View user's profile Send private message
chaitu
PostPosted: Wed Jul 22, 2015 8:11 pm    Post subject: Reply with quote

Voyager

Joined: 15 Apr 2014
Posts: 89

Hi,

I tried with occurs count kind 'Implicit'. But not working I hope I have to try with expression but I am not sure what to give in occurs count and how.
Advice me please.
Thanks.
Back to top
View user's profile Send private message
kimbert
PostPosted: Fri Jul 24, 2015 3:24 pm    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Quote:
Properties are
min occurrence 0 max1
occurrence count 2,2,15.
Are you really saying that you have set minOccurs to 0 on the C08 element? The one that you want to have exactly 3 occurrences of?
Try setting minOccurs and maxOccurs to 3. And set occursCountCount to 'Fixed'. And set a default value on the C08 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
chaitu
PostPosted: Tue Aug 04, 2015 2:11 am    Post subject: Reply with quote

Voyager

Joined: 15 Apr 2014
Posts: 89

Hello All,

I am getting a empty line in the DFDL which i explained in the below posts can
anyone please help me to figure out this.
the flat file i generated is
C01AHKKRAENT7779HONDHYPPB
C0201BASIC
C08IM06-058131000
C08UC06-058131000
C08HKKRAENT
C09
C10
C11


C13FOBLJ25
C3100011056800
C333 EA 3.7511.25 000000001EA 000001000

like i am getting space after C11.

Thanks in advance.
Back to top
View user's profile Send private message
chaitu
PostPosted: Tue Aug 04, 2015 2:31 am    Post subject: Reply with quote

Voyager

Joined: 15 Apr 2014
Posts: 89

Hello All,
one more thing is i am passing a value 1.00 to a field in the DFDL of type float but i file it is placing like 1. why i am unable to figure it out is their any way to pass 1.00 to a field in DFDL if so what property should i set.

Thanks in advance.
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue Aug 04, 2015 4:25 am    Post subject: Reply with quote

Grand High Poobah

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

chaitu wrote:
one more thing is i am passing a value 1.00 to a field in the DFDL of type float but i file it is placing like 1. why i am unable to figure it out


Because the value of the float data type is 1, no matter how you express it.

chaitu wrote:
is their any way to pass 1.00 to a field in DFDL if so what property should i set.


You should set the data type - 1.00 is a character data type not a float. More specifically it's a character data type with a specific format that makes it display a '.' character and at least 2 decimal places even if the decimal values are zero.

A float is an binary representation that isn't printable and is implicitly converted for display.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
chaitu
PostPosted: Tue Aug 04, 2015 11:27 pm    Post subject: Reply with quote

Voyager

Joined: 15 Apr 2014
Posts: 89

Hello Vitor,
Thanks a lot its working now.

Could anyone help me to figure it on C11 and C13 gap below mentioned.

Thanks in advance.
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Aug 05, 2015 4:47 am    Post subject: Reply with quote

Grand High Poobah

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

chaitu wrote:
Could anyone help me to figure it on C11 and C13 gap below mentioned.


What does the DFDL trace have to say about this?

What does the "gap" contain? Is it a blank record, an additional line feed, what?
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
chaitu
PostPosted: Wed Aug 05, 2015 7:23 pm    Post subject: Reply with quote

Voyager

Joined: 15 Apr 2014
Posts: 89

Hello All,

Its a blank record if any values are coming then its working fine like below

C09TORIN JACKS (IMPORT) 4355
C10TOLL FREE # 866-886-7465
C11ONTARIO CA 91761
C13FOBLJ25
C3100018668268

Thanks.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Goto page 1, 2  Next Page 1 of 2

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » DFDL
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.