AW: Re: Friday fun with REXX and PARSE

2017-02-26 Thread Peter Hunkeler
>>A recent note asked how, in REXX, to parse a record in this format: >>"word1 word2.word3 word4:word5.word6 word7 hh.mm.ss" > >I admit, I did something similar myself in the compact solution I tendered, and for which I was admonished for needless complexity. I absolutely liked your solution,

Re: Friday fun with REXX and PARSE

2017-02-26 Thread Paul Gilmartin
On Sun, 26 Feb 2017 14:41:14 -0600, William W. Collier wrote: >A recent note asked how, in REXX, to parse a record in this format: >"word1 word2.word3 word4:word5.word6 word7 hh.mm.ss" >... > A friend, Harry Elder (hik...@gmail.com), offers this solution: >input = "word1 word2.word3

Re: Friday fun with REXX and PARSE

2017-02-26 Thread William W. Collier
A recent note asked how, in REXX, to parse a record in this format: "word1 word2.word3 word4:word5.word6 word7 hh.mm.ss" into these variables. var1 = "word1" var2 = "word2.word3" var3 = "word4:word5.word6" var4 = "word7" var5 = "hh" var6 = "mm" var7 = "ss" A friend, Harry Elder

Re: Friday fun with REXX and PARSE

2017-02-25 Thread Randy Hudson
In article Peter wrote: > This is some Friday fun with parsing with REXX. First I was baffled with > the result, now I understand. So *no* I will not join the TSO/REXX list > ;-) > I've got a data set to process with REXX. The records are of format: > > "word1

Re: Friday fun with REXX and PARSE

2017-02-24 Thread Paul Gilmartin
On Fri, 24 Feb 2017 11:33:48 -0700, Sri h Kolusu wrote: >>>The following performs the operation with a single PARSE: > >It can be done without the value SPACE > >STR = "WORD1 WORD2.WORD3 WORD4:WORD5.WORD6 WORD7 HH.MM.SS" >PARSE VAR STR VAR1 ' ' VAR2 ' ' VAR3 ' ' VAR4 ' ' VAR5 '.' VAR6 '.' VAR7

Re: Friday fun with REXX and PARSE

2017-02-24 Thread Sri h Kolusu
lt;000433f07816-dmarc-requ...@listserv.ua.edu> To: IBM-MAIN@LISTSERV.UA.EDU Date: 02/24/2017 11:08 AM Subject: Re: Friday fun with REXX and PARSE Sent by:IBM Mainframe Discussion List <IBM-MAIN@LISTSERV.UA.EDU> On Fri, 24 Feb 2017 06:53:54 -0500, Tony Thigpen

Re: Friday fun with REXX and PARSE

2017-02-24 Thread Paul Gilmartin
On Fri, 24 Feb 2017 06:53:54 -0500, Tony Thigpen wrote: >Steve has it right. Literals take precedent. So it works like this: > >Step 1) split as Temp1 '.' Temp2 '.' Temp3 >... >Step 2) split the "temps" based on the parsing between literals: >... > The following performs the operation

Re: Friday fun with REXX and PARSE

2017-02-24 Thread scott Ford
Peter, Same here haven't seen this strangeness in rexx "the wonder horse"...usung rexx since 1984. Scott On Fri, Feb 24, 2017 at 7:50 AM Peter Hunkeler wrote: > > > >Steve has it right. Literals take precedent. So it works like this: > > > > > > Yep. This is it. Literals split

AW: Re: Friday fun with REXX and PARSE

2017-02-24 Thread Peter Hunkeler
>Steve has it right. Literals take precedent. So it works like this: Yep. This is it. Literals split the source into multiple sources, then PARSE applies "parsing into words" on the individual source parts. I'm just astonished I have never before stumbled across this in my 33+ years with a

AW: Re: Friday fun with REXX and PARSE

2017-02-24 Thread Peter Hunkeler
>Peter needs to slightly, but easily modify his PARSE to get the correct >results. Just watch your ':' and '.'... ;-) Nope, carefully read the manual. Throw away what you think is how PARSE works. -- Peter Hunkeler -- For

AW: Re: Friday fun with REXX and PARSE

2017-02-24 Thread Peter Hunkeler
>have a look into the data in hex format. there are probably non printable >characters there between word 2 and 3, causing this parsing. Wrong guess. -- Peter Hunkeler -- For IBM-MAIN subscribe / signoff / archive access

Re: Friday fun with REXX and PARSE

2017-02-24 Thread Tony Thigpen
Steve has it right. Literals take precedent. So it works like this: Step 1) split as Temp1 '.' Temp2 '.' Temp3 so: Temp1 = word1 word2 Temp2 = word3 word4:word5 Temp3 = word6 word7 hh.mm.ss Step 2) split the "temps" based on the parsing between literals: so: Parse Temp1 with var1 var2

Re: Friday fun with REXX and PARSE

2017-02-24 Thread Hardee, Chuck
ntended recipient, is prohibited. If you are not the intended recipient, please inform the sender and delete all copies. -Original Message- From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf Of Peter Hunkeler Sent: Friday, February 24, 2017 4:33 AM To: IBM-MAIN@

Re: Friday fun with REXX and PARSE

2017-02-24 Thread Steve Horein
Looks to me your literal delimiter took precedent over space delimiters. In other words, PARSE looked for "." first, and found "word3 word4:word5" between the specified literals. On Fri, Feb 24, 2017 at 3:32 AM, Peter Hunkeler wrote: > This is some Friday fun with parsing with

Re: Friday fun with REXX and PARSE

2017-02-24 Thread Elardus Engelbrecht
Itschak Mugzach wrote: >have a look into the data in hex format. there are probably non printable >characters there between word 2 and 3, causing this parsing. No, I got the same results like Peter. No strange characters involved. Peter needs to slightly, but easily modify his PARSE to get

Re: Friday fun with REXX and PARSE

2017-02-24 Thread Itschak Mugzach
Peter, have a look into the data in hex format. there are probably non printable characters there between word 2 and 3, causing this parsing. ITschak On Fri, Feb 24, 2017 at 11:32 AM, Peter Hunkeler wrote: > This is some Friday fun with parsing with REXX. First I was baffled

Friday fun with REXX and PARSE

2017-02-24 Thread Peter Hunkeler
This is some Friday fun with parsing with REXX. First I was baffled with the result, now I understand. So *no* I will not join the TSO/REXX list ;-) I've got a data set to process with REXX. The records are of format: "word1 word2.word3 word4:word5.word6 word7 hh.mm.ss" What I need is each