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 for cobol copy book

Post new topic  Reply to topic Goto page 1, 2, 3  Next
 DFDL for cobol copy book « View previous topic :: View next topic » 
Author Message
chaitu
PostPosted: Tue Mar 15, 2016 3:20 am    Post subject: DFDL for cobol copy book Reply with quote

Voyager

Joined: 15 Apr 2014
Posts: 89

Hi All,

My requirement is create a DFDL for a Cobol copy book and parse it against the source input file.
I created a DFDL by importing the copy book.
DFDL is like

Common area(sequence)
(choice)
Filler
header
tailer
redefine1
redefine2
redefine3
.
.
.
redefine..n

now I need to parse it against a I/p file like

common area redefine1
common area redefine3
common area redefinen
.
.
header
tailor

and redefine depends up on the field type which is present in common area

from my understanding we can set xpath expression in initiator if it is a xsd
but here it is copy book.

could anyone please guide me in this.



Regards,
Chaitu.
Back to top
View user's profile Send private message
maurito
PostPosted: Tue Mar 15, 2016 3:37 am    Post subject: Re: DFDL for cobol copy book Reply with quote

Partisan

Joined: 17 Apr 2014
Posts: 358

chaitu wrote:
Hi All,

My requirement is create a DFDL for a Cobol copy book and parse it against the source input file.

You can create your DFDL, but you CANNOT parse it against an input file. What you can do, is to test the DFDL model by test parsing the input file.
chaitu wrote:


and redefine depends up on the field type which is present in common area

Chaitu.

So, you created the DFDL, now you need to add the initiators/discriminators to the DFDL ( the xsd ) using xpath expressions, so the parser knows which of the choices to pick.
Back to top
View user's profile Send private message
chaitu
PostPosted: Tue Mar 15, 2016 3:47 am    Post subject: Reply with quote

Voyager

Joined: 15 Apr 2014
Posts: 89

Hi maurito,

Thanks for prompt reply.

Yes I created the DFDL, and added the initiators to the DFDL using xpath expressions (/__01NAME/ECI_CONSUMER_INDEX_COMMON_AREA[1]/ECI_RECORD_TYP eq 100)

and tested by parsing input file and error is
CTDP3085E: Cannot resolve expression '{/__01NAME/ECI_CONSUMER_INDEX_COMMON_AREA[1]/ECI_RECORD_TYP eq 100}' for DFDL property 'initiator' defined on object 'ECI_DEMOGRAPHIC_REC'.

could anyone help me to figure it out.

Regards.
Chaitu
Back to top
View user's profile Send private message
maurito
PostPosted: Tue Mar 15, 2016 3:51 am    Post subject: Reply with quote

Partisan

Joined: 17 Apr 2014
Posts: 358

chaitu wrote:
Hi maurito,

Thanks for prompt reply.

Yes I created the DFDL, and added the initiators to the DFDL using xpath expressions (/__01NAME/ECI_CONSUMER_INDEX_COMMON_AREA[1]/ECI_RECORD_TYP eq 100)

and tested by parsing input file and error is
CTDP3085E: Cannot resolve expression '{/__01NAME/ECI_CONSUMER_INDEX_COMMON_AREA[1]/ECI_RECORD_TYP eq 100}' for DFDL property 'initiator' defined on object 'ECI_DEMOGRAPHIC_REC'.

could anyone help me to figure it out.

Regards.
Chaitu

Only you can see what your model definition looks like. And using that, fix the xpath expression. But from that, it looks like you probably need a discriminator rather than initiator.
Back to top
View user's profile Send private message
chaitu
PostPosted: Tue Mar 15, 2016 4:31 am    Post subject: Reply with quote

Voyager

Joined: 15 Apr 2014
Posts: 89

Hi Maurito,

Could you tell me where the discriminator is present in DFDL. I searched but could not find.
Back to top
View user's profile Send private message
maurito
PostPosted: Tue Mar 15, 2016 4:36 am    Post subject: Reply with quote

Partisan

Joined: 17 Apr 2014
Posts: 358

chaitu wrote:
Hi Maurito,

Could you tell me where the discriminator is present in DFDL. I searched but could not find.

If you have not added one, then it is not present anywhere. Now, if you are trying to ask how to add one, then in the integration Toolkit, Development perspective, where you see your dfdl model, in the right pane there are two tabs, the first is for Representation Properties, the other is for Asserts and Discriminators
Back to top
View user's profile Send private message
chaitu
PostPosted: Tue Mar 15, 2016 5:41 am    Post subject: Reply with quote

Voyager

Joined: 15 Apr 2014
Posts: 89

Hi Maurito,

Thanks for the reply.

I added the Discriminators to all redefines but thing is only redefine 1 is populating every time no other redefine is populating.

Could any one please guide me on this.
Back to top
View user's profile Send private message
maurito
PostPosted: Tue Mar 15, 2016 5:44 am    Post subject: Reply with quote

Partisan

Joined: 17 Apr 2014
Posts: 358

