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 » ESQL - Read contents of a file

Post new topic  Reply to topic
 ESQL - Read contents of a file « View previous topic :: View next topic » 
Author Message
integrated
PostPosted: Thu Oct 15, 2009 12:31 pm    Post subject: ESQL - Read contents of a file Reply with quote

Newbie

Joined: 15 Oct 2009
Posts: 6

I am new to ESQL. whats are the function/statement to read the contents of a file from a specified location using ESQL.

I have a requirement where as part of message flow need to read a file and map some values from the file in incoming message.

Customer does not want to use database for having mapping data in tables. They wanted it to be in files on disk only.

Thanks for ur help
Back to top
View user's profile Send private message
smdavies99
PostPosted: Thu Oct 15, 2009 12:57 pm    Post subject: Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

Have you looked at the product documentation? (hint there is a link at the top of the page to the info centre)

This question (or a similar variant thereof) has been asked many times before in this foum.

Take a look at the infocentre and other questions in this forum and then by all means come back with other questions.
_________________
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
Vitor
PostPosted: Thu Oct 15, 2009 12:58 pm    Post subject: Re: ESQL - Read contents of a file Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

integrated wrote:
I am new to ESQL. whats are the function/statement to read the contents of a file from a specified location using ESQL.


There are no such functions or statements. Use the FileInput node.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
integrated
PostPosted: Thu Oct 15, 2009 1:50 pm    Post subject: Reply with quote

Newbie

Joined: 15 Oct 2009
Posts: 6

FileInput Node: Once file read, file input node has only options:delete/move. But i need the file to be just read and no action taken after? how can this be achieved ?
Back to top
View user's profile Send private message
Gaya3
PostPosted: Thu Oct 15, 2009 11:28 pm    Post subject: Reply with quote

Jedi

Joined: 12 Sep 2006
Posts: 2493
Location: Boston, US

integrated wrote:
FileInput Node: Once file read, file input node has only options:delete/move. But i need the file to be just read and no action taken after? how can this be achieved ?


you can opt the Move funtion to move file to an archive folder.

Or think about reading the file through Java Compute node.
_________________
Regards
Gayathri
-----------------------------------------------
Do Something Before you Die
Back to top
View user's profile Send private message
zpat
PostPosted: Thu Oct 15, 2009 11:33 pm    Post subject: Reply with quote

Jedi Council

Joined: 19 May 2001
Posts: 5866
Location: UK

It's better to store such data in a database table.
Back to top
View user's profile Send private message
broker_new
PostPosted: Fri Oct 16, 2009 7:58 am    Post subject: Reply with quote

Yatiri

Joined: 30 Nov 2006
Posts: 614
Location: Washington DC

It would be nice if IBM provides in WMBv7.0

For everything that we can't do in ESQL, there is a way i.e JAVA probably PHP in future.
Back to top
View user's profile Send private message
smdavies99
PostPosted: Fri Oct 16, 2009 8:08 am    Post subject: Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

Personal comment
Java has a log going for it BUT too many people rely on Properties files for just about everything. I had to support an application that read in over 30 different properties files just to process one JMS Message. Then for the next message it read ALL the properties files again.
Arrrggghhhhh!
Needless to say it ran like a 3 legged dog in the Greyhound Derby.

When I design Flows that need something like a properties file I tend to use a database table. If the flow is expected to process 10's of messages a second, I don't read the table for every message. Instead I use a timerNode connected to a Compute Node that reads the table(without any read locks) once every 10 seconds or so.

In my experience these 'properties files' don't change very often and are often pretty irrelevant to the proper operation of the application.

Just my personal thoughts.
_________________
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
mymq
PostPosted: Tue Oct 20, 2009 1:19 am    Post subject: Reply with quote

Centurion

Joined: 01 Mar 2007
Posts: 101
Location: US-Greenwille

after reading the file, why dont u write the file using FileOutputNode into some other desired location and make use of it later?
_________________
--SRK--
Back to top
View user's profile Send private message Send e-mail
mymq
PostPosted: Tue Oct 20, 2009 1:21 am    Post subject: Reply with quote

Centurion

Joined: 01 Mar 2007
Posts: 101
Location: US-Greenwille

But, better to use JAVA code to do the needful
_________________
--SRK--
Back to top
View user's profile Send private message Send e-mail
zpat
PostPosted: Tue Oct 20, 2009 1:46 am    Post subject: Reply with quote

Jedi Council

Joined: 19 May 2001
Posts: 5866
Location: UK

Run a flow on a timer basis to load the file (fileinput node) into a database table.

Do not attempt to use WMB like a standard app server.

Use the IBM builtin facilities and use some lateral thinking to find a way.
Back to top
View user's profile Send private message
smdavies99
PostPosted: Tue Oct 20, 2009 3:08 am    Post subject: Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

zpat wrote:

Do not attempt to use WMB like a standard app server.

Use the IBM builtin facilities and use some lateral thinking to find a way.



There are a number of regular posts in this forum that (and I'm guessing here) seem to indicate that people are indeed trying to use Broker as an AppServer and as they are probably used to coding in Java(nowt wrong in that as I dabble a bit myself) the use of 'Properties Files' is pretty widespread.

I was recently faces with this sort of probme and Iwent back to the designed and asked them the question.
How often or if ever will the values stored in those files change once the system goes into production?

The answer came back, Pretty well never
Then I said that I'll stick them in a DB table and have done with it.
They couldn't really object as there was one less file to :-
- Deploy
- Accidentally get deleted
- be maintained

I wrote a little Java App that allowed the admins to set any value in the table and everyone was happy.
_________________
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
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » ESQL - Read contents of a file
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.