I would use a mix of ignorant conversion of upper/lower to Proper case and a data dictionary that keeps those names that cannot be simple converted to proper case. I have the conversion tool. You will want to create a dictionary table and add to that outside of the conversion tool. Add this dictionary table as the first operation in a tool like the following, if found use that value else perform simple conversion. This tool below is only truly valid for code page American English words.
//===================================================================
//===================================================================
// Procedure name: Utl_Tomixed
//===================================================================
//===================================================================
Dcl-Proc Utl_Tomixed Export;
Dcl-Pi Utl_Tomixed Varchar(32767);
String Varchar(32767) CONST OPTIONS(*VARSIZE);
End-Pi;
// Local fields
Dcl-S Newstring Varchar(32767);
Dcl-S Pos Int(10);
Dcl-S Blankb4 Ind;
Dcl-C UP 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';
Dcl-C LO 'abcdefghijklmnopqrstuvwxyz';
Newstring = String;
For Pos = 1 to %Len(String);
If %Subst(Newstring :Pos :1) <= x'40';
Blankb4 = *On;
Endif;
If %Subst(Newstring :Pos :1) > x'40' and
(Blankb4 or Not Blankb4 and Pos = 1);
Blankb4 = *Off;
%Subst(Newstring :Pos :1)
= %Xlate(LO :UP :%Subst(Newstring :Pos :1));
Else;
%Subst(Newstring :Pos :1)
= %Xlate(UP :LO :%Subst(Newstring :Pos :1));
Endif;
Endfor;
Return Newstring;
//==================
Begsr *PSSR;
If Pgmisinerror();
Return Newstring;
EndIf;
Return Newstring;
Endsr;
End-Proc Utl_Tomixed;
-Matt
-----Original Message-----
From: MIDRANGE-L [mailto:midrange-l-bounces@xxxxxxxxxxxxxxxxxx] On Behalf Of Alan Shore
Sent: Monday, January 14, 2019 1:45 PM
To: midrange-l@xxxxxxxxxxxxxxxxxx
Subject: Need help to convert a name in upper case, to mixed case
Hi everyone
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
Alan Shore
E-mail : ASHORE@xxxxxxxx
Phone [O] : (631) 200-5019
Phone [C] : (631) 880-8640
'If you're going through hell, keep going.'
Winston Churchill
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit:
https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.midrange.com_mailman_listinfo_midrange-2Dl&d=DwICAg&c=2S-2xx8Cum_thMfWs-kOOHQTwolPvSZ4PFLhr1wDDGs&r=wgq2KO1Tl8HswJht2RKpmz7qvL2YDU_M-VhnRH6r43I&m=8KtguNrEq6zAcToxHr-_qjbpGo4Pru0NJgOChTXdLqA&s=qoRzyCMmFrLF-PYNtWTSbDy5jXEKKpHfZRlcqJvq9Ws&e=
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives at
https://urldefense.proofpoint.com/v2/url?u=https-3A__archive.midrange.com_midrange-2Dl&d=DwICAg&c=2S-2xx8Cum_thMfWs-kOOHQTwolPvSZ4PFLhr1wDDGs&r=wgq2KO1Tl8HswJht2RKpmz7qvL2YDU_M-VhnRH6r43I&m=8KtguNrEq6zAcToxHr-_qjbpGo4Pru0NJgOChTXdLqA&s=uQu7jih86RBo25P_kmGAOZaOwOnqTaYybAUofSg_0cI&e=.
Please contact support@xxxxxxxxxxxx for any subscription related questions.
Help support midrange.com by shopping at amazon.com with our affiliate link:
https://urldefense.proofpoint.com/v2/url?u=https-3A__amazon.midrange.com&d=DwICAg&c=2S-2xx8Cum_thMfWs-kOOHQTwolPvSZ4PFLhr1wDDGs&r=wgq2KO1Tl8HswJht2RKpmz7qvL2YDU_M-VhnRH6r43I&m=8KtguNrEq6zAcToxHr-_qjbpGo4Pru0NJgOChTXdLqA&s=hBFS8FwImMhfsW4kAxrWSue_E6Cjr3huU2b1scHhe8M&e=
As an Amazon Associate we earn from qualifying purchases.