You mean like this?

*-* Parse Value myVar with . . . myVal2 '.' .
>>>   "word1 word2 9.12 word3.ext"
>.>   "word1"
>.>   "word2"
>.>   "9"
>>>   ""
>.>   "12 word3.ext"

But you're correct, variables result in the same behavior:

*-* Parse Value myVar with t1 t2 t3 myVal2 '.' .
>>>   "word1 word2 9.12 word3.ext"
>>>   "word1"
>>>   "word2"
>>>   "9"
>>>   ""
>.>   "12 word3.ext"

So it is the definition of a blank delimited word that escaped me.  I'll look 
for a precise definition of one of those in the context of Rexx. 

Thomas Ambros
zEnterprise Operating Systems
zEnterprise Systems Management
518-436-6433

-----Original Message-----
From: IBM Mainframe Discussion List <IBM-MAIN@LISTSERV.UA.EDU> On Behalf Of 
Seymour J Metz
Sent: Monday, February 24, 2020 16:17
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Rexx parse using period as placeholder



*** Warning: External message - exercise caution. Think before you click. ***


Why did it surprise you, and what does it have to do with the placeholders? 
You'd get the same thing if you used three variable names instead of three 
periods. The parse with works because it's using a different template on a 
different value: try

    parse Value myVar with . . . myVal '.' .


--
Shmuel (Seymour J.) Metz
https://urldefense.proofpoint.com/v2/url?u=http-3A__mason.gmu.edu_-7Esmetz3&d=DwIFAg&c=Y1KkN7JyAPjrAJTUCirS0fy9vQY8xn4_Oh4EEEpbXx4&r=7ds2LAJ99_WyGG6a4BwzaJ7R0vee6JgTc4Txes6yEew&m=RwHovw9Jb8ZzPnV0Fb8JtuHSrWfHboK75HB0QKXv7Dw&s=7RT-emP8kpFQ1NAQn6MxdRyt8N1z8blOyGY0-o_XwNw&e=
 

________________________________________
From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on behalf of 
Ambros, Thomas [0000010f77c934b1-dmarc-requ...@listserv.ua.edu]
Sent: Monday, February 24, 2020 3:43 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Rexx parse using period as placeholder

A trivial item, but this surprised me.

I wanted to parse out the string 'word3' using the period as a place holder.  
The input could have a blank delimited string containing an embedded period 
before the one I wanted to parse out.  The Parse Var as coded didn't work.  
Using the Parse Value as coded there does work.  I didn't know it would behave 
like that.  I can't seem to find this documented but I might have overlooked 
something.

myVar = 'word1 word2 9.12 word3.ext'
Parse Var myVar . . . myVal '.' .
Parse Value Subword(myVar,4) with myVal2 '.' .
Say 'myVal=' myVal
Say 'myVal2=' myVal2
Exit

Trace R of that code:

     3 *-* myVar = 'word1 word2 9.12 word3.ext'
       >>>   "word1 word2 9.12 word3.ext"
     4 *-* Parse Var myVar . . . myVal '.' .
       >.>   "word1"              -
       >.>   "word2"
       >.>   "9"
       >>>   ""
       >.>   "12 word3.ext"
     5 *-* Parse Value Subword(myVar,4) with myVal2 '.' .
       >>>   "word3.ext"
       >>>   "word3"
       >.>   "ext"
     6 *-* Say 'myVal=' myVal
       >>>   "myVal= "
myVal=
     7 *-* Say 'myVal2=' myVal2
       >>>   "myVal2= word3"
myVal2= word3
     8 *-* Exit

Thomas Ambros
zEnterprise Operating Systems
zEnterprise Systems Management
518-436-6433


This communication may contain privileged and/or confidential information. It 
is intended solely for the use of the addressee. If you are not the intended 
recipient, you are strictly prohibited from disclosing, copying, distributing 
or using any of this information. If you received this communication in error, 
please contact the sender immediately and destroy the material in its entirety, 
whether electronic or hard copy. This communication may contain nonpublic 
personal information about consumers subject to the restrictions of the 
Gramm-Leach-Bliley Act. You may not directly or indirectly reuse or redisclose 
such information for any purpose other than to provide the services for which 
you are receiving the information.

127 Public Square, Cleveland, OH 44114

If you prefer not to receive future e-mail offers for products or services from 
Key, send an email to mailto:dnereque...@key.com with 'No Promotional E-mails' 
in the SUBJECT line.

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions, send email to 
lists...@listserv.ua.edu with the message: INFO IBM-MAIN

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions, send email to 
lists...@listserv.ua.edu with the message: INFO IBM-MAIN

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to