× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



"MIDRANGE-L" <midrange-l-bounces@xxxxxxxxxxxxxxxxxx> wrote on 01/14/2019
03:45:08 PM:
Before I forget, we are on V7r3

We have a process in place that makes a call (java) to an external
server, passing in the customers name (in upper case) to have it
returned in mixed case - good for a letter
For example - my name would be translated from ALAN SHORE, to Alan Shore
This was built 12 or 13 years ago, and we never had a problem -
until yesterday
We could not contact that external server - and the program is
forced into msgw
This program is the backbone to out Order Management system - so no
orders were being processed
Fortunately we discovered the root of the problem (someone had
turned the server off) and we were able to process the orders

Now, here is my question
Rather than contact this external server, is there anything that can
be placed (or used) on the AS/400 that will do this translation?

I hope what I wrote makes some sense

As always, any and all replies gratefully accepted


I wrote a JavaScript function to convert a space-delimited string
to camel case. So, I would think that using the SQL REGEX_REPLACE
function you could wrote your own UDF to do what you want.


String.prototype.toCamelCase = function(cap1st)
{
// this method can convert supplied string into two different
Camel Case formats based on parameter:
// if parameter "cap1st" supplied as true, very first letter is
capitalized else it remains as lower-case.
// NOTE:
// the .replace() method below strips out all special characters,
numbers, and whitespace: /[^a-z]+([a-z])/g
// to strip out just dashes, underscores, and whitespace use this:
/[\s\-_]+([^\s\-_])/g
// to strip out just underscores use this: /_+([^_])/g
return ((cap1st?" ":"") + this.trimAll())
.toLowerCase()
.replace(/[^a-z]+([a-z])/g
, function(match,
p1, offs, strg)
{
return
p1.toUpperCase();
}
);
}


Sincerely,

Dave Clark

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.