× 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.



"RPG400-L" <rpg400-l-bounces@xxxxxxxxxxxx> wrote on 05/24/2016 04:55:15
PM:
Let’s just agree to disagree on that Dave.

It is not what Xlate was intended to do...

We can certainly agree to disagree. However, Xlate is intended to
provide character translation. Using it for template-controlled
translation is no different. Just because something was not thought of by
those who wrote the documentation doesn't mean it is wrong. One can even
add a layer of abstraction in order to plainly "document" what is being
done. This is a good candidate as a service procedure in my General
Utilities service program. Thanks all.

dcl-s cPhoneNumber char(10) inz('1234567890');
dcl-s ResultString varchar(50);
ResultString = 'Result is: '
+ FormatString('(ABC) DEF-GHIJ': cPhoneNumber);
DSPLY ResultString '*EXT';
*inlr = *on;
return;

dcl-proc FormatString;
dcl-pi *n varchar(40);
TemplateFormat varchar(40) const;
InputString varchar(26) const;
end-pi;
dcl-c TemplateChars 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';
return %xlate(TemplateChars: InputString: TemplateFormat);
end-proc;

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.