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



<grin> 

It probably would have worked correctly if *all* the lines 
of code were correct but I've changed this tiny program so
many times that I likely had something else wrong :(
Now that I've stripped all the unnecessary code, it
seems to work correctly :) 

DCL SPCPTR .P1 PARM;                                             
DCL DD PARM-STRING   CHAR(10) BAS(.P1);                          
                                                                 
DCL SPCPTR .P2 PARM;                                             
DCL DD PARM-OLDCH    CHAR(1)  BAS(.P2);                          
                                                                 
DCL SPCPTR .P3 PARM;                                             
DCL DD PARM-NEWCH    CHAR(1)  BAS(.P3);                          
                                                                 
DCL OL PARMS(.P1, .P2, .P3) EXT PARM MIN(3);                     
                                                                 
ENTRY * (PARMS) EXT;                                             
    XLATE       PARM-STRING, PARM-STRING, PARM-OLDCH, PARM-NEWCH;
                                                                 
    CAT         MSG-TEXT, PARM-STRING, "|";                      
    CALLI SHOW-MESSAGE, *, .SHOW-MESSAGE;                        
    RTX          *;       
%INCLUDE SHOWMSG          

<sigh> I just got finished re-reading chapter 2 of
Leif's book where he states:

"It is therefore a good idea to code a little, try it,
code a little more, try it, etc."

Another lesson learned:  Pay attention to Leif's
comments!

Now to figure out which chapter covers varying
length parameter strings...

Thanks again for the help Keith!

Terry

> -----Original Message-----
> From: mi400-bounces@xxxxxxxxxxxx 
> [mailto:mi400-bounces@xxxxxxxxxxxx] On Behalf Of Keith Carpenter
> Sent: Tuesday, August 31, 2004 11:21 AM
> To: MI Programming on the AS400 / iSeries
> Subject: Re: [MI400] MI Newbie with XLATE instruction problem
> 
> 
> You are correct about how these copies work.
> 
> What doesn't make sense is your original comment about 
> XLATE       PARM-STRING, PARM-STRING, PARM-OLDCH, PARM-NEWCH;
> not working.   It should have and there would be no need for NEWSTR.
> 
> 
> Keith

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.