On Mon, 17 Jan 2011 12:09:46 +0100, Miklos Szigetvari
<[email protected]> wrote:

>Hi
>
>Any REXX function to decide if a string contains only printable characters?
>

I'm sure there are different ways.  Here is what I do in my IPLINFO exec
for displaying subsystem names which often have non-display characters
(I replace them with a period like ISPF browse does by default):


Call XLATE_NONDISP SSCTSNAM /* translate non display chars         */
SSCTSNAM = RESULT           /* result from XLATE_NONDISP           */


XLATE_NONDISP:       /* translate non-display characters to a "."    */  
Arg XLATEPRM                                                             
XLATELEN = Length(XLATEPRM) /* length of parm passed to routine      */  
Do I = 1 to XLATELEN                      /* check each byte for     */  
  If (Substr(XLATEPRM,I,1) > '00'x & ,    /* non-display characters  */  
    Substr(XLATEPRM,I,1) < '40'x ) | ,    /* and replace each        */  
    Substr(XLATEPRM,I,1) = 'FF'x  then ,  /* character that          */  
    XLATEPRM = OVERLAY('.',XLATEPRM,I)    /* is non-displayable      */  
End                                       /* with a period (.)       */  
Return XLATEPRM                                                          


--
Mark Zelden - Zelden Consulting Services - z/OS, OS/390 and MVS       
mailto:[email protected]                                          
Mark's MVS Utilities: http://home.flash.net/~mzelden/mvsutil.html 
Systems Programming expert at http://expertanswercenter.techtarget.com/

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to