Re: REXX parse parens

2023-05-03 Thread Dale R. Smith
On Mon, 1 May 2023 23:30:51 +, Frank Swarbrick wrote: >The following is a simplified version of some code from IBM's CEEBLDTX, placed >in to an EXEC I've named PARENS: > >Parse Arg option >Parse Var option varOpt '(' valueOpt ')' >Say varOpt >Say valueOpt > >This handles a simple dataset na

Re: REXX parse parens

2023-05-02 Thread Bruce Hewson
I use this code:- /*===*/ Strip_Keyword_and_Option: Procedure Expose keyword option Parse Arg string

Re: REXX parse parens

2023-05-02 Thread Bob Bridges
Some years ago I tried to write - well, I did write - a routine that parses a string into various components, able to work with pairs of single and double quotes, parens and '/*-*/'. I haven't looked at it in a while, but I'm pretty sure it doesn’t know what to do with embedded delimiters; if t

Re: REXX parse parens

2023-05-02 Thread Mike Schwab
https://www.youtube.com/watch?v=GTCeREg_EeU At least he bought along a generator and gas can for his Tesla. On Tue, May 2, 2023 at 9:34 AM Steve Thompson wrote: > > Nuts. We don't have the power (ok the $$$) to charge a Tesla. > > Rather silly to have to fire up a gasoline generator to charge > t

Re: REXX parse parens

2023-05-02 Thread Seymour J Metz
behalf of David Crayford [dcrayf...@gmail.com] Sent: Tuesday, May 2, 2023 10:01 AM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: REXX parse parens Is there a PCRE package available for REXX? > On 2 May 2023, at 9:57 pm, Seymour J Metz wrote: > > Is there a REXX-aware PEG package? > >

Re: REXX parse parens

2023-05-02 Thread Schmitt, Michael
ut that means it needs to be a variable since REXX won't accept a concatenated literal. -Original Message- From: IBM Mainframe Discussion List On Behalf Of Schmitt, Michael Sent: Tuesday, May 2, 2023 12:16 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: REXX parse parens rpare

Re: REXX parse parens

2023-05-02 Thread Schmitt, Michael
rparen = ')'||'ff'x parse value option||'~' with varOpt '(' valueOpt (rparen) -Original Message- From: IBM Mainframe Discussion List On Behalf Of Frank Swarbrick Sent: Tuesday, May 2, 2023 10:08 AM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: RE

Re: REXX parse parens

2023-05-02 Thread David Crayford
could still get a new Taurus station wagon. > > Peter > > -Original Message- > From: IBM Mainframe Discussion List <mailto:IBM-MAIN@LISTSERV.UA.EDU>> On Behalf Of David Crayford > Sent: Tuesday, May 2, 2023 10:39 AM > To: IBM-MAIN@LISTSERV.UA.EDU <mailto:I

Re: REXX parse parens

2023-05-02 Thread Frank Swarbrick
: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: REXX parse parens > On 2 May 2023, at 7:30 am, Frank Swarbrick > wrote: > > Parse Var option varOpt '(' valueOpt ‘)’ Adding an extra space after the closing parenthesis can help as a workaround. Parse Var option varOpt 

Re: REXX parse parens

2023-05-02 Thread Paul Gilmartin
On Tue, 2 May 2023 22:01:57 +0800, David Crayford wrote: >Is there a PCRE package available for REXX? > The value I find in TSO-REXX is in the ADDRESS environments: o SYSCALL (mostly just the C RTL) o SDSF o ISREDIT o ... ... al

Re: REXX parse parens

2023-05-02 Thread Frank Swarbrick
\= 0 Then valueOpt = valueOpt')' -Original Message- From: IBM Mainframe Discussion List On Behalf Of Jack Zukt Sent: Tuesday, May 2, 2023 1:02 AM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: REXX parse parens Hi This should work Parse arg opt Parse valu

Re: REXX parse parens

2023-05-02 Thread Farley, Peter
Explorer is way too big. I wish I could still get a new Taurus station wagon. Peter -Original Message- From: IBM Mainframe Discussion List On Behalf Of David Crayford Sent: Tuesday, May 2, 2023 10:39 AM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: REXX parse parens If you didn’t have to

Re: REXX parse parens

2023-05-02 Thread David Crayford
If you didn’t have to pay for a Tesla would you prefer it over a Ford Escort? > On 2 May 2023, at 10:33 pm, Steve Thompson wrote: > > Nuts. We don't have the power (ok the $$$) to charge a Tesla. > > Rather silly to have to fire up a gasoline generator to charge that Tesla. > ;-) > > Just Sa

Re: REXX parse parens

