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 » Pattern - ESQLFile

Post new topic  Reply to topic
 Pattern - ESQLFile « View previous topic :: View next topic » 
Author Message
akidase
PostPosted: Wed Nov 20, 2013 3:53 am    Post subject: Pattern - ESQLFile Reply with quote

Centurion

Joined: 10 Jan 2011
Posts: 124

I am trying to write Java code to manipulate ESQL File as a part of Pattern Authoring.

I am not sure on how to retrieve ESQLFile object.. Please help. I have tried like the below.

Code:
File esql = new File(location+"/"+patternInstanceName+"_ExemplarProject/InboundMappers/SingleTxnToISFMapper_Template.esql");
ESQLFile esqlFile = new ESQLFile(esql); //--need something that returns ESQLFile
         
Vector<ESQLModule> esqlModules = esqlFile.getEsqlModules();

System.out.println("Size:"+esqlModules.size()); // This is returning 0.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Wed Nov 20, 2013 4:08 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

the getEsqlModules should only return the list of Compute modules within the ESQL file.

That is, the Vector containing anything that is
Code:
CREATE COMPUTE MODULE
...
END MODULE;


If your size of the vector is 0, then likely it's not finding any Compute modules in the file you loaded.

It doesn't look like there's a way to automatically find ESQL files or any files within the pattern, you would have to use standard methods to iterate over files in the workspace, and then construct File objects that reference them.

If you then want to change the contents of the ESQL file, you have to treat it as text and manipulate it that way. There doesn't appear to be any kind of class or object that will let you manipulate ESQL statements.
Back to top
View user's profile Send private message
akidase
PostPosted: Wed Nov 20, 2013 5:18 am    Post subject: Reply with quote

Centurion

Joined: 10 Jan 2011
Posts: 124

ESQL File that I supplied has Module.. I used the below to verify.
Code:
//         System.out.println(esql.getAbsolutePath()+"File at apth");
//         System.out.println("file size"+esql.length());
//         System.out.println("file present"+esql.isFile());


Even I wrote the entire file after reading.. and saw it was proper.
I am on 7.0.0.6 Toolkit.


So you suggestion if I understand it correct is to write normal Java code to do file operations, correct ?

esqlFile.getName() returns the correct filename as well.
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 » Pattern - ESQLFile
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.