| Author |
Message
|
| kimbert |
Posted: Wed Jun 25, 2014 2:26 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5543 Location: Southampton
|
You are very close to the solution, and you have all of the information that you need. The remaining problems are easy to solve, and I think it would be best for you to solve them yourself. _________________ 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 |
|
 |
| diamondiona |
Posted: Wed Jun 25, 2014 3:59 am Post subject: |
|
|
Acolyte
Joined: 19 Jun 2014 Posts: 50
|
Hi Kimbert,
I like challenges and solving problems independently. But now, I'm blocking entire project. So if you can give me the answer, I would appreciate.
Still, I suspect whether I can achieve my goal since FileInputNode parse input message iternatively. So the header information will be added multiple times, at the beginning each record.
But I have confidence in you guys' expertise.
Thanks,
Diamond |
|
| Back to top |
|
 |
| diamondiona |
Posted: Wed Jun 25, 2014 6:51 am Post subject: |
|
|
Acolyte
Joined: 19 Jun 2014 Posts: 50
|
Hi Kimbert,
I know it is pretty easy to output like this with duplicate "Header" information.
| Code: |
FirstName,LastName
John,Haygen
FirstName,LastName
Mike,Haygen
|
But I don't know how to output SINGLE "header" information since there are multiple records from FileInputNode(twice in this case). Like this:
| Code: |
FirstName,LastName
John,Haygen
Mike,Haygen
|
Can you please give me some hints? |
|
| Back to top |
|
 |
| diamondiona |
Posted: Wed Jun 25, 2014 10:56 am Post subject: |
|
|
Acolyte
Joined: 19 Jun 2014 Posts: 50
|
| I'm still struggling. Can someone please help? |
|
| Back to top |
|
 |
| mqjeff |
Posted: Wed Jun 25, 2014 11:10 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
| If you need to take a different action based on whether the message being processed is the FIRST or LAST record in the file, then you need to write code to take advantage of the information the FileInput node gives you about each record it emits. |
|
| Back to top |
|
 |
| diamondiona |
Posted: Wed Jun 25, 2014 12:12 pm Post subject: |
|
|
Acolyte
Joined: 19 Jun 2014 Posts: 50
|
I have made my output looks this:
| Code: |
FirstName,LastName,John,Haygen
Mike,Haygen
|
I'm struggling to separate "FirstName, LastName" from "John,Haygen".
Any ideas? |
|
| Back to top |
|
 |
| diamondiona |
Posted: Wed Jun 25, 2014 12:22 pm Post subject: |
|
|
Acolyte
Joined: 19 Jun 2014 Posts: 50
|
Here is my message model definition:
| Code: |
Employee
Person:PersonType
firstName:String
lastName:String
Person:PersonType
firstName:String
lastName:String
|
Is it possible to separate first level 2 elments(person) using new line, and elements inside PersonType using ","? If it is, I can fix my output then. |
|
| Back to top |
|
 |
| fjb_saper |
Posted: Wed Jun 25, 2014 3:51 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20769 Location: LI,NY
|
| diamondiona wrote: |
Here is my message model definition:
| Code: |
Employee
Person:PersonType
firstName:String
lastName:String
Person:PersonType
firstName:String
lastName:String
|
Is it possible to separate first level 2 elments(person) using new line, and elements inside PersonType using ","? If it is, I can fix my output then. |
Very easy to do in DFDL... you could also send an extra message in Blob Format with the header and ending in a new line...  _________________ MQ & Broker admin |
|
| Back to top |
|
 |
| diamondiona |
Posted: Wed Jun 25, 2014 5:12 pm Post subject: |
|
|
Acolyte
Joined: 19 Jun 2014 Posts: 50
|
| Sorry our version is 7.0. |
|
| Back to top |
|
 |
| diamondiona |
Posted: Thu Jun 26, 2014 4:16 am Post subject: |
|
|
Acolyte
Joined: 19 Jun 2014 Posts: 50
|
Hi Kimbert,
I truly appreciate if you can help with your expertise or can you please let me know if it is IMPOSSIBLE?
Can someone else please help ?
Thanks,
Diamond |
|
| Back to top |
|
 |
| kimbert |
Posted: Thu Jun 26, 2014 8:53 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5543 Location: Southampton
|
Please read the reply from mqjeff. _________________ 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 |
|
 |
|
|