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 » Regarding file extender nodes

Post new topic  Reply to topic Goto page Previous  1, 2
 Regarding file extender nodes « View previous topic :: View next topic » 
Author Message
jefflowrey
PostPosted: Fri Aug 18, 2006 4:59 am    Post subject: Reply with quote

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
View user's profile Send private message
MQ_LEO
PostPosted: Fri Aug 18, 2006 5:15 am    Post subject: Reply with quote

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
View user's profile Send private message
jefflowrey
PostPosted: Fri Aug 18, 2006 5:23 am    Post subject: Reply with quote

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
View user's profile Send private message
f.demi
PostPosted: Mon Aug 21, 2006 8:24 am    Post subject: Reply with quote

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
View user's profile Send private message
smdavies99
PostPosted: Mon Aug 21, 2006 9:09 am    Post subject: MBFE is quite easy to use Reply with quote

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.
Code:

_________________
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
View user's profile Send private message
MQ_LEO
PostPosted: Mon Aug 21, 2006 5:23 pm    Post subject: Reply with quote

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
View user's profile Send private message
santale75
PostPosted: Tue Aug 22, 2006 1:30 am    Post subject: Reply with quote

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
View user's profile Send private message
MQ_LEO
PostPosted: Tue Aug 22, 2006 6:04 am    Post subject: Reply with quote

Apprentice

Joined: 06 Jul 2006
Posts: 29

Thanks santale75,

It is working.

MQ_LEO
Back to top
View user's profile Send private message
dave moule
PostPosted: Wed Nov 15, 2006 5:56 am    Post subject: FIleOutput node - autocreate output directory Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Goto page Previous  1, 2 Page 2 of 2

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Regarding file extender nodes
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.