Author |
Message
|
Bravo |
Posted: Thu Nov 09, 2006 10:40 am Post subject: ESQL Help |
|
|
Centurion
Joined: 03 Oct 2005 Posts: 146
|
Hi All,
I need to convert the incoming data from Mainframe as a flat file in fixed format but length of record varies.I may require few fields from input message to convert XML format.
for eg : Input message looks like
Code: |
D XXXX XXXX XXXXXXXXXXXXCR
D XXXX XX XXXXXXXXXCR
D XXX XXX XXXXXXXXXXXX XXXXCR
D XX XXXX XXXX XCR
|
We have carriage return at the end of record and we are using file extender to read each record as message.
Do I have to read the message as blob and convert it to string, then based on the starting position of required field needs to extracted for mapping?.
or Can I create a message set based on the above input?
Any suggestion!!! _________________ Bravo |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Nov 09, 2006 11:13 am Post subject: Re: ESQL Help |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Bravo wrote: |
Can I create a message set based on the above input? |
I can.
I don't know if you can.
And I don't know if your actual requirements for this message set will prevent anyone from making a message set for that input. But from the limited information you have posted, it's POSSIBLE to do so.
But I still don't know if you can do so. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
madi |
Posted: Thu Nov 09, 2006 11:15 am Post subject: |
|
|
 Chevalier
Joined: 17 Jan 2006 Posts: 475
|
you can do this in ESQL just as u said
but if you know the message format you can create a TDS message set and create the message definition file according to your input
--madi |
|
Back to top |
|
 |
Bravo |
Posted: Thu Nov 09, 2006 12:22 pm Post subject: |
|
|
Centurion
Joined: 03 Oct 2005 Posts: 146
|
Jeff,
I'm unaware at this point that I can although very willing to learn from those who can.
Could you please share some inputs to create message sets.
Madi,
Can you provide some inputs in detail..Let me try. _________________ Bravo |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Nov 09, 2006 12:51 pm Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
I'm unwilling to teach Message Broker without getting paid for it. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
anvanzyl |
Posted: Thu Nov 09, 2006 1:31 pm Post subject: |
|
|
Novice
Joined: 03 Jan 2005 Posts: 19 Location: Melbourne, Australia
|
One possibility would be to define a CWF message containing a simple integer type and one complex type matching the structure of your input message (including the CR or LF as applicable) (this type set to have a repeat count = the preceding integer element). Read in the input as a BLOB, construct the message by setting the integer element = number of lines in the message. You can then simply parse the message and do whatever transformation is required. _________________ Regards
Andre
IBM Certified System Administrator -- WMQ V5.3
IBM Certified Solution Designer -- WBIMB V5 |
|
Back to top |
|
 |
kimbert |
Posted: Fri Nov 10, 2006 2:12 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Use TDS. No need for parsing as BLOB.
Your outer structure should have Data Element Separation 'All Elements Delimited' with delimiter of <CR>.
Your inner structure should have Data Element Separation 'Fixed Length' with one child element per field on the line.
If you can't solve the problem now, you need to get training, or else spend some time looking at the samples and the docs. |
|
Back to top |
|
 |
bhaski |
Posted: Tue Apr 03, 2007 5:12 am Post subject: |
|
|
 Voyager
Joined: 13 Sep 2006 Posts: 78 Location: USA
|
KIMBERT will work out. Try TDS |
|
Back to top |
|
 |
|