Author |
Message
|
jefflowrey |
Posted: Fri Aug 18, 2006 4:59 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Are you sure that you are supposed to include the destination file name in that field, and not just the path to where to create the file?
I haven't used the WMBFE, so I don't know. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
MQ_LEO |
Posted: Fri Aug 18, 2006 5:15 am Post subject: |
|
|
Apprentice
Joined: 06 Jul 2006 Posts: 29
|
If I give only directory path. how can i mention the file name.
where to write.
MQ_LEO |
|
Back to top |
|
 |
jefflowrey |
Posted: Fri Aug 18, 2006 5:23 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
jefflowrey wrote: |
I haven't used the WMBFE, so I don't know. |
jefflowrey wrote: |
The more urgent it is for you, the more of your time you need to spend reading and thinking about all the information you have in front of you |
_________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
f.demi |
Posted: Mon Aug 21, 2006 8:24 am Post subject: |
|
|
Novice
Joined: 17 Sep 2001 Posts: 10
|
Hi MQ_LEO,
I understand this issue is important & urgent for you so an obvious disclaimer beforehand: in case you feel you are not progressing quick enough and suspect this may be due to a product defect please open a PMR with IBM technical support immediately.
Having said so...
I assume you got past the initial "sync terminal issue" in a satisfactory way, if you didn't here is a resource that might come handy:
Sample WebSphere Message Broker File Extender sample scenario to demonstrate transactionality and roll-back: http://www-1.ibm.com/support/docview.wss?uid=swg27007598
And here is another good one:
WebSphere Message Broker File Extender - Technical FAQs: http://www-1.ibm.com/support/docview.wss?uid=swg21224984
I think that the most likely cause of this error message:
Quote: |
Invalid output path '/home/chatlapallim/BRIDGESTrace/ssnout.txt' for file output node. Not in file system. |
Is that '/home/chatlapallim/BRIDGESTrace/ssnout.txt' is not a directory... the FileOutput OutputDirectory attribute is intended to contain just the path and not the final file name.
There are several ways of specifying an output file name in a message to file scenario like yours, e.g. try to have a look at the M2F sample provided with the product, it's extremely compact & easy to understand and run.
HTH.
Cheers,
F. |
|
Back to top |
|
 |
smdavies99 |
Posted: Mon Aug 21, 2006 9:09 am Post subject: MBFE is quite easy to use |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
MBFE can take its parameters in two ways.
1) Via the properties in the Proxy Node and the File Output Node
2) At run time from within the flow.
The comments about the proxy node and the MQ reply node in earlier replies are correct.
So, when setting up a flow, Connect up the SYNC terminal to an MQReply Node, set the transactionality of the flow to what you want and you are all done.
In the File Output node all the properties can be overridden at runtime except (in my experience) the
Destination Mode property (Advanced Tab). If you set this to OutputDirectoryList then you can specift the complete path in the flow.
Here is a sample bit of code that I have pasted from a working flow. (Some of the names have been changed to protect the identiy of the system where this is being used)
Code: |
--
-- Set MBFE File Output Node Properties
--
CREATE FIELD OutputLocalEnvironment.Variables.MBFEProperties;
DECLARE mbfe REFERENCE to OutputLocalEnvironment.Variables.MBFEProperties;
--
-- Define the Filname
--
set fname = CAST(msgptr.File_Record_ID as CHAR) || '.img';
SET mbfe.DataType = 0; -- Binary Data
SET mbfe.EorType = 16; -- No EOR Character;
SET mbfe.RecordType = 4; -- No Record Structure
SET mbfe.FileName = fname; -- name of File to create
SET mbfe.action = 'Close'; -- Close file at end of write
-- Finally, setup the output Destination Directory.
--
SET dirname = Environment.SYSDATA.Static_Data.WSD_SAN_PATH || CAST(msgptr.SYSTEM_ID as CHAR);
SET OutputLocalEnvironment.Destination.MBFE.DestinationData[1].Directory = dirname;
--
-- Setup the binary data as the output root and thus is used to crerate the file
--
SET OutputRoot.BLOB.BLOB =
CAST(blobptr.Message_Body.File_Record_Message.File_Record AS BLOB CCSID InputRoot.MQMD.CodedCharSetId );
SET mbfe.FileSize = LENGTH(OutputRoot.BLOB.BLOB);
|
The above code writes binary files extracted from a BLOB inside an XML message to variable directories according to properties in the message.
The File Output node is a single ended node so you will want to wire it up using a FLOW Order Node as the FIRST branch. Then in the second branch, you can continue processing.
Be aware that setting the Proxy Node Transactionality to Yes does hit performance considerably.
That said, the system where the above ESQL is used can output 200,000 messages per hour with BLOB sizes in excess of 100Kb on a Dual CPU XEON processor running Windows Server 2003.
_________________ 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 |
|
 |
