Steve,

I did mean what I said but I was only referring to the RC construct being able 
to do mass changes but only selecting lower or upper case to change to the same 
case.  For example, change a to b and A to B.

The change command is still missing one capability I would love to see.  The 
ability to set variables in the first parameter.

C rc'sys(a|b)' 'tmp$1'

That is change sysa to tmpa and sysb to tmpb.

Regards,
Alan.

-----Original Message-----
From: Steve Comstock [mailto:[email protected]] 
Sent: 11 December 2014 17:04
Subject: Re: Regular Expressions in ISREDIT z/OS 2.01

On 12/10/2014 10:45 PM, Alan Watthey wrote:
> David,
>
> Yes, this function works perfectly for me.  You need to use R or RC in front 
> of what you are finding or changing (first parameter).
>
> You have to learn regular expressions of course which can be a bit mind 
> blowing but knowing PERL helps in my case. Although everyone seems to 
> implement regular expressions differently enough to make you have to think.
>

> I love this new feature because I can now change lower case to lower case and 
> upper case to upper case separately in files.

????

Do you mean change lower case to upper case?

Of course you could do that before; for example

     ===> c p'<' p'>' prefix

changes the next leading lowercase letter to its uppercase version (of course, 
this only works correctly with character sets that distinguish between 
uppercase and lowercase - many languages don't).

This course includes a discussion of using picture strings, which have been 
around a long time, but it has not been updated to include a discussion of 
regular expressions:

http://www.trainersfriend.com/TSO_Clist_REXX_Dialog_Mgr/a633descrpt.htm


Kind regards,

-Steve Comstock



>
> Regards,
> Alan.
>
> -----Original Message-----
> From: David Speake [mailto:[email protected]]
> Sent: 11 December 2014 05:06
> Subject: Regular Expressions in ISREDIT z/OS 2.01
>
> We have z/OS 2.01 up in the sysprog's sandbox and I am attempting to 
> play with regular expressions in ISREDIT  FIND an CHANGE commands both 
> from the command line and within macros. Having NO luck. When I run 
> this MACRO
> /*  REXX */
> /* LINE */
> /* LANE */
> TRACE ?I
> ADDRESS ISREDIT
> SAY ADDRESS()
> MACRO
> "F" "'L[AI]NE'"
> against itself it does not find line and lane, it finds 'L[AI]NE'
>   Looking for information I went to TUTOR ISR2M21K via the long route at 
> which point ....
>
> A regular expression string is used to specify a pattern for the string as 
> supported by the C runtime library REGCOMP function, instead of the exact 
> characters to be found.
>
>      Example -   ===> find r'l[ai]ne' word       will find words lane and line
>                                              in the file being edited A 
> regular expression string is a quoted string that is preceded or followed by 
> the letter "R" or the letters "RC". Use "RC" to request a case sensitive 
> search be performed.
>
> The string must conform to the format allowed by the REGCOMP function 
> supported by the C runtime library and the C runtime library must be 
> available.
>
> Could this be my problem? Is this C runtime library available in z/OS ONLY if 
> you buy the C compiler? I do not know if we do or don't have it and I'd 
> rather not upset my SYSPROG with invidious curiosity ;-). Whither this beast? 
> What be its name, directory, etc.
> Will be back at my desk Thursday about 5:00 EDT.
>
> ----------------------------------------------------------------------
> For IBM-MAIN subscribe / signoff / archive access instructions, send 
> email to [email protected] with the message: INFO IBM-MAIN
>
> ----------------------------------------------------------------------
> For IBM-MAIN subscribe / signoff / archive access instructions, send 
> email to [email protected] with the message: INFO IBM-MAIN
>

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions, send email to 
[email protected] with the message: INFO IBM-MAIN

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to