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 » Call ESQL function of different project

Post new topic  Reply to topic
 Call ESQL function of different project « View previous topic :: View next topic » 
Author Message
vmanel
PostPosted: Sat Jun 20, 2020 5:54 am    Post subject: Call ESQL function of different project Reply with quote

Acolyte

Joined: 12 Mar 2019
Posts: 57

Hi,

We have special characters coming to IIB in input message like left single quote, right single quote etc, and the output message is sent to AS400 system which doesn't support these characters, so we are using Replace function in code to replace these specific characters with equivalent characters like normal single quote.

But now there is no specific set of special characters that comes to IIB as these are data which user entered in front end webpage. And we don't want to update the code for each special character and redeploy.

So I thought of having a generic application for this which will have a HTTP Input node flow, when this service is called it will read the json file containing special characters and normal characters to be replaced, as key value pair then store them in shared variable and addition of new characters are also taken care in same ESQL module by passing query parameter to this service and file is updated without need of deployment, as we will not be having access to update the file directly.

Now whichever flow present in different project wants to use this, we need to call a seperate ESQL function ReplaceSpecChar() present in same Module, which will take message as input and then check and replace the special characters by using the data stored in shared variable.

The question is, I want this to be deployed only in one EG. And webservice will be listening on one port. But is it possible for other application to call the function present in this application without reference? And If I reference this with other project and call only this function, will it have its own instance of shared variable and webservice will get deployed on multiple ports? I don't want to use global cache. I know, I can use the service itself by using http request in other application to call this application and replace. But I want to know if we can call the ESQL without referencing the project?

And is there any other simpler way to add new special characters dynamically, without changing code and redeployment?
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Sat Jun 20, 2020 11:31 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20696
Location: LI,NY

that sounds like an awful lot of work for no bang... Why don't you just make your content be UTF-8 ? I thought the AS400 could handle UTF-8 ??
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
vmanel
PostPosted: Sun Jun 21, 2020 12:28 am    Post subject: Reply with quote

Acolyte

Joined: 12 Mar 2019
Posts: 57

fjb_saper wrote:
that sounds like an awful lot of work for no bang... Why don't you just make your content be UTF-8 ? I thought the AS400 could handle UTF-8 ??


How to do that? And what will happen to special characters in that case? Is it that straight forward? We had even raised a PMR for this. They asked us to use Translate/Replace/Java to replace the special characters, use MQ get node to parse it with 37 CCSID, which would give XML parser error for unconvertible characters and then use that excepion tree to find and replace the special characters and repeat this process for all characters
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Sun Jun 21, 2020 6:52 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20696
Location: LI,NY

vmanel wrote:
fjb_saper wrote:
that sounds like an awful lot of work for no bang... Why don't you just make your content be UTF-8 ? I thought the AS400 could handle UTF-8 ??


How to do that? And what will happen to special characters in that case? Is it that straight forward? We had even raised a PMR for this. They asked us to use Translate/Replace/Java to replace the special characters, use MQ get node to parse it with 37 CCSID, which would give XML parser error for unconvertible characters and then use that excepion tree to find and replace the special characters and repeat this process for all characters

Do not convert to CCSID 37, set CCSID 1208 on your MQ get request and parse using UTF-8 . UTF-8 should be able to render any character. Of course you won't be able to display anything in CCSID 37...
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
vmanel
PostPosted: Mon Jun 22, 2020 8:31 am    Post subject: Reply with quote

Acolyte

Joined: 12 Mar 2019
Posts: 57

fjb_saper wrote:

Do not convert to CCSID 37, set CCSID 1208 on your MQ get request and parse using UTF-8 . UTF-8 should be able to render any character. Of course you won't be able to display anything in CCSID 37...


But the target application needs the output messages in CCSID 37, as it only supports that, and that is where it is failing, as it is not able to parse the special characters.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Tue Jun 23, 2020 5:08 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20696
Location: LI,NY

vmanel wrote:
fjb_saper wrote:

Do not convert to CCSID 37, set CCSID 1208 on your MQ get request and parse using UTF-8 . UTF-8 should be able to render any character. Of course you won't be able to display anything in CCSID 37...


But the target application needs the output messages in CCSID 37, as it only supports that, and that is where it is failing, as it is not able to parse the special characters.

Why is the target application parsing in CCSID 37? The parsing should be done in CCSID 1208. The results can then be translated to CCSID 37 and you may then have to use a substitution char for non translatable characters... or find out that the fields you need don't have any...
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
rekarm01
PostPosted: Tue Jun 23, 2020 3:05 pm    Post subject: Re: Call ESQL function of different project Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 1415

vmanel wrote:
So I thought of having a generic application for this which will have a HTTP Input node flow, when this service is called it will read the json file containing special characters and normal characters to be replaced, as key value pair then store them in shared variable ...

Now whichever flow present in different project wants to use this, we need to call a seperate ESQL function ReplaceSpecChar() ...

ESQL shared variables are private to the flow or node where they are declared. Two separate flows can't access the same shared variable.

vmanel wrote:
But is it possible for other application to call the function present in this application without reference?

No, it is not possible for a message flow in one application to call an ESQL function from a different application, with or without a reference.

vmanel wrote:
And If I reference this ... ?

The rest of that question was a bit hard to follow, but it's probably not possible to "reference this", regardless.

vmanel wrote:
And is there any other simpler way to add new special characters dynamically, without changing code and redeployment?

The mqsichangeproperties command could change the XMLNSC parser behavior, to replace characters that do not exist in the target code page:

Quote:
mqsichangeproperties IBNODE -e integrationServerName -o ComIbmGenericXmlParserFactory -n invalidCharacterEscapeType -v character_type

How well does the receiving application handle XML character references?
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 » Call ESQL function of different project
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.