2023-05-02 Thread Steve Thompson
Nuts. We don't have the power (ok the $$$) to charge a Tesla. Rather silly to have to fire up a gasoline generator to charge that Tesla.  ;-) Just Say'n'. Steve Thompson On 5/2/2023 10:21 AM, David Crayford wrote: Yikes. Not very user friendly and the linkage overhead is quite heavy. My op

Re: REXX parse parens

2023-05-02 Thread David Crayford
u > are, reputation merely what others think you are.” - - - John Wooden > > -Original Message- > From: IBM Mainframe Discussion List On Behalf Of > David Crayford > Sent: Tuesday, May 2, 2023 9:02 AM > To: IBM-MAIN@LISTSERV.UA.EDU > Subject: Re: REXX parse par

Sv: REXX parse parens

2023-05-02 Thread Lars Höglund
Seems to work if you skip the "blank" together with () -Ursprungligt meddelande- Från: IBM Mainframe Discussion List För Seymour J Metz Skickat: den 2 maj 2023 15:36 Till: IBM-MAIN@LISTSERV.UA.EDU Ämne: Re: REXX parse parens It won't work for nested parentheses. -- Sh

Re: REXX parse parens

2023-05-02 Thread Lionel B. Dyck
l Message- From: IBM Mainframe Discussion List On Behalf Of David Crayford Sent: Tuesday, May 2, 2023 9:02 AM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: REXX parse parens Is there a PCRE package available for REXX? > On 2 May 2023, at 9:57 pm, Seymour J Metz wrote: > > Is there a REXX

Re: REXX parse parens

2023-05-02 Thread David Crayford
BM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on behalf of > David Crayford [dcrayf...@gmail.com] > Sent: Tuesday, May 2, 2023 9:55 AM > To: IBM-MAIN@LISTSERV.UA.EDU > Subject: Re: REXX parse parens > > And if you need more than regexen there are PEGs. > >> On

Re: REXX parse parens

2023-05-02 Thread Seymour J Metz
@LISTSERV.UA.EDU Subject: Re: REXX parse parens And if you need more than regexen there are PEGs. > On 2 May 2023, at 9:50 pm, Seymour J Metz wrote: > > If you need more than ECMA Script regexen there's PCRE. > > > -- > Shmuel (Seymour J.) Metz >

Re: REXX parse parens

2023-05-02 Thread David Crayford
___ > From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on behalf of > David Crayford [dcrayf...@gmail.com] > Sent: Tuesday, May 2, 2023 9:39 AM > To: IBM-MAIN@LISTSERV.UA.EDU > Subject: Re: REXX parse parens > > Shameless plug but you can use my RT

Re: REXX parse parens

2023-05-02 Thread David Crayford
> On 2 May 2023, at 9:47 pm, Paul Gilmartin > <042bfe9c879d-dmarc-requ...@listserv.ua.edu> wrote: > > On Tue, 2 May 2023 21:39:43 +0800, David Crayford wrote: > >> Shameless plug but you can use my RTK package to process regular expressions >> in z/OS REXX https://github.com/daveyc/RTK >>

Re: REXX parse parens

2023-05-02 Thread Seymour J Metz
2023 9:39 AM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: REXX parse parens Shameless plug but you can use my RTK package to process regular expressions in z/OS REXX https://github.com/daveyc/RTK > On 2 May 2023, at 9:22 pm, David Crayford wrote: > > > >> On 2 May 2023, at 7

Re: REXX parse parens

2023-05-02 Thread Paul Gilmartin
On Tue, 2 May 2023 21:39:43 +0800, David Crayford wrote: >Shameless plug but you can use my RTK package to process regular expressions >in z/OS REXX https://github.com/daveyc/RTK > Can it assign fragments to REXX variables? How does it deal with R0? -- gil

Re: REXX parse parens

2023-05-02 Thread Paul Gilmartin
On Tue, 2 May 2023 08:02:25 +0100, Jack Zukt wrote: > >Parse arg opt >Parse value opt with "(" opt") " >If pos(" (", opt) >0 then >Parse value opt with opt" ("member")" >Do >End > It's easy to find a solution when you're posing the problem. -- gil ---

Re: REXX parse parens

2023-05-02 Thread David Crayford
Shameless plug but you can use my RTK package to process regular expressions in z/OS REXX https://github.com/daveyc/RTK > On 2 May 2023, at 9:22 pm, David Crayford wrote: > > > >> On 2 May 2023, at 7:30 am, Frank Swarbrick >> wrote: >> >> Parse Var option varOpt '(' valueOpt ‘)’ > > > >

Re: REXX parse parens

2023-05-02 Thread Seymour J Metz
-MAIN@LISTSERV.UA.EDU Subject: Re: REXX parse parens Hi This should work Parse arg opt Parse value opt with "(" opt") " If pos(" (", opt) >0 then Parse value opt with opt" ("member")" Do End Regards Jack On Tue, May 2, 2023, 00:31 Frank Swa

