Category Archives: REXX

REXX – STRREPLACE : Replace part of a string with new string

The Below Rexx function STRREPLACE can replace a part of a string with a new one /*REXX*/ MYSTR = ‘MY TEST STRING’ SAY MYSTR MYSTR = STRREPLACE(MYSTR,”TEST”,”NEW”) SAY MYSTR EXIT /* A FUNCTION TO DO A STRING REPLACE */ STRREPLACE: ORIGINAL = ARG(1) OLDTXT = ARG(2) NEWTXT = ARG(3) NEWSTR = ORIGINAL DO WHILE POS(OLDTXT,NEWSTR) [...]

Introduction to REXX – Some examples

- A Rexx program should have a comment “/*rexx*/” in the first line – Rexx statements are Case insensitive – A rexx program can be executed by giving “EX” to the rexx member containing the rexx program Hello World program /************REXX***********/ SAY “HELLO WORLD” EXIT IF-ELSE in Rexx /******REXX******/ /* EXECUTE SOME INSTRUCTIONS CONDITIONALLY */ [...]