chaitu wrote:
Hi Maurito,

Thanks for the reply.

I added the Discriminators to all redefines but thing is only redefine 1 is populating every time no other redefine is populating.

Could any one please guide me on this.

Use the DFDL test parse and look at the trace, that is the best guidance you can have.
And No, you have not added discriminators to the redefines. DFDL does not have the concept of redefine, so you should start by getting the terminology right.
Back to top
View user's profile Send private message
chaitu
PostPosted: Tue Mar 15, 2016 5:50 am    Post subject: Reply with quote

Voyager

Joined: 15 Apr 2014
Posts: 89

Hi Maurito,

Redefine is a example name here

Common area(sequence)
(choice)
Filler
header
tailer
redefine1
redefine2
redefine3
.
.
.
redefine..n
Back to top
View user's profile Send private message
maurito
PostPosted: Tue Mar 15, 2016 5:54 am    Post subject: Reply with quote

Partisan

Joined: 17 Apr 2014
Posts: 358

chaitu wrote:
Hi Maurito,

Redefine is a example name here

Common area(sequence)
(choice)
Filler
header
tailer
redefine1
redefine2
redefine3
.
.
.
redefine..n

Use the DFDL test parse and look at the trace.
Back to top
View user's profile Send private message
chaitu
PostPosted: Wed Mar 16, 2016 12:24 am    Post subject: Reply with quote

Voyager

Joined: 15 Apr 2014
Posts: 89

Hi All,

I am trying to figure out the belowone
this is my DFDL
Common area(sequence)
(choice)
Filler
header
tailer
redefine1
redefine2
redefine3
.
.
.
redefine..n

now I want to the below

Common area redefine1
common area redefine5
common area redefine2

can anyone tell me how to repeat the common area


Back to top
View user's profile Send private message
timber
PostPosted: Wed Mar 16, 2016 12:31 am    Post subject: Reply with quote

Grand Master

Joined: 25 Aug 2015
Posts: 1292

Two things. Both are important.
1. Please edit your last post and add [C o d e] tags ( use the button at the top of the editing window). We cannot work out the structure of your model unless you show the indentation correctly.
2. You were asking about discriminators. A couple of people have spent their time helping you with that problem. Don't ignore their answers and ask a different question - that is not respectful.

Your next post should explain clearly what your current problems are, and should be easy to read. If you want help.
Back to top
View user's profile Send private message
chaitu
PostPosted: Wed Mar 16, 2016 2:27 am    Post subject: Reply with quote

Voyager

Joined: 15 Apr 2014
Posts: 89

[
Hi All,
I beg your pardon. I was missed to say that discriminator is working now.
And I want to repeat the Commonarea field like

Commonarea redefine1
commonarea redefine5
commonarea redefine2

I set the commonarea to 1to unbounded
now I am able to generate only first line

Commonarea redefine1

could any one help me to figure it out.
Thanks in advance.
][/code]
Back to top
View user's profile Send private message
maurito
PostPosted: Wed Mar 16, 2016 2:38 am    Post subject: Reply with quote

Partisan

Joined: 17 Apr 2014
Posts: 358

chaitu wrote:
[
Hi All,
I beg your pardon. I was missed to say that discriminator is working now.
And I want to repeat the Commonarea field like

Commonarea redefine1
commonarea redefine5
commonarea redefine2

I set the commonarea to 1to unbounded
now I am able to generate only first line

Commonarea redefine1

could any one help me to figure it out.
Thanks in advance.
][/code]

Not until you follow timber's advice and format your code properly and explain exactly what you want to do. We are only having guesses.
For example,
are you trying to say that you want your model to be something like:

Code:

sequence
Commonarea
     choice
       redefine1
       redefine2
       etc
      end choice
Commonarea
     choice
       redefine1
       redefine2
       etc
      end choice
etc
end sequence

i.e. an unbound array of commonareas, and each element containing the choice of several redefines ?
Take your time and explain properly want you want, that will help yourself to understand the problem YOU are facing , because, it is your problem, not ours.
HINT: there is a preview button at the bottom of your window, press it to see how your post is going to look like, if you don't like it, correct it and try again.
Back to top
View user's profile Send private message
chaitu
PostPosted: Wed Mar 16, 2016 3:45 am    Post subject: Reply with quote

Voyager

Joined: 15 Apr 2014
Posts: 89

Hi maurito,

Thanks for the Hint,
And my DFDL is like
Code:

-01name
..sequence
Commonarea
..sequence
   element1
   element2
   element3
Choice
Redefine1
Redefine2
Redefine3
.
.
.
Redefinen



I want my model to be like
Code:

Commonarea         redefine2
commonarea          redefine5
commonarea          redefine10
 


where I need to repeat the same commonarea in each new line.
And redefine changes based on the field which is on element present in commonarea which I set it using discriminator.
Now I need to set commonarea in each line like above
could you please take a look and tell me any info needed and give a hint to figure it out.

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

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