Re: REXX parse parens

2023-05-02 Thread Seymour J Metz
nolds [rreyno...@cix.co.uk] Sent: Tuesday, May 2, 2023 8:20 AM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: REXX parse parens Alternative POV: I gave up on TSO command format ages ago (where that doesn't conflict with other people) and use *nix-style arguments. In VM/CMS where Rexx got started

Re: REXX parse parens

2023-05-02 Thread David Crayford
> On 2 May 2023, at 7:30 am, Frank Swarbrick > wrote: > > Parse Var option varOpt '(' valueOpt ‘)’ Adding an extra space after the closing parenthesis can help as a workaround. Parse Var option varOpt '(' valueOpt ‘) ‘ Parse is good for simple text yanking but it’s not match for reg

Re: REXX parse parens

2023-05-02 Thread Steve Beaver
To make your life a bit easier use “ instead of ‘ Sent from my iPhone No one said I could type with one thumb > On May 2, 2023, at 07:20, Rupert Reynolds wrote: > > Alternative POV: I gave up on TSO command format ages ago (where that > doesn't conflict with other people) and use *nix-style

Re: REXX parse parens

2023-05-02 Thread Rupert Reynolds
Alternative POV: I gave up on TSO command format ages ago (where that doesn't conflict with other people) and use *nix-style arguments. In VM/CMS where Rexx got started everything after "(" is processed as options For my own use I accept some limitations of parse. Either every argument is forced

Re: REXX parse parens

2023-05-02 Thread Jack Zukt
gards Jack On Tue, 2 May 2023 at 10:46, Lars Höglund wrote: > Why do You have "blank" before and after "()"? > > -Ursprungligt meddelande- > Från: IBM Mainframe Discussion List För Jack > Zukt > Skickat: den 2 maj 2023 09:02 > Till: IBM-MAIN@LISTSERV.

Sv: REXX parse parens

2023-05-02 Thread Lars Höglund
Why do You have "blank" before and after "()"? -Ursprungligt meddelande- Från: IBM Mainframe Discussion List För Jack Zukt Skickat: den 2 maj 2023 09:02 Till: IBM-MAIN@LISTSERV.UA.EDU Ämne: Re: REXX parse parens Hi This should work Parse arg opt Parse value opt with

Re: REXX parse parens

2023-05-02 Thread Jack Zukt
Hi This should work Parse arg opt Parse value opt with "(" opt") " If pos(" (", opt) >0 then Parse value opt with opt" ("member")" Do End Regards Jack On Tue, May 2, 2023, 00:31 Frank Swarbrick wrote: > The following is a simplified version of some code from IBM's CEEBLDTX, > placed in to

Re: REXX parse parens

2023-05-01 Thread Paul Gilmartin
On Mon, 1 May 2023 20:13:36 -0400, Phil Smith III wrote: >... >parse var option keyword '(' value ')' +1 paren > ITYM: parse var option keyword '(' value ')' +0 paren +1 . > >if paren = ')' then /* It's nested! */ >... >This can, of course, be made more iterative. It ain't that pretty, but it

Re: REXX parse parens

2023-05-01 Thread Seymour J Metz
PCRE is one option. There is also a package (XPARSE? XPROC?) that calls IKJPARSE. From: IBM Mainframe Discussion List on behalf of Frank Swarbrick Sent: Monday, May 1, 2023 7:30 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: REXX parse parens The following

Re: REXX parse parens

2023-05-01 Thread Phil Smith III
Frank Swarbrick wrote about trying to parse z/OS-style parameter lists, with nested parens, in Rexx. This has been a challenge since Rexx leapt from VM (where its parsing fits the normal command syntax). In part, I'd say that IF you can make statements about how things MUST be specified, you ca

Re: REXX parse parens

2023-05-01 Thread Paul Gilmartin
On Mon, 1 May 2023 23:30:51 +, Frank Swarbrick wrote: >... >But it doesn't work for a PDS member to following, also surrounded by >parentheses: > >Test2: PARENS COBOL(TEST(MEMBER)) >Results2: >COBOL >TEST(MEMBER > >Any simple REXX parse option to handle this, or do I need to resort to mor

REXX parse parens

2023-05-01 Thread Frank Swarbrick
The following is a simplified version of some code from IBM's CEEBLDTX, placed in to an EXEC I've named PARENS: Parse Arg option Parse Var option varOpt '(' valueOpt ')' Say varOpt Say valueOpt This handles a simple dataset name, e.g.: Test1: PARENS COBOL(TEST): Results1: COBOL TEST But it do