MQ_LEO |
Posted: Mon Aug 21, 2006 5:23 pm Post subject: |
|
|
Apprentice
Joined: 06 Jul 2006 Posts: 29
|
Now iam able to write my ouput file on default output path
E:\Documents and Settings\All Users\Application Data\IBM\MBFE\filedata\outbox..
But it writes on default file. But it not taking the file name which i mentioned in my esql code. Here iam providing my esql code. Please give me a suggestion. how can i define output file name in esql.
My flow look like MQInput--->Fileproxy--->Mapping----> Computenode------>FileOutput.
Iam getting Input message in CSV format and mapping that into CWF(cobol) format.
My Esql Code
CREATE COMPUTE MODULE FILE__MSGFLOW_Compute
CREATE FUNCTION Main() RETURNS BOOLEAN
BEGIN
-- CALL CopyMessageHeaders();
CALL CopyEntireMessage();
SET OutputLocalEnvironment = InputLocalEnvironment;
SET OutputLocalEnvironment.Variable.MBFEProperties.FileName = 'SSNVERF.txt';
RETURN TRUE;
END;
CREATE PROCEDURE CopyMessageHeaders() BEGIN
DECLARE I INTEGER;
DECLARE J INTEGER;
SET I = 1;
SET J = CARDINALITY(InputRoot.*[]);
WHILE I < J DO
SET OutputRoot.*[I] = InputRoot.*[I];
SET I = I + 1;
END WHILE;
END;
CREATE PROCEDURE CopyEntireMessage() BEGIN
SET OutputRoot = InputRoot;
END;
END MODULE;
Thanks,
MQ_LEO |
|
Back to top |
|
 |
santale75 |
Posted: Tue Aug 22, 2006 1:30 am Post subject: |
|
|
Newbie
Joined: 22 Aug 2006 Posts: 2
|
Hi MQ_LEO,
I think your sql code is ok but an 's' is missing
Change the line :
SET OutputLocalEnvironment.Variable.MBFEProperties.FileName = 'SSNVERF.txt';
to:
SET OutputLocalEnvironment.Variables.MBFEProperties.FileName = 'SSNVERF.txt';
Cheers,
A. |
|
Back to top |
|
 |
MQ_LEO |
Posted: Tue Aug 22, 2006 6:04 am Post subject: |
|
|
Apprentice
Joined: 06 Jul 2006 Posts: 29
|
Thanks santale75,
It is working.
MQ_LEO |
|
Back to top |
|
 |
dave moule |
Posted: Wed Nov 15, 2006 5:56 am Post subject: FIleOutput node - autocreate output directory |
|
|
 Novice
Joined: 01 Oct 2002 Posts: 12 Location: Hursley, United Kingdom
|
Just to clarify, in Fix Pack 3 you can now optionally have MBFE create an output directory for you if it does not already exist.
Rgds, Dave Moule
Hursley. |
|
Back to top |
|
 |
|