/* REXX */ 
VAR.0=2 
VAR.1='SOME VALID CHARACTERS' 
VAR.2='CONTAINS !ยง$%&/ WHICH ARE NOT VALID.' 
 
/* VALID CHARACTERS: A-Z AND 0-9 AND BLANK */ 
REFERENCE=XRANGE('A','I')!!XRANGE('J','R')!!XRANGE('S','Z') 
REFERENCE=REFERENCE!!XRANGE('0','9') 
REFERENCE=REFERENCE!!' ' 
SAY 'REFERENCE IS '!!REFERENCE!!'.' 
 
DO IND=1 TO VAR.0 BY 1 
  MY_RC=VERIFY(VAR.IND,REFERENCE) 
  IF MY_RC=0 THEN DO 
    SAY '"'!!VAR.IND!!'" IS VALID.' 
  END; ELSE DO 
    SAY '"'!!VAR.IND!!'" IS NOT VALID AT POSITION '!!MY_RC!!'.'
  END 
END 
EXIT 0 




Miklos Szigetvari <[email protected]> 
Gesendet von: IBM Mainframe Discussion List <[email protected]>
17.01.2011 12:09
Bitte antworten an
IBM Mainframe Discussion List <[email protected]>


An
[email protected]
Kopie

Thema
REXX question: if a string is printable






Hi

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

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

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