Author |
Message
|
anandsitha |
Posted: Mon Aug 08, 2011 4:52 am Post subject: Configuaring Message Set in File Output Node |
|
|
Acolyte
Joined: 26 Jul 2011 Posts: 59
|
Hi-
My flow is like belw:-
File Input Node ----->Compute Node------->File Output Node
I am going to read a Order file in text file format.
It should be transforemed via compute node using message set and generate a output file.
How to complete this task.
Regards
Sithanandam.V |
|
Back to top |
|
 |
Vitor |
Posted: Mon Aug 08, 2011 5:00 am Post subject: Re: Configuaring Message Set in File Output Node |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
anandsitha wrote: |
How to complete this task. |
Write a flow along the lines you posted, which seems very reasonable.
If you want me to do your job for you, we need to talk terms.
If you want to do it yourself, but be told how, an associate of mine will be along in a moment with a helpful link. Or lancelotlinc.
Or if you've already written a flow along the lines you indicate but it's not working out as you expect, a few more details on what exactly's happening perhaps.....? _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
WMBDEV1 |
Posted: Mon Aug 08, 2011 5:01 am Post subject: |
|
|
Sentinel
Joined: 05 Mar 2009 Posts: 888 Location: UK
|
Tell your manager that the task that he has asked you to do is beyond your current knowledge of the product and that some form of training / mentoring is needed to address this issue.
Then tell him that until hes given you training you've asked for; you are waiting on a group of volunteers that you don't know to do your job for you.
Its probably worth raising this as a risk on his project plan also.
OR
Show some effort on your part, tell us what you tried, what you read and what didnt work. You may find some people bite then and help you out. |
|
Back to top |
|
 |
anandsitha |
Posted: Tue Aug 16, 2011 4:32 am Post subject: |
|
|
Acolyte
Joined: 26 Jul 2011 Posts: 59
|
Hi All-
I found the answer for my question... below code is working fine.
DECLARE options INTEGER BITOR(ValidateContentAndValue,ValidateBasicConstraints,ValidateException,ValidateDeferred);
DECLARE env REFERENCE TO Environment.Variables;
--SET OutputRoot.MRM = InputRoot.BLOB.BLOB;
SET OutputRoot.Properties.MessageSet = 'DQADLGC10C001';
SET OutputRoot.Properties.MessageType = 'ASCX12Interchange';
SET OutputRoot.Properties.MessageFormat = 'XML';
SET OutputRoot.Properties.Encoding = InputRoot.Properties.Encoding;
SET OutputRoot.Properties.CodedCharSetId = InputRoot.Properties.CodedCharSetId;
SET OutputLocalEnvironment = InputLocalEnvironment;
CREATE LASTCHILD OF OutputRoot DOMAIN 'MRM' PARSE (InputRoot.BLOB.BLOB
ENCODING InputRoot.Properties.Encoding
CCSID InputRoot.Properties.CodedCharSetId
SET 'DQADLGC10C001'
TYPE 'ASCX12Interchange'
FORMAT 'X12'
OPTIONS options);
Note1: The message set i have used is in the sample x12 to xml converstion.
Note2: I have changed the parsing option as Blob instead of MRM and write the above mentioned code in compute node.
Note3: Use the same file which is given in the sample. You will get the same output.
Regards
Sithanandam.V |
|
Back to top |
|
 |
WGerstma |
Posted: Tue Aug 16, 2011 4:51 am Post subject: |
|
|
Acolyte
Joined: 18 Jul 2011 Posts: 55
|
Perhaps I did not got the point.
Why didn't you just configure the MessageSet in the FileInput? Would be the same result without a line of ESQL |
|
Back to top |
|
 |
smdavies99 |
Posted: Tue Aug 16, 2011 5:23 am Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
I have worked on systems where you had to archive the input BLOB in an unadulterated format (for legal reasons). So configuring the message set details in the InputNode is not really what is wanted.
But generally, doing it the way the poster has done does seem a bit arse-about-faced. _________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions. |
|
Back to top |
|
 |
anandsitha |
Posted: Tue Aug 16, 2011 7:02 am Post subject: |
|
|
Acolyte
Joined: 26 Jul 2011 Posts: 59
|
Hi WGerstma-
Suppose i want to get a file in any format (ex, x12, flat file, xml). I can get these file using (Blob as a Message domain) Input node properties.
In the compute node I can send the particular message to particular parser. and do the transformation according to the file format which is read by input node.
You need to have 2 separate input node for 2 different file formats. If it n different file means n number of input node. So doing it in the compute node reduce the use of more nodes in the map.
Regards
Sithanandam.V |
|
Back to top |
|
 |
mqjeff |
Posted: Tue Aug 16, 2011 7:04 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
anandsitha wrote: |
Suppose i want to get a file in any format (ex, x12, flat file, xml). I can get these file using (Blob as a Message domain) Input node properties.
In the compute node I can send the particular message to particular parser. and do the transformation according to the file format which is read by input node. |
Yes, *IF* you need to do that, THEN your method makes sense.
BUT you didn't *say* anything about needing to do that, or in fact anything resembling nearly enough information to provide actual advice.
You simply asked us to write your flow for you. |
|
Back to top |
|
 |
Vitor |
Posted: Tue Aug 16, 2011 7:18 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
anandsitha wrote: |
In the compute node I can send the particular message to particular parser. and do the transformation according to the file format which is read by input node. |
What file format? It's always a BLOB. Unless you're reading the file extensions, when you're reliant on the sending application (x12, XML & "flat file" could all arrive as .txt files legitimately).
And if you are using file extensions, you could still avoid the use of a Compute node by having a file node per extension with the correct message set in it. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
|