Re: Finding and replying to outstanding reply

2020-02-25 Thread Brian Westerman
The cbttape file 19 (Command) is a working example.  While it's a bit old (code 
wise), the replay part works fine.  The code is short and easy to understand, 
you will see why I say that if you download it and look at who updated many of 
the features.

while it doesn't really compare to the products we market (which does hundreds 
of things that are not in the Commands code), it will provide you with the 
sample code you are looking for.  Our automation products are much cheaper than 
IBM or CA, but command is free, so you can extract options from it that you 
think you might want to include in your own code.

Brian Westerman

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


Re: Old joke realism

2020-02-25 Thread Vernooij, Kees (ITOP NM) - KLM
Interesing material. Is 'old' equal to 'adult'? My company firewall protects me 
with the message:

Sorry, you don't have permission to visit this site.
Not allowed to browse Adult Material category
You tried to visit: http://bofh.bjash.com/

Kees


-Original Message-
From: IBM Mainframe Discussion List  On Behalf Of 
Seymour J Metz
Sent: 25 February 2020 17:58
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Old joke realism

The BOFH and User Friendly cartoons are funny but like nothing I've ever seen 
IRL. Dilbert, OTOH, leaves me with an eerie sense of familiarity. 


--
Shmuel (Seymour J.) Metz
http://mason.gmu.edu/~smetz3



From: IBM Mainframe Discussion List  on behalf of 
Adam Jacobvitz <02b29b762ea6-dmarc-requ...@listserv.ua.edu>
Sent: Tuesday, February 25, 2020 9:06 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Old joke realism

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

I know this isn't mainframe related, but how realistic are the old computer 
jokes? e g.

http://secure-web.cisco.com/1f2K4lkajzTKLo5c1rk3zVrtIrQsDcMOwmwySvMKhcI4rmltQY6WMVzc61COVPYp7_qm5pSiEYAjhjjxS0MhgSFKfvoloKx_40_s7pg1xzIpHlZkC6l64qBm1yuAU_HvaIhc0QgbpNj3ZRQVzi5c4S55yGnzeym0tpPp2CNcnHa824kWiikxJBxhqeSWOiApDgPOZ3IjmGk-a2HNbB5V-C7jmkU4WJjiGYgirgkQDT6dIAqsG6dVmPhp2OstOQ3lozL0wKUZnO7Fzl7tX93b8qTftq3cgJysQY3kaHTYj90SLgCW9BWab-PgMfcdQYCfM1fw5fEbNGqt7ylCJsJNafhwlhEJJR7ZaKP96liQ4u6LOgGDLTVrxyILYhlWGWZS0Bcm98oHKIjk7o4WqV_fJwx6vbXRGDENHyA3xt6JF3lJHn11tbvLz53QQXY9pXttG/http%3A%2F%2Fbofh.bjash.com



Sent from ProtonMail mobile



\ Original Message 
On Feb 25, 2020, 5:58 AM, Seymour J Metz < sme...@gmu.edu> wrote:

>
>
>
> I may have done that in the old days, but isn't everything interesting in the 
> CONSOLE address space these days?
>
>
> \--
> Shmuel (Seymour J.) Metz
> http://mason.gmu.edu/~smetz3
>
> \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_
> From: IBM Mainframe Discussion List \[IBM-MAIN@LISTSERV.UA.EDU\] on behalf of 
> Chuck Arney \[ch...@arneycomputer.com\]
> Sent: Tuesday, February 25, 2020 8:55 AM
> To: IBM-MAIN@LISTSERV.UA.EDU
> Subject: Re: Finding and replying to outstanding reply
>
> Tony, I did this in assembler many years ago for the ZEKE Automatic Reply
> feature. It has been too many years to remember all the details but
> basically you search the ORE (Operator Reply Element) chain to find the task
> you want and extract the reply id from the ORE.
>
> Chuck Arney
> Arney Computer Systems
>
>
> \-Original Message-
> From: IBM Mainframe Discussion List  On Behalf Of
> Tony Thigpen
> Sent: Tuesday, February 11, 2020 7:31 AM
> To: IBM-MAIN@LISTSERV.UA.EDU
> Subject: Finding and replying to outstanding reply
>
> We have an in-house written automated shutdown program that does everything
> but shutdown NPF. That is because NPF leaves an open reply message during
> start-up to which I must replay xx,STOP to make it shutdown. Within our
> shutdown program, I would like it to programmatically find the outstanding
> reply number so that it can issue the correct response.
>
> Can someone point me to any doc or examples that will help me get started on
> this?
>
> \--
> 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
>
-BEGIN PGP SIGNATURE-
Version: ProtonMail

wsBmBAEBCAAQBQJeVSnnCRBiYga9B/zq3QAKCRBiYga9B/zq3UADB/0dZhRp
UcRRDfmrpuMmNjoaaSQvP+ZtTqWJKOzVuFtHhluzRYjv22D4o6mNNow/k15D
OSEI8Nx3PowV5jAy2aPGM+LgXACwrVQiNU8lIxYNQ87xFhhH4cm+ivTAe/vi
kpZbye8szCz42/va67DWlkG72FV63eYB80DClQKgvjW0bGcbS7V+fQMPg9a7
kUTUSLPAdb9n+mhQtsx7dojZIMyeL4mssSOJZ3Wpo08aH/2A3PNAYuaCZB8K
lOLthtry4c/fL0WOKHdHh7NsXcStjb4VDROJJn7b4amWR2tOWmzzskiAYlIc
DzTJN6Nh7j8PsR2i/XcpI4s3FlL/0jeRR68g
=8JGu
-END PGP SIGNATURE-

--
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 information, services and offers, please visit our web site: 
http://www.klm.com. This e-mail and any attachment may contain confidential and 
privileged material intended for the addressee only. If you are not the 
addressee, you are notified that no part of the e-mail or any attachment may be 
disclosed, copied or distributed, and that any other action related to this 
e-mail or attachment is 

Re: Rexx parse using period as placeholder

2020-02-25 Thread Paul Gilmartin
On Wed, 26 Feb 2020 04:32:43 +, Seymour J Metz wrote:

>Absent a problem description, there's no way to tell whether that does what 
>the OP wants; does he want to treat the last word containing a period as 
>fn.fext, or the fourth word? Does he want to allow multiple periods in the 
>name, e.g., foo.bar.text? I could write a regex for any of these, but not 
>without knowing which, if any, of them is correct.
>
He said only, "I wanted to parse out the string 'word3' using the period as a 
place holder."
So, how about:

trace R
myVar = 'word1 word2 9.12 word3.ext'
Parse Var myVar . 'word3' +0 myVal +5 .

 2 *-* myVar = 'word1 word2 9.12 word3.ext'
   >=>   "word1 word2 9.12 word3.ext"
 3 *-* Parse Var myVar . 'word3' +0 myVal +5 .
   >V>   "word1 word2 9.12 word3.ext"
   >.>   "word1 word2 9.12 "
   >>>   "word3"
   >.>   ".ext"

-- gil

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


Re: Rexx parse using period as placeholder

2020-02-25 Thread Seymour J Metz
Absent a problem description, there's no way to tell whether that does what the 
OP wants; does he want to treat the last word containing a period as fn.fext, 
or the fourth word? Does he want to allow multiple periods in the name, e.g., 
foo.bar.text? I could write a regex for any of these, but not without knowing 
which, if any, of them is correct.


--
Shmuel (Seymour J.) Metz
http://mason.gmu.edu/~smetz3


From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on behalf of 
Paul Gilmartin [000433f07816-dmarc-requ...@listserv.ua.edu]
Sent: Tuesday, February 25, 2020 10:41 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Rexx parse using period as placeholder

On 2020-02-24, at 13:43:52, Ambros, Thomas wrote:
>
> 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.  
> ...
>
> myVar = 'word1 word2 9.12 word3.ext'
> Parse Var myVar . . . myVal '.' .
> ...
> Say 'myVal=' myVal
> ...
The simple answer to the elliptically stated problem is:
MyVal = 'word3'

A more general solution, using regex is:
556 $ echo 'word1 word2 9.12 word3.ext' | sed 's/.* \([^.]*\).*/\1/'
word3
557 $
This finds the last substring in the subject preceded by a space
and followed by a period.

Full disclosure, for Tony to gloat:
o It's easier to code than to review.
o I got it right on the third try.
o I haven't fuzz tested.

-- gil

--
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


Re: Rexx parse using period as placeholder

2020-02-25 Thread Paul Gilmartin
On 2020-02-24, at 13:43:52, Ambros, Thomas wrote:
> 
> 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.  
> ...
> 
> myVar = 'word1 word2 9.12 word3.ext'
> Parse Var myVar . . . myVal '.' .
> ...
> Say 'myVal=' myVal
> ...
The simple answer to the elliptically stated problem is:
MyVal = 'word3'

A more general solution, using regex is:
556 $ echo 'word1 word2 9.12 word3.ext' | sed 's/.* \([^.]*\).*/\1/'
word3
557 $ 
This finds the last substring in the subject preceded by a space
and followed by a period.

Full disclosure, for Tony to gloat:
o It's easier to code than to review.
o I got it right on the third try.
o I haven't fuzz tested.

-- gil

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


Re: CBT 120 revisions

2020-02-25 Thread Steve Horein
Thanks Sam -
Your efforts are appreciated!

On Tue, Feb 25, 2020 at 1:05 PM Sam Golob  wrote:

> Hi Folks,
>
>  Just to mention that I can revise my articles at any time.  It's a
> nice luxury to have.
>
>  It used to be, when I wrote for the magazine, that once I submitted
> an article to the editor, I had no further control or say, as to the
> content.  I didn't have a chance to correct any changes that the editor
> made, before publication.  (This was sometimes frustrating, because we
> systems programmers have in-jokes, which I hinted at in the beginning of
> many articles, and the editor removed most of them, not understanding
> the message that they conveyed.  They were the only parts of the article
> that were (to her) seemingly not "tech talk", and she told me "an editor
> has to edit".  I disagreed, but to no avail.)
>
>  In any case, I can now change an article if there is a mistake or
> an addition. (Yay.)
>
>  The last article was changed, because I was able to put more
> security into the program I was writing about, and I wanted the article
> to reflect the new change.
>
>  So it might pay to look at the ISPF statistics on the articles, and
> note if any were later.
>
>  Thanks for listening.
>
>  All the best of everything to all of you.
>
> Sincerely,Sam
>
>
> --
> 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


Re: Rexx parse using period as placeholder

2020-02-25 Thread Seymour J Metz
That will only work if there is no period after th fn.fext you're trying to 
parse. Parsing the result from the WORD BIF is a lot more bulletproof. But it's 
not my dog.


--
Shmuel (Seymour J.) Metz
http://mason.gmu.edu/~smetz3


From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on behalf of 
Wayne Bickerdike [wayn...@gmail.com]
Sent: Tuesday, February 25, 2020 5:29 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Rexx parse using period as placeholder

*Well, I wouldn't have used the same variable name as the test data, and
it's not clear whether the period in 9.12 is fortuitous. Your parse won't
work against, e.g., myVar = 'word1 word2 666 word3.ext'*

I didn't use WORD3 in my test data. As for a fortuitous period in the test
data, you work with what you are given.

My less efficient solution is to use the REVERSE function.

TRACE I

MYVAR = 'WORD1 WORD2 9.12 Z.EXT'

PARSE VALUE REVERSE(MYVAR) WITH EXT '.' WORD3 .

SAY REVERSE(WORD3)

PULL RESP

Eliminates the fortuitous period from the mix.

5 *-* MYVAR = 'WORD1 WORD2 9.12 Z.EXT'
  >L>   "WORD1 WORD2 9.12 Z.EXT"
7 *-* PARSE VALUE REVERSE(MYVAR) WITH EXT '.' WORD3 .
  >V>   "WORD1 WORD2 9.12 Z.EXT"
  >F>   "TXE.Z 21.9 2DROW 1DROW"
  >>>   "TXE"
  >>>   "Z"
  >.>   "21.9 2DROW 1DROW"
9 *-* SAY REVERSE(WORD3)
  >V>   "Z"
  >F>   "Z"


*On Wed, Feb 26, 2020 at 4:01 AM Seymour J Metz > wrote:*

>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> *The name is from CS, but the regexen in, e.g., Perl, Python, Ruby, can
> describe grammars that are not RE grammars in the CS sense. -- Shmuel
> (Seymour J.) Metz http://mason.gmu.edu/~smetz3
>  
> From: IBM Mainframe Discussion List  > on behalf of Paul Gilmartin
> <000433f07816-dmarc-requ...@listserv.ua.edu
> <000433f07816-dmarc-requ...@listserv.ua.edu>> Sent: Tuesday, February
> 25, 2020 11:51 AM To: IBM-MAIN@LISTSERV.UA.EDU 
> Subject: Re: Rexx parse using period as placeholder On Tue, 25 Feb 2020
> 08:14:33 -0500, Tony Thigpen wrote: >"regular expressions". What a misnamed
> item. It should be called "geek >readable only expressions". :-) > The name
> is adopted from formal language theory, clearly a geeky field. An
> alternative name is Chomsky type-3.
> https://secure-web.cisco.com/1yEhmTUBhK8QGgUQt09y0JsOgSqhJXPgIB7Wz4gZwgrTHdy8wAmwypFT0tCrS-JB2GheOTXaWsSeHJvgS2ofoCdp0m-1F0xEEQ1yXoQPhi6lbKSQQKlTBLZzS3TTM684q07ZikhoWrXEgICvTpo9FJcP95rTkyG3euEsTRYwDhlCXDQy_L5QL_LGkcmjt4G4xcTLA5yxPC3kMDpTFlLzZ31kiCv-pmGKv9GELh_RI2HeGU3cuxaX9kEFbeLzlK9eZvHT_rqfF1xTGp98og32FnHCCvu30HGdzhtB0IkRj8VaAbLArDRGTApSMFRK0kJHQ6mgZ9_m92aUcmsqyN6vlKLSyxEZtJKpHgap3ZEnOXvRq8yUe1zu3WkELf09COKLJTEn0ROC6L2B7BXUy1LsGE4Qj6Jwt3MuW_tao1O43pxGqN5xEtkLqIt86glUmt6Hu/https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FChomsky_hierarchy#Type-3_grammars
> 
> It refers not to the template but to the target.  I shudder to envision a
> formal grammer for UNIX regexen. On Tue, 25 Feb 2020 12:11:24 +,
> Seymour J Metz wrote: >What is happening is that everything in the template
> before the string match '.' >is a sub-pattern applied to the fragment to
> the left of the period. ... > Good description.  Does IBM use the term
> "sub-pattern" anywhere in its documentation? On Tue, 25 Feb 2020 13:24:09
> +, Seymour J Metz wrote: >While the Eunix RE syntax is grotesque, the
> regexen are incredibly useful. I just wish that >they had adopted the
> pattern syntax from SNOBOL or Wylbur. > There are two poles of UI design
> style: o Ergonomic or keystroke economy.  Frequently used   commands are
> single keystrokes with no lexical separator   between the command and its
> argument, as in the XEDIT   "/target" for a string search. o Orderly
> command grammar.   I suspect that TSO begat CLIST and linemod EDIT, which
> begat   ISPF commands.  Good in a script; terrible from the keyboard. A
> very simple regex pattern, / ' " /, was formerly available in ISPF EDIT
> only as F x'407d407f40'!  Now that ISPF has regexen, it can be the
> relatively transparent F R' ['] " '.  But only the hex can be used as a
> replacement. -- gil
> -- For
> IBM-MAIN subscribe / signoff / archive access instructions, send email to
> 

Re: Rexx parse using period as placeholder

2020-02-25 Thread Paul Gilmartin
On Wed, 26 Feb 2020 09:29:42 +1100, Wayne Bickerdike wrote:

>*Well, I wouldn't have used the same variable name as the test data, and
>it's not clear whether the period in 9.12 is fortuitous. Your parse won't
>work against, e.g., myVar = 'word1 word2 666 word3.ext'*
>
>I didn't use WORD3 in my test data. As for a fortuitous period in the test
>data, you work with what you are given.
>
>My less efficient solution is to use the REVERSE function.
>
>TRACE I
>MYVAR = 'WORD1 WORD2 9.12 Z.EXT'
>PARSE VALUE REVERSE(MYVAR) WITH EXT '.' WORD3 .
> 
What if the fortuitous period occurs after the expected solution:
MYVAR = 'WORD1 WORD2 9.12 Z.EXT Fred.Smith'

It's easier when you know the answer in advance.

It's harder when the statement of the problem is incomplete,
or needs to be inferred from a single example.

If he's looking for an MS-DOS filename, an Expert System could
handle it.  Or a regex.

-- gil

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


Re: Rexx parse using period as placeholder

2020-02-25 Thread Wayne Bickerdike
*Well, I wouldn't have used the same variable name as the test data, and
it's not clear whether the period in 9.12 is fortuitous. Your parse won't
work against, e.g., myVar = 'word1 word2 666 word3.ext'*

I didn't use WORD3 in my test data. As for a fortuitous period in the test
data, you work with what you are given.

My less efficient solution is to use the REVERSE function.

TRACE I

MYVAR = 'WORD1 WORD2 9.12 Z.EXT'

PARSE VALUE REVERSE(MYVAR) WITH EXT '.' WORD3 .

SAY REVERSE(WORD3)

PULL RESP

Eliminates the fortuitous period from the mix.

5 *-* MYVAR = 'WORD1 WORD2 9.12 Z.EXT'
  >L>   "WORD1 WORD2 9.12 Z.EXT"
7 *-* PARSE VALUE REVERSE(MYVAR) WITH EXT '.' WORD3 .
  >V>   "WORD1 WORD2 9.12 Z.EXT"
  >F>   "TXE.Z 21.9 2DROW 1DROW"
  >>>   "TXE"
  >>>   "Z"
  >.>   "21.9 2DROW 1DROW"
9 *-* SAY REVERSE(WORD3)
  >V>   "Z"
  >F>   "Z"


*On Wed, Feb 26, 2020 at 4:01 AM Seymour J Metz > wrote:*

>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> *The name is from CS, but the regexen in, e.g., Perl, Python, Ruby, can
> describe grammars that are not RE grammars in the CS sense. -- Shmuel
> (Seymour J.) Metz http://mason.gmu.edu/~smetz3
>  
> From: IBM Mainframe Discussion List  > on behalf of Paul Gilmartin
> <000433f07816-dmarc-requ...@listserv.ua.edu
> <000433f07816-dmarc-requ...@listserv.ua.edu>> Sent: Tuesday, February
> 25, 2020 11:51 AM To: IBM-MAIN@LISTSERV.UA.EDU 
> Subject: Re: Rexx parse using period as placeholder On Tue, 25 Feb 2020
> 08:14:33 -0500, Tony Thigpen wrote: >"regular expressions". What a misnamed
> item. It should be called "geek >readable only expressions". :-) > The name
> is adopted from formal language theory, clearly a geeky field. An
> alternative name is Chomsky type-3.
> https://secure-web.cisco.com/1yEhmTUBhK8QGgUQt09y0JsOgSqhJXPgIB7Wz4gZwgrTHdy8wAmwypFT0tCrS-JB2GheOTXaWsSeHJvgS2ofoCdp0m-1F0xEEQ1yXoQPhi6lbKSQQKlTBLZzS3TTM684q07ZikhoWrXEgICvTpo9FJcP95rTkyG3euEsTRYwDhlCXDQy_L5QL_LGkcmjt4G4xcTLA5yxPC3kMDpTFlLzZ31kiCv-pmGKv9GELh_RI2HeGU3cuxaX9kEFbeLzlK9eZvHT_rqfF1xTGp98og32FnHCCvu30HGdzhtB0IkRj8VaAbLArDRGTApSMFRK0kJHQ6mgZ9_m92aUcmsqyN6vlKLSyxEZtJKpHgap3ZEnOXvRq8yUe1zu3WkELf09COKLJTEn0ROC6L2B7BXUy1LsGE4Qj6Jwt3MuW_tao1O43pxGqN5xEtkLqIt86glUmt6Hu/https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FChomsky_hierarchy#Type-3_grammars
> 
> It refers not to the template but to the target.  I shudder to envision a
> formal grammer for UNIX regexen. On Tue, 25 Feb 2020 12:11:24 +,
> Seymour J Metz wrote: >What is happening is that everything in the template
> before the string match '.' >is a sub-pattern applied to the fragment to
> the left of the period. ... > Good description.  Does IBM use the term
> "sub-pattern" anywhere in its documentation? On Tue, 25 Feb 2020 13:24:09
> +, Seymour J Metz wrote: >While the Eunix RE syntax is grotesque, the
> regexen are incredibly useful. I just wish that >they had adopted the
> pattern syntax from SNOBOL or Wylbur. > There are two poles of UI design
> style: o Ergonomic or keystroke economy.  Frequently used   commands are
> single keystrokes with no lexical separator   between the command and its
> argument, as in the XEDIT   "/target" for a string search. o Orderly
> command grammar.   I suspect that TSO begat CLIST and linemod EDIT, which
> begat   ISPF commands.  Good in a script; terrible from the keyboard. A
> very simple regex pattern, / ' " /, was formerly available in ISPF EDIT
> only as F x'407d407f40'!  Now that ISPF has regexen, it can be the
> relatively transparent F R' ['] " '.  But only the hex can be used as a
> replacement. -- gil
> -- 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 *




*-- *

*Wayne V. Bickerdike*

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


Re: Convert a Metal C control block mapping to Assembler DSECT ?

2020-02-25 Thread Charles Mills
That is half the story. C++ also has new* cast operators that are "safer" than 
C's.

https://en.wikipedia.org/wiki/Type_conversion#C#_and_C++ 

*FSVO "new" -- since about 1989 or so.

Charles


-Original Message-
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf 
Of Adam Jacobvitz
Sent: Tuesday, February 25, 2020 10:08 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Convert a Metal C control block mapping to Assembler DSECT ?

i learned in CS class that static type casting is reliable in C since there are 
only 3 types (struct int float) that matter but unreliable in C++ due to the 
more sophisticated type system that allows for multiple inheritance.

So wouldn’t it be better to infer the type from the assembly macro (compare it 
to the stdlib implementation)? If it’s compiled it should be similar even if 
it’s not the same due to hoist style optimizations.

On Tue, Feb 25, 2020 at 9:34 AM, Seymour J Metz  wrote:

> Paul's "(type *) foo-> member" uses a cast, so he *has* specified what type 
> foo points to.
>
> --
> Shmuel (Seymour J.) Metz
> http://mason.gmu.edu/~smetz3
>
> 
> From: IBM Mainframe Discussion List  on behalf of 
> Charles Mills 
> Sent: Tuesday, February 25, 2020 12:26 PM
> To: IBM-MAIN@LISTSERV.UA.EDU
> Subject: Re: Convert a Metal C control block mapping to Assembler DSECT ?
>
> Huh? Void * specifically says "foo points to something but I won't say what" 
> so no, you can't reference members of something you have not specified. It is 
> equivalent to assembler FOO DS A. A of what? Who knows.
>
> If you say myStruct * foo then yes you can say foo->myStructMember. Or you 
> can say "at this moment foo points to myStruct and code (myStruct 
> *)foo->myStructMember
>
> Continuing the assembler analogy, myStruct * foo is roughly equivalent to 
> assembler L Rn,FOO/USING MYSTRUCT,Rn .
>
> Assembler is a terrible starting point, except considering what the problem 
> was. The problem was "we have a bunch of new C development and lots of tables 
> already defined in assembler." So the correct tool is an assembler to C 
> converter. By starting from the SYSADATA output as EDCDSECT does, you leave 
> messy problems like line continuation, syntax errors and macro expansion to 
> the assembler.
>
>> How can you generate the type in the declarator?
>
> EDCDSECT cannot. Generates lots of void *'s. Not the best approach, but it is 
> the best tool we have for user DSECT to C header conversion (not counting 
> Peter's tool, which is not available for user DSECTs). One is free to go back 
> and edit the void *'s.
>
> Charles
>
> -Original Message-
> From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On 
> Behalf Of Paul Gilmartin
> Sent: Monday, February 24, 2020 5:35 PM
> To: IBM-MAIN@LISTSERV.UA.EDU
> Subject: Re: Convert a Metal C control block mapping to Assembler DSECT ?
>
> On Tue, 25 Feb 2020 00:58:26 +, Seymour J Metz  wrote:
>
>>FSVO typed.
>>
>>void * foo
>>
> So I can't do "foo -> member", but must "(type *) foo-> member". Ugh!
>
> --
> 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

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


Re: Convert a Metal C control block mapping to Assembler DSECT ?

2020-02-25 Thread Seymour J Metz
The struc type covers a multitude of sins. I would consider C++ to more secure 
unless you use the stuff that is only in the language for C compatibility.


--
Shmuel (Seymour J.) Metz
http://mason.gmu.edu/~smetz3



From: IBM Mainframe Discussion List  on behalf of 
Adam Jacobvitz <02b29b762ea6-dmarc-requ...@listserv.ua.edu>
Sent: Tuesday, February 25, 2020 1:08 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Convert a Metal C control block mapping to Assembler DSECT ?

i learned in CS class that static type casting is reliable in C since there are 
only 3 types (struct int float) that matter but unreliable in C++ due to the 
more sophisticated type system that allows for multiple inheritance.

So wouldn’t it be better to infer the type from the assembly macro (compare it 
to the stdlib implementation)? If it’s compiled it should be similar even if 
it’s not the same due to hoist style optimizations.

On Tue, Feb 25, 2020 at 9:34 AM, Seymour J Metz  wrote:

> Paul's "(type *) foo-> member" uses a cast, so he *has* specified what type 
> foo points to.
>
> --
> Shmuel (Seymour J.) Metz
> http://mason.gmu.edu/~smetz3
>
> 
> From: IBM Mainframe Discussion List  on behalf of 
> Charles Mills 
> Sent: Tuesday, February 25, 2020 12:26 PM
> To: IBM-MAIN@LISTSERV.UA.EDU
> Subject: Re: Convert a Metal C control block mapping to Assembler DSECT ?
>
> Huh? Void * specifically says "foo points to something but I won't say what" 
> so no, you can't reference members of something you have not specified. It is 
> equivalent to assembler FOO DS A. A of what? Who knows.
>
> If you say myStruct * foo then yes you can say foo->myStructMember. Or you 
> can say "at this moment foo points to myStruct and code (myStruct 
> *)foo->myStructMember
>
> Continuing the assembler analogy, myStruct * foo is roughly equivalent to 
> assembler L Rn,FOO/USING MYSTRUCT,Rn .
>
> Assembler is a terrible starting point, except considering what the problem 
> was. The problem was "we have a bunch of new C development and lots of tables 
> already defined in assembler." So the correct tool is an assembler to C 
> converter. By starting from the SYSADATA output as EDCDSECT does, you leave 
> messy problems like line continuation, syntax errors and macro expansion to 
> the assembler.
>
>> How can you generate the type in the declarator?
>
> EDCDSECT cannot. Generates lots of void *'s. Not the best approach, but it is 
> the best tool we have for user DSECT to C header conversion (not counting 
> Peter's tool, which is not available for user DSECTs). One is free to go back 
> and edit the void *'s.
>
> Charles
>
> -Original Message-
> From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On 
> Behalf Of Paul Gilmartin
> Sent: Monday, February 24, 2020 5:35 PM
> To: IBM-MAIN@LISTSERV.UA.EDU
> Subject: Re: Convert a Metal C control block mapping to Assembler DSECT ?
>
> On Tue, 25 Feb 2020 00:58:26 +, Seymour J Metz  wrote:
>
>>FSVO typed.
>>
>>void * foo
>>
> So I can't do "foo -> member", but must "(type *) foo-> member". Ugh!
>
> --
> 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

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


CBT 120 revisions

2020-02-25 Thread Sam Golob

Hi Folks,

    Just to mention that I can revise my articles at any time.  It's a 
nice luxury to have.


    It used to be, when I wrote for the magazine, that once I submitted 
an article to the editor, I had no further control or say, as to the 
content.  I didn't have a chance to correct any changes that the editor 
made, before publication.  (This was sometimes frustrating, because we 
systems programmers have in-jokes, which I hinted at in the beginning of 
many articles, and the editor removed most of them, not understanding 
the message that they conveyed.  They were the only parts of the article 
that were (to her) seemingly not "tech talk", and she told me "an editor 
has to edit".  I disagreed, but to no avail.)


    In any case, I can now change an article if there is a mistake or 
an addition. (Yay.)


    The last article was changed, because I was able to put more 
security into the program I was writing about, and I wanted the article 
to reflect the new change.


    So it might pay to look at the ISPF statistics on the articles, and 
note if any were later.


    Thanks for listening.

    All the best of everything to all of you.

Sincerely,    Sam


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


Re: Convert a Metal C control block mapping to Assembler DSECT ?

2020-02-25 Thread Paul Gilmartin
On Tue, 25 Feb 2020 10:33:36 -0800, Charles Mills wrote:
>
>EDCDSECT does the world's ugliest job on assembler ORG and things like FL0 but 
>it ends up technically correct. Ugly as sin, but the layouts are right.
> 
Yup.

>struct tiot {
>  unsigned char  tiocnjob[8];
> /* - JOB NAME */
>  struct {
>struct {
>  unsigned char  _tiocpstn[8];
> /* - 8-BYTE PROC STEP NAME FOR PROCS @P1A */
>  } tiocstpn;
>unsigned char  _tiocjstn[8];
>   /* - 8-BYTE JOBSTEP NAME FOR PROCS   @P1A */
>} tiocstep;
> 
Why "*unsigned* char"  I know that "char *", "unsigned char *", and "signed 
char *"
are pairwise incompatible, per ANSI, and IBM's C is the only processor I know 
that
enforces this.  I once needed to correct a shareware author on a transgression.
(IIRC, he used a cast as an L-value.)  But I'd expect a z-centric product to 
rely on
the native unqualified construct.  Greater portability?


On Tue, 25 Feb 2020 10:29:39 -0800, Charles Mills wrote:

>And that's why it works (but does not work without that cast), or as Gil put
>it "So I can't do "foo -> member", but must "(type *) foo-> member".
>
That appears to be Charles agreeing with Shmuel's uncharacteristically
agreeing with Charles's agreeing with me.

+1.  Me, too.

-- gil

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


Re: Convert a Metal C control block mapping to Assembler DSECT ?

2020-02-25 Thread Charles Mills
> What about Assembler ORG to C "union"?

EDCDSECT does the world's ugliest job on assembler ORG and things like FL0 but 
it ends up technically correct. Ugly as sin, but the layouts are right.

struct tiot {
  unsigned char  tiocnjob[8];
 /* - JOB NAME */
  struct {
struct {
  unsigned char  _tiocpstn[8];
 /* - 8-BYTE PROC STEP NAME FOR PROCS @P1A */
  } tiocstpn;
unsigned char  _tiocjstn[8];
   /* - 8-BYTE JOBSTEP NAME FOR PROCS   @P1A */
} tiocstep;

Charles


-Original Message-
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf 
Of Paul Gilmartin
Sent: Tuesday, February 25, 2020 9:47 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Convert a Metal C control block mapping to Assembler DSECT ?

On Tue, 25 Feb 2020 09:26:45 -0800, Charles Mills wrote:
>
>Continuing the assembler analogy, myStruct * foo is roughly equivalent to 
>assembler L Rn,FOO/USING MYSTRUCT,Rn .
> 
Pascal's WITH statement allowed brief member references without
the requirement for unique names.

>Assembler is a terrible starting point, except considering what the problem 
>was. The problem was "we have a bunch of new C development and lots of tables 
>already defined in assembler." 
>
Like, "What's the best way from London to San Francisco if you're
already in New York?"

(Old punchline:  "If'n I wuz you I wouldn't of started from here!")

What about Assembler ORG to C "union"?

-- gil

--
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


Re: Convert a Metal C control block mapping to Assembler DSECT ?

2020-02-25 Thread Charles Mills
And that's why it works (but does not work without that cast), or as Gil put
it "So I can't do "foo -> member", but must "(type *) foo-> member". 

Charles


-Original Message-
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On
Behalf Of Seymour J Metz
Sent: Tuesday, February 25, 2020 9:34 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Convert a Metal C control block mapping to Assembler DSECT ?

Paul's "(type *) foo-> member" uses a cast, so he *has* specified what type
foo points to. 


--
Shmuel (Seymour J.) Metz
http://mason.gmu.edu/~smetz3



From: IBM Mainframe Discussion List  on behalf of
Charles Mills 
Sent: Tuesday, February 25, 2020 12:26 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Convert a Metal C control block mapping to Assembler DSECT ?

Huh? Void * specifically says "foo points to something but I won't say what"
so no, you can't reference members of something you have not specified. It
is equivalent to assembler FOO DS A. A of what? Who knows.

If you say myStruct * foo then yes you can say foo->myStructMember. Or you
can say "at this moment foo points to myStruct and code (myStruct
*)foo->myStructMember

Continuing the assembler analogy, myStruct * foo is roughly equivalent to
assembler L Rn,FOO/USING MYSTRUCT,Rn .

Assembler is a terrible starting point, except considering what the problem
was. The problem was "we have a bunch of new C development and lots of
tables already defined in assembler." So the correct tool is an assembler to
C converter. By starting from the SYSADATA output as EDCDSECT does, you
leave messy problems like line continuation, syntax errors and macro
expansion to the assembler.

> How can you generate the type in the declarator?

EDCDSECT cannot. Generates lots of void *'s. Not the best approach, but it
is the best tool we have for user DSECT to C header conversion (not counting
Peter's tool, which is not available for user DSECTs). One is free to go
back and edit the void *'s.

Charles


-Original Message-
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On
Behalf Of Paul Gilmartin
Sent: Monday, February 24, 2020 5:35 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Convert a Metal C control block mapping to Assembler DSECT ?

On Tue, 25 Feb 2020 00:58:26 +, Seymour J Metz  wrote:

>FSVO typed.
>
>void * foo
>
So I can't do "foo -> member", but must "(type *) foo-> member".  Ugh!

--
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


Re: Convert a Metal C control block mapping to Assembler DSECT ?

2020-02-25 Thread Farley, Peter x23353
Re: "One is free to go back and edit the void *'s", alternatively one can 
post-process the EDCDSECT output with a pattern-matching script (awk, perl, 
etc.) to more-or-less generically adjust all the things EDCDSECT can't properly 
resolve.  BTDT.  Interesting exercise.

Peter

-Original Message-
From: IBM Mainframe Discussion List  On Behalf Of 
Charles Mills
Sent: Tuesday, February 25, 2020 12:27 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Convert a Metal C control block mapping to Assembler DSECT ?

Huh? Void * specifically says "foo points to something but I won't say what" so 
no, you can't reference members of something you have not specified. It is 
equivalent to assembler FOO DS A. A of what? Who knows.

If you say myStruct * foo then yes you can say foo->myStructMember. Or you can 
say "at this moment foo points to myStruct and code (myStruct 
*)foo->myStructMember

Continuing the assembler analogy, myStruct * foo is roughly equivalent to 
assembler L Rn,FOO/USING MYSTRUCT,Rn .

Assembler is a terrible starting point, except considering what the problem 
was. The problem was "we have a bunch of new C development and lots of tables 
already defined in assembler." So the correct tool is an assembler to C 
converter. By starting from the SYSADATA output as EDCDSECT does, you leave 
messy problems like line continuation, syntax errors and macro expansion to the 
assembler.

> How can you generate the type in the declarator?

EDCDSECT cannot. Generates lots of void *'s. Not the best approach, but it is 
the best tool we have for user DSECT to C header conversion (not counting 
Peter's tool, which is not available for user DSECTs). One is free to go back 
and edit the void *'s. 

Charles


-Original Message-
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf 
Of Paul Gilmartin
Sent: Monday, February 24, 2020 5:35 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Convert a Metal C control block mapping to Assembler DSECT ?

On Tue, 25 Feb 2020 00:58:26 +, Seymour J Metz  wrote:

>FSVO typed.
>
>void * foo
>
So I can't do "foo -> member", but must "(type *) foo-> member".  Ugh!

--

This message and any attachments are intended only for the use of the addressee 
and may contain information that is privileged and confidential. If the reader 
of the message is not the intended recipient or an authorized representative of 
the intended recipient, you are hereby notified that any dissemination of this 
communication is strictly prohibited. If you have received this communication 
in error, please notify us immediately by e-mail and delete the message and any 
attachments from your system.


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


Re: Convert a Metal C control block mapping to Assembler DSECT ?

2020-02-25 Thread Adam Jacobvitz
i learned in CS class that static type casting is reliable in C since there are 
only 3 types (struct int float) that matter but unreliable in C++ due to the 
more sophisticated type system that allows for multiple inheritance.

So wouldn’t it be better to infer the type from the assembly macro (compare it 
to the stdlib implementation)? If it’s compiled it should be similar even if 
it’s not the same due to hoist style optimizations.

On Tue, Feb 25, 2020 at 9:34 AM, Seymour J Metz  wrote:

> Paul's "(type *) foo-> member" uses a cast, so he *has* specified what type 
> foo points to.
>
> --
> Shmuel (Seymour J.) Metz
> http://mason.gmu.edu/~smetz3
>
> 
> From: IBM Mainframe Discussion List  on behalf of 
> Charles Mills 
> Sent: Tuesday, February 25, 2020 12:26 PM
> To: IBM-MAIN@LISTSERV.UA.EDU
> Subject: Re: Convert a Metal C control block mapping to Assembler DSECT ?
>
> Huh? Void * specifically says "foo points to something but I won't say what" 
> so no, you can't reference members of something you have not specified. It is 
> equivalent to assembler FOO DS A. A of what? Who knows.
>
> If you say myStruct * foo then yes you can say foo->myStructMember. Or you 
> can say "at this moment foo points to myStruct and code (myStruct 
> *)foo->myStructMember
>
> Continuing the assembler analogy, myStruct * foo is roughly equivalent to 
> assembler L Rn,FOO/USING MYSTRUCT,Rn .
>
> Assembler is a terrible starting point, except considering what the problem 
> was. The problem was "we have a bunch of new C development and lots of tables 
> already defined in assembler." So the correct tool is an assembler to C 
> converter. By starting from the SYSADATA output as EDCDSECT does, you leave 
> messy problems like line continuation, syntax errors and macro expansion to 
> the assembler.
>
>> How can you generate the type in the declarator?
>
> EDCDSECT cannot. Generates lots of void *'s. Not the best approach, but it is 
> the best tool we have for user DSECT to C header conversion (not counting 
> Peter's tool, which is not available for user DSECTs). One is free to go back 
> and edit the void *'s.
>
> Charles
>
> -Original Message-
> From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On 
> Behalf Of Paul Gilmartin
> Sent: Monday, February 24, 2020 5:35 PM
> To: IBM-MAIN@LISTSERV.UA.EDU
> Subject: Re: Convert a Metal C control block mapping to Assembler DSECT ?
>
> On Tue, 25 Feb 2020 00:58:26 +, Seymour J Metz  wrote:
>
>>FSVO typed.
>>
>>void * foo
>>
> So I can't do "foo -> member", but must "(type *) foo-> member". Ugh!
>
> --
> 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


Re: Convert a Metal C control block mapping to Assembler DSECT ?

2020-02-25 Thread Paul Gilmartin
On Tue, 25 Feb 2020 09:26:45 -0800, Charles Mills wrote:
>
>Continuing the assembler analogy, myStruct * foo is roughly equivalent to 
>assembler L Rn,FOO/USING MYSTRUCT,Rn .
> 
Pascal's WITH statement allowed brief member references without
the requirement for unique names.

>Assembler is a terrible starting point, except considering what the problem 
>was. The problem was "we have a bunch of new C development and lots of tables 
>already defined in assembler." 
>
Like, "What's the best way from London to San Francisco if you're
already in New York?"

(Old punchline:  "If'n I wuz you I wouldn't of started from here!")

What about Assembler ORG to C "union"?

-- gil

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


Re: Convert a Metal C control block mapping to Assembler DSECT ?

2020-02-25 Thread Seymour J Metz
Paul's "(type *) foo-> member" uses a cast, so he *has* specified what type foo 
points to. 


--
Shmuel (Seymour J.) Metz
http://mason.gmu.edu/~smetz3



From: IBM Mainframe Discussion List  on behalf of 
Charles Mills 
Sent: Tuesday, February 25, 2020 12:26 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Convert a Metal C control block mapping to Assembler DSECT ?

Huh? Void * specifically says "foo points to something but I won't say what" so 
no, you can't reference members of something you have not specified. It is 
equivalent to assembler FOO DS A. A of what? Who knows.

If you say myStruct * foo then yes you can say foo->myStructMember. Or you can 
say "at this moment foo points to myStruct and code (myStruct 
*)foo->myStructMember

Continuing the assembler analogy, myStruct * foo is roughly equivalent to 
assembler L Rn,FOO/USING MYSTRUCT,Rn .

Assembler is a terrible starting point, except considering what the problem 
was. The problem was "we have a bunch of new C development and lots of tables 
already defined in assembler." So the correct tool is an assembler to C 
converter. By starting from the SYSADATA output as EDCDSECT does, you leave 
messy problems like line continuation, syntax errors and macro expansion to the 
assembler.

> How can you generate the type in the declarator?

EDCDSECT cannot. Generates lots of void *'s. Not the best approach, but it is 
the best tool we have for user DSECT to C header conversion (not counting 
Peter's tool, which is not available for user DSECTs). One is free to go back 
and edit the void *'s.

Charles


-Original Message-
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf 
Of Paul Gilmartin
Sent: Monday, February 24, 2020 5:35 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Convert a Metal C control block mapping to Assembler DSECT ?

On Tue, 25 Feb 2020 00:58:26 +, Seymour J Metz  wrote:

>FSVO typed.
>
>void * foo
>
So I can't do "foo -> member", but must "(type *) foo-> member".  Ugh!

--
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


Re: Convert a Metal C control block mapping to Assembler DSECT ?

2020-02-25 Thread Charles Mills
Huh? Void * specifically says "foo points to something but I won't say what" so 
no, you can't reference members of something you have not specified. It is 
equivalent to assembler FOO DS A. A of what? Who knows.

If you say myStruct * foo then yes you can say foo->myStructMember. Or you can 
say "at this moment foo points to myStruct and code (myStruct 
*)foo->myStructMember

Continuing the assembler analogy, myStruct * foo is roughly equivalent to 
assembler L Rn,FOO/USING MYSTRUCT,Rn .

Assembler is a terrible starting point, except considering what the problem 
was. The problem was "we have a bunch of new C development and lots of tables 
already defined in assembler." So the correct tool is an assembler to C 
converter. By starting from the SYSADATA output as EDCDSECT does, you leave 
messy problems like line continuation, syntax errors and macro expansion to the 
assembler.

> How can you generate the type in the declarator?

EDCDSECT cannot. Generates lots of void *'s. Not the best approach, but it is 
the best tool we have for user DSECT to C header conversion (not counting 
Peter's tool, which is not available for user DSECTs). One is free to go back 
and edit the void *'s. 

Charles


-Original Message-
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf 
Of Paul Gilmartin
Sent: Monday, February 24, 2020 5:35 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Convert a Metal C control block mapping to Assembler DSECT ?

On Tue, 25 Feb 2020 00:58:26 +, Seymour J Metz  wrote:

>FSVO typed.
>
>void * foo
>
So I can't do "foo -> member", but must "(type *) foo-> member".  Ugh!

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


Re: Rexx parse using period as placeholder

2020-02-25 Thread Seymour J Metz
The name is from CS, but the regexen in, e.g., Perl, Python, Ruby, can describe 
grammars that are not RE grammars in the CS sense.


--
Shmuel (Seymour J.) Metz
http://mason.gmu.edu/~smetz3



From: IBM Mainframe Discussion List  on behalf of 
Paul Gilmartin <000433f07816-dmarc-requ...@listserv.ua.edu>
Sent: Tuesday, February 25, 2020 11:51 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Rexx parse using period as placeholder

On Tue, 25 Feb 2020 08:14:33 -0500, Tony Thigpen wrote:

>"regular expressions". What a misnamed item. It should be called "geek
>readable only expressions". :-)
>
The name is adopted from formal language theory, clearly a geeky field.
An alternative name is Chomsky type-3.

https://secure-web.cisco.com/1yEhmTUBhK8QGgUQt09y0JsOgSqhJXPgIB7Wz4gZwgrTHdy8wAmwypFT0tCrS-JB2GheOTXaWsSeHJvgS2ofoCdp0m-1F0xEEQ1yXoQPhi6lbKSQQKlTBLZzS3TTM684q07ZikhoWrXEgICvTpo9FJcP95rTkyG3euEsTRYwDhlCXDQy_L5QL_LGkcmjt4G4xcTLA5yxPC3kMDpTFlLzZ31kiCv-pmGKv9GELh_RI2HeGU3cuxaX9kEFbeLzlK9eZvHT_rqfF1xTGp98og32FnHCCvu30HGdzhtB0IkRj8VaAbLArDRGTApSMFRK0kJHQ6mgZ9_m92aUcmsqyN6vlKLSyxEZtJKpHgap3ZEnOXvRq8yUe1zu3WkELf09COKLJTEn0ROC6L2B7BXUy1LsGE4Qj6Jwt3MuW_tao1O43pxGqN5xEtkLqIt86glUmt6Hu/https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FChomsky_hierarchy#Type-3_grammars

It refers not to the template but to the target.  I shudder to envision a
formal grammer for UNIX regexen.


On Tue, 25 Feb 2020 12:11:24 +, Seymour J Metz wrote:

>What is happening is that everything in the template before the string match 
>'.'
>is a sub-pattern applied to the fragment to the left of the period. ...
>
Good description.  Does IBM use the term "sub-pattern" anywhere in its 
documentation?


On Tue, 25 Feb 2020 13:24:09 +, Seymour J Metz wrote:

>While the Eunix RE syntax is grotesque, the regexen are incredibly useful. I 
>just wish that
>they had adopted the pattern syntax from SNOBOL or Wylbur.
>
There are two poles of UI design style:
o Ergonomic or keystroke economy.  Frequently used
  commands are single keystrokes with no lexical separator
  between the command and its argument, as in the XEDIT
  "/target" for a string search.

o Orderly command grammar.
  I suspect that TSO begat CLIST and linemod EDIT, which begat
  ISPF commands.  Good in a script; terrible from the keyboard.

A very simple regex pattern, / ' " /, was formerly available in ISPF
EDIT only as F x'407d407f40'!  Now that ISPF has regexen, it can
be the relatively transparent F R' ['] " '.  But only the hex can be
used as a replacement.

-- gil

--
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


Re: Old joke realism

2020-02-25 Thread Seymour J Metz
The BOFH and User Friendly cartoons are funny but like nothing I've ever seen 
IRL. Dilbert, OTOH, leaves me with an eerie sense of familiarity. 


--
Shmuel (Seymour J.) Metz
http://mason.gmu.edu/~smetz3



From: IBM Mainframe Discussion List  on behalf of 
Adam Jacobvitz <02b29b762ea6-dmarc-requ...@listserv.ua.edu>
Sent: Tuesday, February 25, 2020 9:06 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Old joke realism

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

I know this isn't mainframe related, but how realistic are the old computer 
jokes? e g.

http://secure-web.cisco.com/1f2K4lkajzTKLo5c1rk3zVrtIrQsDcMOwmwySvMKhcI4rmltQY6WMVzc61COVPYp7_qm5pSiEYAjhjjxS0MhgSFKfvoloKx_40_s7pg1xzIpHlZkC6l64qBm1yuAU_HvaIhc0QgbpNj3ZRQVzi5c4S55yGnzeym0tpPp2CNcnHa824kWiikxJBxhqeSWOiApDgPOZ3IjmGk-a2HNbB5V-C7jmkU4WJjiGYgirgkQDT6dIAqsG6dVmPhp2OstOQ3lozL0wKUZnO7Fzl7tX93b8qTftq3cgJysQY3kaHTYj90SLgCW9BWab-PgMfcdQYCfM1fw5fEbNGqt7ylCJsJNafhwlhEJJR7ZaKP96liQ4u6LOgGDLTVrxyILYhlWGWZS0Bcm98oHKIjk7o4WqV_fJwx6vbXRGDENHyA3xt6JF3lJHn11tbvLz53QQXY9pXttG/http%3A%2F%2Fbofh.bjash.com



Sent from ProtonMail mobile



\ Original Message 
On Feb 25, 2020, 5:58 AM, Seymour J Metz < sme...@gmu.edu> wrote:

>
>
>
> I may have done that in the old days, but isn't everything interesting in the 
> CONSOLE address space these days?
>
>
> \--
> Shmuel (Seymour J.) Metz
> http://mason.gmu.edu/~smetz3
>
> \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_
> From: IBM Mainframe Discussion List \[IBM-MAIN@LISTSERV.UA.EDU\] on behalf of 
> Chuck Arney \[ch...@arneycomputer.com\]
> Sent: Tuesday, February 25, 2020 8:55 AM
> To: IBM-MAIN@LISTSERV.UA.EDU
> Subject: Re: Finding and replying to outstanding reply
>
> Tony, I did this in assembler many years ago for the ZEKE Automatic Reply
> feature. It has been too many years to remember all the details but
> basically you search the ORE (Operator Reply Element) chain to find the task
> you want and extract the reply id from the ORE.
>
> Chuck Arney
> Arney Computer Systems
>
>
> \-Original Message-
> From: IBM Mainframe Discussion List  On Behalf Of
> Tony Thigpen
> Sent: Tuesday, February 11, 2020 7:31 AM
> To: IBM-MAIN@LISTSERV.UA.EDU
> Subject: Finding and replying to outstanding reply
>
> We have an in-house written automated shutdown program that does everything
> but shutdown NPF. That is because NPF leaves an open reply message during
> start-up to which I must replay xx,STOP to make it shutdown. Within our
> shutdown program, I would like it to programmatically find the outstanding
> reply number so that it can issue the correct response.
>
> Can someone point me to any doc or examples that will help me get started on
> this?
>
> \--
> 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
>
-BEGIN PGP SIGNATURE-
Version: ProtonMail

wsBmBAEBCAAQBQJeVSnnCRBiYga9B/zq3QAKCRBiYga9B/zq3UADB/0dZhRp
UcRRDfmrpuMmNjoaaSQvP+ZtTqWJKOzVuFtHhluzRYjv22D4o6mNNow/k15D
OSEI8Nx3PowV5jAy2aPGM+LgXACwrVQiNU8lIxYNQ87xFhhH4cm+ivTAe/vi
kpZbye8szCz42/va67DWlkG72FV63eYB80DClQKgvjW0bGcbS7V+fQMPg9a7
kUTUSLPAdb9n+mhQtsx7dojZIMyeL4mssSOJZ3Wpo08aH/2A3PNAYuaCZB8K
lOLthtry4c/fL0WOKHdHh7NsXcStjb4VDROJJn7b4amWR2tOWmzzskiAYlIc
DzTJN6Nh7j8PsR2i/XcpI4s3FlL/0jeRR68g
=8JGu
-END PGP SIGNATURE-

--
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


Re: Rexx parse using period as placeholder

2020-02-25 Thread Paul Gilmartin
On Tue, 25 Feb 2020 08:14:33 -0500, Tony Thigpen wrote:

>"regular expressions". What a misnamed item. It should be called "geek 
>readable only expressions". :-)
>
The name is adopted from formal language theory, clearly a geeky field.
An alternative name is Chomsky type-3.
https://en.wikipedia.org/wiki/Chomsky_hierarchy#Type-3_grammars

It refers not to the template but to the target.  I shudder to envision a
formal grammer for UNIX regexen.


On Tue, 25 Feb 2020 12:11:24 +, Seymour J Metz wrote:

>What is happening is that everything in the template before the string match 
>'.' 
>is a sub-pattern applied to the fragment to the left of the period. ...
>
Good description.  Does IBM use the term "sub-pattern" anywhere in its 
documentation?


On Tue, 25 Feb 2020 13:24:09 +, Seymour J Metz wrote:

>While the Eunix RE syntax is grotesque, the regexen are incredibly useful. I 
>just wish that 
>they had adopted the pattern syntax from SNOBOL or Wylbur.
>
There are two poles of UI design style:
o Ergonomic or keystroke economy.  Frequently used
  commands are single keystrokes with no lexical separator
  between the command and its argument, as in the XEDIT
  "/target" for a string search.

o Orderly command grammar.
  I suspect that TSO begat CLIST and linemod EDIT, which begat
  ISPF commands.  Good in a script; terrible from the keyboard.

A very simple regex pattern, / ' " /, was formerly available in ISPF
EDIT only as F x'407d407f40'!  Now that ISPF has regexen, it can
be the relatively transparent F R' ['] " '.  But only the hex can be
used as a replacement.

-- gil

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


Re: Rexx parse using period as placeholder

2020-02-25 Thread Seymour J Metz
What is a platform? Perl Regexen aren't the same as Python regexen, but Perl 
regexen are the same on every platform, the Python refexen are the same on 
every platform, etc.


--
Shmuel (Seymour J.) Metz
http://mason.gmu.edu/~smetz3



From: IBM Mainframe Discussion List  on behalf of 
zMan 
Sent: Tuesday, February 25, 2020 10:57 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Rexx parse using period as placeholder

True. But RE aren't even standardized across platforms, making them very
difficult to use in multi-platform product code.

On Tue, Feb 25, 2020 at 10:34 AM David Crayford  wrote:

> On 2020-02-25 9:14 PM, Tony Thigpen wrote:
> > "regular expressions". What a misnamed item. It should be called "geek
> > readable only expressions". :-)
> >
> Not when your learn how to use them! REXX parse templates are very
> powerful but can't come close to RE for lots of uses cases.
>

--
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


Re: Rexx parse using period as placeholder

2020-02-25 Thread zMan
True. But RE aren't even standardized across platforms, making them very
difficult to use in multi-platform product code.

On Tue, Feb 25, 2020 at 10:34 AM David Crayford  wrote:

> On 2020-02-25 9:14 PM, Tony Thigpen wrote:
> > "regular expressions". What a misnamed item. It should be called "geek
> > readable only expressions". :-)
> >
> Not when your learn how to use them! REXX parse templates are very
> powerful but can't come close to RE for lots of uses cases.
>

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


Re: Rexx parse using period as placeholder

2020-02-25 Thread David Crayford

On 2020-02-25 9:14 PM, Tony Thigpen wrote:
"regular expressions". What a misnamed item. It should be called "geek 
readable only expressions". :-)


Not when your learn how to use them! REXX parse templates are very 
powerful but can't come close to RE for lots of uses cases.



Tony Thigpen

David Crayford wrote on 2/25/20 8:03 AM:
What you really need is regular expressions ;) 
https://github.com/daveyc/RTK


On 2020-02-25 7:47 PM, Ambros, Thomas wrote:
In my example, I'm trying to ignore the first three blank-delimited 
strings and parse the character string preceding the embedded period 
in the fourth.  That's what surprised me - Parse considers the third 
value to be "9" and not the blank delimited string "9.12".  Subword, 
on the other hand, hews to the definition of blank delimited word 
with no regard to the embedded period in the character string "9.12".


That's where the surprise came in, I was not aware that Parse would 
break the string at any delimiter other than a blank when I coded it 
as this:


myVar = 'word1 word2 9.12 word3.ext'
Parse Var myVar . . . myVal '.' .

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

-Original Message-
From: IBM Mainframe Discussion List  On 
Behalf Of Wayne Bickerdike

Sent: Monday, February 24, 2020 23:04
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Rexx parse using period as placeholder



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



Interesting. Seymours example came back with a blank.

I used PARSE VALUE MYVAR WITH . . . '.' . WORD3 '.' EXT .



On Tue, Feb 25, 2020 at 10:46 AM Paul Gilmartin < 
000433f07816-dmarc-requ...@listserv.ua.edu> wrote:



On Mon, 24 Feb 2020 18:08:48 -0500, Tony Thigpen wrote:


You have "passed" your first period before your "'.'" in the parse
statement is actually interpreted.

For your data example:
myVar = 'word1 word2 9.12 word3.ext'
The correct parse is:
Parse Value myVar with . . myVal2 '.' .

Each period, or var name, in the parse "eats" one blank delimited 
word.

For example:
myvar = 'a b c d e f g'
parse var myvar . . 'e' next .
will yield next = 'f', but

parse var myvar . . . . . 'e' next .
will yield next = ''


Ummm.  No.  I believe next = 'f':
parse value 'a b c d e f g' with . . . . . 'e' next .; say next"
    >.>   "a"
    >.>   "b"
    >.>   "c"
    >.>   "d"
    >.>   ""
    >>>   "f"
    >.>   "g"
    >V>   "f"
f

-- gil




For your data, I would first parse the words, then parse each var 
for '.'.


Now, if there is really a special character (or string) that you need
to identify, it is best to parse the before and after data, then
parse each section. This is how you should handle finding options in
a parm string passed to a REXX script:

parse value arg with parms '(' options ')' localopts parse var parms
parm1 parm2 parm3 parm4 parm5 .
parse var options opt1 opt2 opt3 opt4 opt5 opt6 .
parse var localopts lopt1 lopt2 lopt3 lopt4 lopt5 .

For the above to work, the use of ')' *requires* a previous '('.

example: arg = aaa bbb ccc ')' ddd eee
  parse value arg with parms '(' options ')' localopts

will yield:
parms = "aaa bbb ccc ) ddd eee"
options = ''
localopts = ''

If this might happen, you would need:
parse value arg with part1 ')' localopts parse var part1 parms ')'
options parse var parms parm1 parm2 parm3 parm4 parm5 .
parse var options opt1 opt2 opt3 opt4 opt5 opt6 .
parse var localopts lopt1 lopt2 lopt3 lopt4 lopt5 .



Tony Thigpen

Seymour J Metz wrote on 2/24/20 5:50 PM:

Isn't that the same, except for the choice of variable names?

For the type of source string that you're parsing, I'd probably
break

it into words with a simple parse and then use a parse var foo bar '.'
baz


--
Shmuel (Seymour J.) Metz
https://urldefense.proofpoint.com/v2/url?u=http-3A__mason.gmu.edu_-
7Esmetz3=DwIFaQ=Y1KkN7JyAPjrAJTUCirS0fy9vQY8xn4_Oh4EEEpbXx4=7
ds2LAJ99_WyGG6a4BwzaJ7R0vee6JgTc4Txes6yEew=NpaUBaXFEzfPLAebMs9B1G
aKHWOUHAwXKgRJtkaT1o8=TtG3xhRqfA6YTnsgOYLWh64rPyd9IJCBiSKWMRHbQBI
=


From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on

behalf of Ambros, Thomas
[010f77c934b1-dmarc-requ...@listserv.ua.edu]

Sent: Monday, February 24, 2020 4:26 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Rexx parse using period as placeholder

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 

Re: Rexx parse using period as placeholder

2020-02-25 Thread David Crayford
ECMAScript RE is almost compatible with PCRE and the API on the CBT tape 
isn't a nice REXX command processor like my RTK package.


On 2020-02-25 9:21 PM, Seymour J Metz wrote:

PCRE (see, e.g., CBTTAPE File # 884 PCRE (Perl-Compatible Regular Expressions) 
10.2 z/OS  at http://www.cbttape.org/ftp/cbt/CBT884.zip)



--
Shmuel (Seymour J.) Metz
http://mason.gmu.edu/~smetz3


From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on behalf of 
David Crayford [dcrayf...@gmail.com]
Sent: Tuesday, February 25, 2020 8:03 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Rexx parse using period as placeholder

What you really need is regular expressions ;) 
https://secure-web.cisco.com/11kckduHl22o_XPHz3bHsGS9pO3TtRrQjkW2q4fA647aOOPq-PV-hOv5D1BjuBvV3VzzjyjtjmonHrTxLcXhbmaOiuJfc-9NCfa3AVFsn21QUBxag_AeXqKDt_87ENc6Oh9f9EbnHEohSceInfKIYTSodsysRn1ZFEQk723E6-ZOx9W6mceL4h1sFtwznBhnzuyywKHQuhAwitxNjUuHL0coSGh34fly7wc4zrNKrGA_ZYsjx0F0hes5tx1SQqdvWtMdO4x34nWu2sG-3OuV8CRbBAZ9LgmyCm0A-BmjQT9ZQhdrMjTPAjhTAr5iDnb77GHl6UmUGrRborgt6AeremaTz3N7gutJDhBriKp3CAkMCaFfK1xGNtwPnWTyx9fvE/https%3A%2F%2Fgithub.com%2Fdaveyc%2FRTK

On 2020-02-25 7:47 PM, Ambros, Thomas wrote:

In my example, I'm trying to ignore the first three blank-delimited strings and parse the character string 
preceding the embedded period in the fourth.  That's what surprised me - Parse considers the third value to 
be "9" and not the blank delimited string "9.12".  Subword, on the other hand, hews to 
the definition of blank delimited word with no regard to the embedded period in the character string 
"9.12".

That's where the surprise came in, I was not aware that Parse would break the 
string at any delimiter other than a blank when I coded it as this:

myVar = 'word1 word2 9.12 word3.ext'
Parse Var myVar . . . myVal '.' .

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

-Original Message-
From: IBM Mainframe Discussion List  On Behalf Of 
Wayne Bickerdike
Sent: Monday, February 24, 2020 23:04
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Rexx parse using period as placeholder



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


Interesting. Seymours example came back with a blank.

I used PARSE VALUE MYVAR WITH . . . '.' . WORD3 '.' EXT .



On Tue, Feb 25, 2020 at 10:46 AM Paul Gilmartin < 
000433f07816-dmarc-requ...@listserv.ua.edu> wrote:


On Mon, 24 Feb 2020 18:08:48 -0500, Tony Thigpen wrote:


You have "passed" your first period before your "'.'" in the parse
statement is actually interpreted.

For your data example:
myVar = 'word1 word2 9.12 word3.ext'
The correct parse is:
Parse Value myVar with . . myVal2 '.' .

Each period, or var name, in the parse "eats" one blank delimited word.
For example:
myvar = 'a b c d e f g'
parse var myvar . . 'e' next .
will yield next = 'f', but

parse var myvar . . . . . 'e' next .
will yield next = ''


Ummm.  No.  I believe next = 'f':
parse value 'a b c d e f g' with . . . . . 'e' next .; say next"
 >.>   "a"
 >.>   "b"
 >.>   "c"
 >.>   "d"
 >.>   ""
 >>>   "f"
 >.>   "g"
 >V>   "f"
f

-- gil





For your data, I would first parse the words, then parse each var for '.'.

Now, if there is really a special character (or string) that you need
to identify, it is best to parse the before and after data, then
parse each section. This is how you should handle finding options in
a parm string passed to a REXX script:

parse value arg with parms '(' options ')' localopts parse var parms
parm1 parm2 parm3 parm4 parm5 .
parse var options opt1 opt2 opt3 opt4 opt5 opt6 .
parse var localopts lopt1 lopt2 lopt3 lopt4 lopt5 .

For the above to work, the use of ')' *requires* a previous '('.

example: arg = aaa bbb ccc ')' ddd eee
   parse value arg with parms '(' options ')' localopts

will yield:
parms = "aaa bbb ccc ) ddd eee"
options = ''
localopts = ''

If this might happen, you would need:
parse value arg with part1 ')' localopts parse var part1  parms ')'
options parse var parms parm1 parm2 parm3 parm4 parm5 .
parse var options opt1 opt2 opt3 opt4 opt5 opt6 .
parse var localopts lopt1 lopt2 lopt3 lopt4 lopt5 .



Tony Thigpen

Seymour J Metz wrote on 2/24/20 5:50 PM:

Isn't that the same, except for the choice of variable names?

For the type of source string that you're parsing, I'd probably
break

it into words with a simple parse and then use a parse var foo bar '.'
baz

--
Shmuel (Seymour J.) Metz
https://urldefense.proofpoint.com/v2/url?u=http-3A__mason.gmu.edu_-
7Esmetz3=DwIFaQ=Y1KkN7JyAPjrAJTUCirS0fy9vQY8xn4_Oh4EEEpbXx4=7
ds2LAJ99_WyGG6a4BwzaJ7R0vee6JgTc4Txes6yEew=NpaUBaXFEzfPLAebMs9B1G
aKHWOUHAwXKgRJtkaT1o8=TtG3xhRqfA6YTnsgOYLWh64rPyd9IJCBiSKWMRHbQBI
=


From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on

behalf of Ambros, Thomas
[010f77c934b1-dmarc-requ...@listserv.ua.edu]

Old joke realism

2020-02-25 Thread Adam Jacobvitz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

I know this isn't mainframe related, but how realistic are the old computer 
jokes? e g.

http://bofh.bjash.com



Sent from ProtonMail mobile



\ Original Message 
On Feb 25, 2020, 5:58 AM, Seymour J Metz < sme...@gmu.edu> wrote:

>
>
>
> I may have done that in the old days, but isn't everything interesting in the 
> CONSOLE address space these days?
>
>
> \--
> Shmuel (Seymour J.) Metz
> http://mason.gmu.edu/~smetz3
>
> \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_
> From: IBM Mainframe Discussion List \[IBM-MAIN@LISTSERV.UA.EDU\] on behalf of 
> Chuck Arney \[ch...@arneycomputer.com\]
> Sent: Tuesday, February 25, 2020 8:55 AM
> To: IBM-MAIN@LISTSERV.UA.EDU
> Subject: Re: Finding and replying to outstanding reply
>
> Tony, I did this in assembler many years ago for the ZEKE Automatic Reply
> feature. It has been too many years to remember all the details but
> basically you search the ORE (Operator Reply Element) chain to find the task
> you want and extract the reply id from the ORE.
>
> Chuck Arney
> Arney Computer Systems
>
>
> \-Original Message-
> From: IBM Mainframe Discussion List  On Behalf Of
> Tony Thigpen
> Sent: Tuesday, February 11, 2020 7:31 AM
> To: IBM-MAIN@LISTSERV.UA.EDU
> Subject: Finding and replying to outstanding reply
>
> We have an in-house written automated shutdown program that does everything
> but shutdown NPF. That is because NPF leaves an open reply message during
> start-up to which I must replay xx,STOP to make it shutdown. Within our
> shutdown program, I would like it to programmatically find the outstanding
> reply number so that it can issue the correct response.
>
> Can someone point me to any doc or examples that will help me get started on
> this?
>
> \--
> 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
> 
-BEGIN PGP SIGNATURE-
Version: ProtonMail

wsBmBAEBCAAQBQJeVSnnCRBiYga9B/zq3QAKCRBiYga9B/zq3UADB/0dZhRp
UcRRDfmrpuMmNjoaaSQvP+ZtTqWJKOzVuFtHhluzRYjv22D4o6mNNow/k15D
OSEI8Nx3PowV5jAy2aPGM+LgXACwrVQiNU8lIxYNQ87xFhhH4cm+ivTAe/vi
kpZbye8szCz42/va67DWlkG72FV63eYB80DClQKgvjW0bGcbS7V+fQMPg9a7
kUTUSLPAdb9n+mhQtsx7dojZIMyeL4mssSOJZ3Wpo08aH/2A3PNAYuaCZB8K
lOLthtry4c/fL0WOKHdHh7NsXcStjb4VDROJJn7b4amWR2tOWmzzskiAYlIc
DzTJN6Nh7j8PsR2i/XcpI4s3FlL/0jeRR68g
=8JGu
-END PGP SIGNATURE-

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


Re: Finding and replying to outstanding reply

2020-02-25 Thread Seymour J Metz
I may have done that in the old days, but isn't everything interesting in the 
CONSOLE address space these days?


--
Shmuel (Seymour J.) Metz
http://mason.gmu.edu/~smetz3


From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on behalf of 
Chuck Arney [ch...@arneycomputer.com]
Sent: Tuesday, February 25, 2020 8:55 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Finding and replying to outstanding reply

Tony, I did this in assembler many years ago for the ZEKE Automatic Reply
feature.  It has been too many years to remember all the details but
basically you search the ORE (Operator Reply Element) chain to find the task
you want and extract the reply id from the ORE.

Chuck Arney
Arney Computer Systems


-Original Message-
From: IBM Mainframe Discussion List  On Behalf Of
Tony Thigpen
Sent: Tuesday, February 11, 2020 7:31 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Finding and replying to outstanding reply

We have an in-house written automated shutdown program that does everything
but shutdown NPF. That is because NPF leaves an open reply message during
start-up to which I must replay xx,STOP to make it shutdown. Within our
shutdown program, I would like it to programmatically find the outstanding
reply number so that it can issue the correct response.

Can someone point me to any doc or examples that will help me get started on
this?

--
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


Re: Finding and replying to outstanding reply

2020-02-25 Thread Chuck Arney
Tony, I did this in assembler many years ago for the ZEKE Automatic Reply
feature.  It has been too many years to remember all the details but
basically you search the ORE (Operator Reply Element) chain to find the task
you want and extract the reply id from the ORE.

Chuck Arney
Arney Computer Systems


-Original Message-
From: IBM Mainframe Discussion List  On Behalf Of
Tony Thigpen
Sent: Tuesday, February 11, 2020 7:31 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Finding and replying to outstanding reply

We have an in-house written automated shutdown program that does everything
but shutdown NPF. That is because NPF leaves an open reply message during
start-up to which I must replay xx,STOP to make it shutdown. Within our
shutdown program, I would like it to programmatically find the outstanding
reply number so that it can issue the correct response.

Can someone point me to any doc or examples that will help me get started on
this?

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


Re: Convert a Metal C control block mapping to Assembler DSECT ?

2020-02-25 Thread Seymour J Metz
Well, you could bring back the QUAL pseudo-op from IBMAP.


--
Shmuel (Seymour J.) Metz
http://mason.gmu.edu/~smetz3


From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on behalf of 
Peter Relson [rel...@us.ibm.com]
Sent: Tuesday, February 25, 2020 8:45 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Convert a Metal C control block mapping to Assembler DSECT ?

I do not agree that it is right to start from the DSECT and produce the C
from it.

That is exactly what the DSECT utility attempts to do. It has an
impossible task, depending on how funky the assembler is.

In my experience, I have found the best starting point to be a high level
language definition, where that user understands that the goal is
assembler and understands the limitations that that implies. For example,
the high level language definition should avoid using the same name twice,
even if in different parts of a structure. It would work in the high level
language, but without manipulating the duplicate name in some fashion, the
assembler would not work. So "don't do that".

Peter Relson
z/OS Core Technology Design


--
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


Re: Convert a Metal C control block mapping to Assembler DSECT ?

2020-02-25 Thread Peter Relson
I do not agree that it is right to start from the DSECT and produce the C 
from it.

That is exactly what the DSECT utility attempts to do. It has an 
impossible task, depending on how funky the assembler is.

In my experience, I have found the best starting point to be a high level 
language definition, where that user understands that the goal is 
assembler and understands the limitations that that implies. For example, 
the high level language definition should avoid using the same name twice, 
even if in different parts of a structure. It would work in the high level 
language, but without manipulating the duplicate name in some fashion, the 
assembler would not work. So "don't do that".

Peter Relson
z/OS Core Technology Design


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


Re: Rexx parse using period as placeholder

2020-02-25 Thread Seymour J Metz
While the Eunix RE syntax is grotesque, the regexen are incredibly useful. I 
just wish that they had adopted the pattern syntax from SNOBOL or Wylbur.


--
Shmuel (Seymour J.) Metz
http://mason.gmu.edu/~smetz3


From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on behalf of 
Tony Thigpen [t...@vse2pdf.com]
Sent: Tuesday, February 25, 2020 8:14 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Rexx parse using period as placeholder

"regular expressions". What a misnamed item. It should be called "geek
readable only expressions". :-)

Tony Thigpen

David Crayford wrote on 2/25/20 8:03 AM:
> What you really need is regular expressions ;)
> https://secure-web.cisco.com/1kIlD0ha2diggivtg1Lq8_SbQw6h3UF1q45_Zj1fBqbYOqGvS80YjIiUJ6nPf5CSgbJyj7AQGLyplMFz59nLX1MtnXRBk5UXwLZURqx-94H0Y9qt0ig2KDxquJeAiF_5N9oXhL45b6w9ap-B24BrQRlgVbMSWXAiLsLy9o46hK-OVUZ5WEvi8i5iUcZ2Xj1cc8y2bTLdCghqhiYIh9sEO5ZxGXWrlBvRm3jzootC4sNpfX0j6iiCPVJsDtNhjh0TowRC62BSjFJ_ZXUAKN9FqV_6wFk0UMa_3dBOaOt3-7JVY93KJ6GUsWAn0CToRaksuiAE2SsW6yJyrK2P9mdh4mEUoLCxNCckEuoYjRyKW4br0iHCFSKd6Xi4wJKpVQVHJfkEqKWKfsNMRzj3-mo3YWctLKaKrXsH2SBU7l-wqPoeG482sth6ZkB6p9GgXJD37/https%3A%2F%2Fgithub.com%2Fdaveyc%2FRTK
>
> On 2020-02-25 7:47 PM, Ambros, Thomas wrote:
>> In my example, I'm trying to ignore the first three blank-delimited
>> strings and parse the character string preceding the embedded period
>> in the fourth.  That's what surprised me - Parse considers the third
>> value to be "9" and not the blank delimited string "9.12".  Subword,
>> on the other hand, hews to the definition of blank delimited word with
>> no regard to the embedded period in the character string "9.12".
>>
>> That's where the surprise came in, I was not aware that Parse would
>> break the string at any delimiter other than a blank when I coded it
>> as this:
>>
>> myVar = 'word1 word2 9.12 word3.ext'
>> Parse Var myVar . . . myVal '.' .
>>
>> Thomas Ambros
>> zEnterprise Operating Systems
>> zEnterprise Systems Management
>> 518-436-6433
>>
>> -Original Message-
>> From: IBM Mainframe Discussion List  On
>> Behalf Of Wayne Bickerdike
>> Sent: Monday, February 24, 2020 23:04
>> To: IBM-MAIN@LISTSERV.UA.EDU
>> Subject: Re: Rexx parse using period as placeholder
>>
>>
>>
>> *** Warning: External message - exercise caution. Think before you
>> click. ***
>>
>>
>> Interesting. Seymours example came back with a blank.
>>
>> I used PARSE VALUE MYVAR WITH . . . '.' . WORD3 '.' EXT .
>>
>>
>>
>> On Tue, Feb 25, 2020 at 10:46 AM Paul Gilmartin <
>> 000433f07816-dmarc-requ...@listserv.ua.edu> wrote:
>>
>>> On Mon, 24 Feb 2020 18:08:48 -0500, Tony Thigpen wrote:
>>>
 You have "passed" your first period before your "'.'" in the parse
 statement is actually interpreted.

 For your data example:
 myVar = 'word1 word2 9.12 word3.ext'
 The correct parse is:
 Parse Value myVar with . . myVal2 '.' .

 Each period, or var name, in the parse "eats" one blank delimited word.
 For example:
 myvar = 'a b c d e f g'
 parse var myvar . . 'e' next .
 will yield next = 'f', but

 parse var myvar . . . . . 'e' next .
 will yield next = ''

>>> Ummm.  No.  I believe next = 'f':
>>> parse value 'a b c d e f g' with . . . . . 'e' next .; say next"
>>> >.>   "a"
>>> >.>   "b"
>>> >.>   "c"
>>> >.>   "d"
>>> >.>   ""
>>> >>>   "f"
>>> >.>   "g"
>>> >V>   "f"
>>> f
>>>
>>> -- gil
>>>
>>>
>>>
>>>
 For your data, I would first parse the words, then parse each var
 for '.'.

 Now, if there is really a special character (or string) that you need
 to identify, it is best to parse the before and after data, then
 parse each section. This is how you should handle finding options in
 a parm string passed to a REXX script:

 parse value arg with parms '(' options ')' localopts parse var parms
 parm1 parm2 parm3 parm4 parm5 .
 parse var options opt1 opt2 opt3 opt4 opt5 opt6 .
 parse var localopts lopt1 lopt2 lopt3 lopt4 lopt5 .

 For the above to work, the use of ')' *requires* a previous '('.

 example: arg = aaa bbb ccc ')' ddd eee
   parse value arg with parms '(' options ')' localopts

 will yield:
 parms = "aaa bbb ccc ) ddd eee"
 options = ''
 localopts = ''

 If this might happen, you would need:
 parse value arg with part1 ')' localopts parse var part1  parms ')'
 options parse var parms parm1 parm2 parm3 parm4 parm5 .
 parse var options opt1 opt2 opt3 opt4 opt5 opt6 .
 parse var localopts lopt1 lopt2 lopt3 lopt4 lopt5 .



 Tony Thigpen

 Seymour J Metz wrote on 2/24/20 5:50 PM:
> Isn't that the same, except for the choice of variable names?
>
> For the type of source string that you're parsing, I'd probably
> break
>>> it into words with a simple parse and then use a parse var foo bar 

Re: Rexx parse using period as placeholder

2020-02-25 Thread Seymour J Metz
PCRE (see, e.g., CBTTAPE File # 884 PCRE (Perl-Compatible Regular Expressions) 
10.2 z/OS  at http://www.cbttape.org/ftp/cbt/CBT884.zip)



--
Shmuel (Seymour J.) Metz
http://mason.gmu.edu/~smetz3


From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on behalf of 
David Crayford [dcrayf...@gmail.com]
Sent: Tuesday, February 25, 2020 8:03 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Rexx parse using period as placeholder

What you really need is regular expressions ;) 
https://secure-web.cisco.com/11kckduHl22o_XPHz3bHsGS9pO3TtRrQjkW2q4fA647aOOPq-PV-hOv5D1BjuBvV3VzzjyjtjmonHrTxLcXhbmaOiuJfc-9NCfa3AVFsn21QUBxag_AeXqKDt_87ENc6Oh9f9EbnHEohSceInfKIYTSodsysRn1ZFEQk723E6-ZOx9W6mceL4h1sFtwznBhnzuyywKHQuhAwitxNjUuHL0coSGh34fly7wc4zrNKrGA_ZYsjx0F0hes5tx1SQqdvWtMdO4x34nWu2sG-3OuV8CRbBAZ9LgmyCm0A-BmjQT9ZQhdrMjTPAjhTAr5iDnb77GHl6UmUGrRborgt6AeremaTz3N7gutJDhBriKp3CAkMCaFfK1xGNtwPnWTyx9fvE/https%3A%2F%2Fgithub.com%2Fdaveyc%2FRTK

On 2020-02-25 7:47 PM, Ambros, Thomas wrote:
> In my example, I'm trying to ignore the first three blank-delimited strings 
> and parse the character string preceding the embedded period in the fourth.  
> That's what surprised me - Parse considers the third value to be "9" and not 
> the blank delimited string "9.12".  Subword, on the other hand, hews to the 
> definition of blank delimited word with no regard to the embedded period in 
> the character string "9.12".
>
> That's where the surprise came in, I was not aware that Parse would break the 
> string at any delimiter other than a blank when I coded it as this:
>
> myVar = 'word1 word2 9.12 word3.ext'
> Parse Var myVar . . . myVal '.' .
>
> Thomas Ambros
> zEnterprise Operating Systems
> zEnterprise Systems Management
> 518-436-6433
>
> -Original Message-
> From: IBM Mainframe Discussion List  On Behalf Of 
> Wayne Bickerdike
> Sent: Monday, February 24, 2020 23:04
> To: IBM-MAIN@LISTSERV.UA.EDU
> Subject: Re: Rexx parse using period as placeholder
>
>
>
> *** Warning: External message - exercise caution. Think before you click. ***
>
>
> Interesting. Seymours example came back with a blank.
>
> I used PARSE VALUE MYVAR WITH . . . '.' . WORD3 '.' EXT .
>
>
>
> On Tue, Feb 25, 2020 at 10:46 AM Paul Gilmartin < 
> 000433f07816-dmarc-requ...@listserv.ua.edu> wrote:
>
>> On Mon, 24 Feb 2020 18:08:48 -0500, Tony Thigpen wrote:
>>
>>> You have "passed" your first period before your "'.'" in the parse
>>> statement is actually interpreted.
>>>
>>> For your data example:
>>> myVar = 'word1 word2 9.12 word3.ext'
>>> The correct parse is:
>>> Parse Value myVar with . . myVal2 '.' .
>>>
>>> Each period, or var name, in the parse "eats" one blank delimited word.
>>> For example:
>>> myvar = 'a b c d e f g'
>>> parse var myvar . . 'e' next .
>>> will yield next = 'f', but
>>>
>>> parse var myvar . . . . . 'e' next .
>>> will yield next = ''
>>>
>> Ummm.  No.  I believe next = 'f':
>> parse value 'a b c d e f g' with . . . . . 'e' next .; say next"
>> >.>   "a"
>> >.>   "b"
>> >.>   "c"
>> >.>   "d"
>> >.>   ""
>> >>>   "f"
>> >.>   "g"
>> >V>   "f"
>> f
>>
>> -- gil
>>
>>
>>
>>
>>> For your data, I would first parse the words, then parse each var for '.'.
>>>
>>> Now, if there is really a special character (or string) that you need
>>> to identify, it is best to parse the before and after data, then
>>> parse each section. This is how you should handle finding options in
>>> a parm string passed to a REXX script:
>>>
>>> parse value arg with parms '(' options ')' localopts parse var parms
>>> parm1 parm2 parm3 parm4 parm5 .
>>> parse var options opt1 opt2 opt3 opt4 opt5 opt6 .
>>> parse var localopts lopt1 lopt2 lopt3 lopt4 lopt5 .
>>>
>>> For the above to work, the use of ')' *requires* a previous '('.
>>>
>>> example: arg = aaa bbb ccc ')' ddd eee
>>>   parse value arg with parms '(' options ')' localopts
>>>
>>> will yield:
>>> parms = "aaa bbb ccc ) ddd eee"
>>> options = ''
>>> localopts = ''
>>>
>>> If this might happen, you would need:
>>> parse value arg with part1 ')' localopts parse var part1  parms ')'
>>> options parse var parms parm1 parm2 parm3 parm4 parm5 .
>>> parse var options opt1 opt2 opt3 opt4 opt5 opt6 .
>>> parse var localopts lopt1 lopt2 lopt3 lopt4 lopt5 .
>>>
>>>
>>>
>>> Tony Thigpen
>>>
>>> Seymour J Metz wrote on 2/24/20 5:50 PM:
 Isn't that the same, except for the choice of variable names?

 For the type of source string that you're parsing, I'd probably
 break
>> it into words with a simple parse and then use a parse var foo bar '.'
>> baz

 --
 Shmuel (Seymour J.) Metz
 https://urldefense.proofpoint.com/v2/url?u=http-3A__mason.gmu.edu_-
 7Esmetz3=DwIFaQ=Y1KkN7JyAPjrAJTUCirS0fy9vQY8xn4_Oh4EEEpbXx4=7
 ds2LAJ99_WyGG6a4BwzaJ7R0vee6JgTc4Txes6yEew=NpaUBaXFEzfPLAebMs9B1G
 aKHWOUHAwXKgRJtkaT1o8=TtG3xhRqfA6YTnsgOYLWh64rPyd9IJCBiSKWMRHbQBI
 =

 

Re: Rexx parse using period as placeholder

2020-02-25 Thread Tony Thigpen
"regular expressions". What a misnamed item. It should be called "geek 
readable only expressions". :-)


Tony Thigpen

David Crayford wrote on 2/25/20 8:03 AM:
What you really need is regular expressions ;) 
https://github.com/daveyc/RTK


On 2020-02-25 7:47 PM, Ambros, Thomas wrote:
In my example, I'm trying to ignore the first three blank-delimited 
strings and parse the character string preceding the embedded period 
in the fourth.  That's what surprised me - Parse considers the third 
value to be "9" and not the blank delimited string "9.12".  Subword, 
on the other hand, hews to the definition of blank delimited word with 
no regard to the embedded period in the character string "9.12".


That's where the surprise came in, I was not aware that Parse would 
break the string at any delimiter other than a blank when I coded it 
as this:


myVar = 'word1 word2 9.12 word3.ext'
Parse Var myVar . . . myVal '.' .

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

-Original Message-
From: IBM Mainframe Discussion List  On 
Behalf Of Wayne Bickerdike

Sent: Monday, February 24, 2020 23:04
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Rexx parse using period as placeholder



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



Interesting. Seymours example came back with a blank.

I used PARSE VALUE MYVAR WITH . . . '.' . WORD3 '.' EXT .



On Tue, Feb 25, 2020 at 10:46 AM Paul Gilmartin < 
000433f07816-dmarc-requ...@listserv.ua.edu> wrote:



On Mon, 24 Feb 2020 18:08:48 -0500, Tony Thigpen wrote:


You have "passed" your first period before your "'.'" in the parse
statement is actually interpreted.

For your data example:
myVar = 'word1 word2 9.12 word3.ext'
The correct parse is:
Parse Value myVar with . . myVal2 '.' .

Each period, or var name, in the parse "eats" one blank delimited word.
For example:
myvar = 'a b c d e f g'
parse var myvar . . 'e' next .
will yield next = 'f', but

parse var myvar . . . . . 'e' next .
will yield next = ''


Ummm.  No.  I believe next = 'f':
parse value 'a b c d e f g' with . . . . . 'e' next .; say next"
    >.>   "a"
    >.>   "b"
    >.>   "c"
    >.>   "d"
    >.>   ""
    >>>   "f"
    >.>   "g"
    >V>   "f"
f

-- gil




For your data, I would first parse the words, then parse each var 
for '.'.


Now, if there is really a special character (or string) that you need
to identify, it is best to parse the before and after data, then
parse each section. This is how you should handle finding options in
a parm string passed to a REXX script:

parse value arg with parms '(' options ')' localopts parse var parms
parm1 parm2 parm3 parm4 parm5 .
parse var options opt1 opt2 opt3 opt4 opt5 opt6 .
parse var localopts lopt1 lopt2 lopt3 lopt4 lopt5 .

For the above to work, the use of ')' *requires* a previous '('.

example: arg = aaa bbb ccc ')' ddd eee
  parse value arg with parms '(' options ')' localopts

will yield:
parms = "aaa bbb ccc ) ddd eee"
options = ''
localopts = ''

If this might happen, you would need:
parse value arg with part1 ')' localopts parse var part1  parms ')'
options parse var parms parm1 parm2 parm3 parm4 parm5 .
parse var options opt1 opt2 opt3 opt4 opt5 opt6 .
parse var localopts lopt1 lopt2 lopt3 lopt4 lopt5 .



Tony Thigpen

Seymour J Metz wrote on 2/24/20 5:50 PM:

Isn't that the same, except for the choice of variable names?

For the type of source string that you're parsing, I'd probably
break

it into words with a simple parse and then use a parse var foo bar '.'
baz


--
Shmuel (Seymour J.) Metz
https://urldefense.proofpoint.com/v2/url?u=http-3A__mason.gmu.edu_-
7Esmetz3=DwIFaQ=Y1KkN7JyAPjrAJTUCirS0fy9vQY8xn4_Oh4EEEpbXx4=7
ds2LAJ99_WyGG6a4BwzaJ7R0vee6JgTc4Txes6yEew=NpaUBaXFEzfPLAebMs9B1G
aKHWOUHAwXKgRJtkaT1o8=TtG3xhRqfA6YTnsgOYLWh64rPyd9IJCBiSKWMRHbQBI
=


From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on

behalf of Ambros, Thomas
[010f77c934b1-dmarc-requ...@listserv.ua.edu]

Sent: Monday, February 24, 2020 4:26 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Rexx parse using period as placeholder

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  On

Behalf Of Seymour J Metz

Sent: Monday, February 24, 2020 16:17
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Rexx parse using 

Re: Rexx parse using period as placeholder

2020-02-25 Thread David Crayford

What you really need is regular expressions ;) https://github.com/daveyc/RTK

On 2020-02-25 7:47 PM, Ambros, Thomas wrote:

In my example, I'm trying to ignore the first three blank-delimited strings and parse the character string 
preceding the embedded period in the fourth.  That's what surprised me - Parse considers the third value to 
be "9" and not the blank delimited string "9.12".  Subword, on the other hand, hews to 
the definition of blank delimited word with no regard to the embedded period in the character string 
"9.12".

That's where the surprise came in, I was not aware that Parse would break the 
string at any delimiter other than a blank when I coded it as this:

myVar = 'word1 word2 9.12 word3.ext'
Parse Var myVar . . . myVal '.' .

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

-Original Message-
From: IBM Mainframe Discussion List  On Behalf Of 
Wayne Bickerdike
Sent: Monday, February 24, 2020 23:04
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Rexx parse using period as placeholder



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


Interesting. Seymours example came back with a blank.

I used PARSE VALUE MYVAR WITH . . . '.' . WORD3 '.' EXT .



On Tue, Feb 25, 2020 at 10:46 AM Paul Gilmartin < 
000433f07816-dmarc-requ...@listserv.ua.edu> wrote:


On Mon, 24 Feb 2020 18:08:48 -0500, Tony Thigpen wrote:


You have "passed" your first period before your "'.'" in the parse
statement is actually interpreted.

For your data example:
myVar = 'word1 word2 9.12 word3.ext'
The correct parse is:
Parse Value myVar with . . myVal2 '.' .

Each period, or var name, in the parse "eats" one blank delimited word.
For example:
myvar = 'a b c d e f g'
parse var myvar . . 'e' next .
will yield next = 'f', but

parse var myvar . . . . . 'e' next .
will yield next = ''


Ummm.  No.  I believe next = 'f':
parse value 'a b c d e f g' with . . . . . 'e' next .; say next"
>.>   "a"
>.>   "b"
>.>   "c"
>.>   "d"
>.>   ""
>>>   "f"
>.>   "g"
>V>   "f"
f

-- gil





For your data, I would first parse the words, then parse each var for '.'.

Now, if there is really a special character (or string) that you need
to identify, it is best to parse the before and after data, then
parse each section. This is how you should handle finding options in
a parm string passed to a REXX script:

parse value arg with parms '(' options ')' localopts parse var parms
parm1 parm2 parm3 parm4 parm5 .
parse var options opt1 opt2 opt3 opt4 opt5 opt6 .
parse var localopts lopt1 lopt2 lopt3 lopt4 lopt5 .

For the above to work, the use of ')' *requires* a previous '('.

example: arg = aaa bbb ccc ')' ddd eee
  parse value arg with parms '(' options ')' localopts

will yield:
parms = "aaa bbb ccc ) ddd eee"
options = ''
localopts = ''

If this might happen, you would need:
parse value arg with part1 ')' localopts parse var part1  parms ')'
options parse var parms parm1 parm2 parm3 parm4 parm5 .
parse var options opt1 opt2 opt3 opt4 opt5 opt6 .
parse var localopts lopt1 lopt2 lopt3 lopt4 lopt5 .



Tony Thigpen

Seymour J Metz wrote on 2/24/20 5:50 PM:

Isn't that the same, except for the choice of variable names?

For the type of source string that you're parsing, I'd probably
break

it into words with a simple parse and then use a parse var foo bar '.'
baz


--
Shmuel (Seymour J.) Metz
https://urldefense.proofpoint.com/v2/url?u=http-3A__mason.gmu.edu_-
7Esmetz3=DwIFaQ=Y1KkN7JyAPjrAJTUCirS0fy9vQY8xn4_Oh4EEEpbXx4=7
ds2LAJ99_WyGG6a4BwzaJ7R0vee6JgTc4Txes6yEew=NpaUBaXFEzfPLAebMs9B1G
aKHWOUHAwXKgRJtkaT1o8=TtG3xhRqfA6YTnsgOYLWh64rPyd9IJCBiSKWMRHbQBI
=


From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on

behalf of Ambros, Thomas
[010f77c934b1-dmarc-requ...@listserv.ua.edu]

Sent: Monday, February 24, 2020 4:26 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Rexx parse using period as placeholder

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  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


Re: Rexx parse using period as placeholder

2020-02-25 Thread Seymour J Metz
What is happening is that everything in the template before the string match 
'.' is a sub-pattern applied to the fragment to the left of the period. If you 
can't guaranty that the 3rd word will have a period in it, then you need two 
parse statements or, in this simple case, parse value word(myVar,4) with 
fn'.'fext


--
Shmuel (Seymour J.) Metz
http://mason.gmu.edu/~smetz3


From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on behalf of 
Ambros, Thomas [010f77c934b1-dmarc-requ...@listserv.ua.edu]
Sent: Tuesday, February 25, 2020 6:47 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Rexx parse using period as placeholder

In my example, I'm trying to ignore the first three blank-delimited strings and 
parse the character string preceding the embedded period in the fourth.  That's 
what surprised me - Parse considers the third value to be "9" and not the blank 
delimited string "9.12".  Subword, on the other hand, hews to the definition of 
blank delimited word with no regard to the embedded period in the character 
string "9.12".

That's where the surprise came in, I was not aware that Parse would break the 
string at any delimiter other than a blank when I coded it as this:

myVar = 'word1 word2 9.12 word3.ext'
Parse Var myVar . . . myVal '.' .

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

-Original Message-
From: IBM Mainframe Discussion List  On Behalf Of 
Wayne Bickerdike
Sent: Monday, February 24, 2020 23:04
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Rexx parse using period as placeholder



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


Interesting. Seymours example came back with a blank.

I used PARSE VALUE MYVAR WITH . . . '.' . WORD3 '.' EXT .



On Tue, Feb 25, 2020 at 10:46 AM Paul Gilmartin < 
000433f07816-dmarc-requ...@listserv.ua.edu> wrote:

> On Mon, 24 Feb 2020 18:08:48 -0500, Tony Thigpen wrote:
>
> >You have "passed" your first period before your "'.'" in the parse
> >statement is actually interpreted.
> >
> >For your data example:
> >myVar = 'word1 word2 9.12 word3.ext'
> >The correct parse is:
> >Parse Value myVar with . . myVal2 '.' .
> >
> >Each period, or var name, in the parse "eats" one blank delimited word.
> >For example:
> >myvar = 'a b c d e f g'
> >parse var myvar . . 'e' next .
> >will yield next = 'f', but
> >
> >parse var myvar . . . . . 'e' next .
> >will yield next = ''
> >
> Ummm.  No.  I believe next = 'f':
> parse value 'a b c d e f g' with . . . . . 'e' next .; say next"
>>.>   "a"
>>.>   "b"
>>.>   "c"
>>.>   "d"
>>.>   ""
>>>>   "f"
>>.>   "g"
>>V>   "f"
> f
>
> -- gil
>
>
>
>
> >For your data, I would first parse the words, then parse each var for '.'.
> >
> >Now, if there is really a special character (or string) that you need
> >to identify, it is best to parse the before and after data, then
> >parse each section. This is how you should handle finding options in
> >a parm string passed to a REXX script:
> >
> >parse value arg with parms '(' options ')' localopts parse var parms
> >parm1 parm2 parm3 parm4 parm5 .
> >parse var options opt1 opt2 opt3 opt4 opt5 opt6 .
> >parse var localopts lopt1 lopt2 lopt3 lopt4 lopt5 .
> >
> >For the above to work, the use of ')' *requires* a previous '('.
> >
> >example: arg = aaa bbb ccc ')' ddd eee
> >  parse value arg with parms '(' options ')' localopts
> >
> >will yield:
> >parms = "aaa bbb ccc ) ddd eee"
> >options = ''
> >localopts = ''
> >
> >If this might happen, you would need:
> >parse value arg with part1 ')' localopts parse var part1  parms ')'
> >options parse var parms parm1 parm2 parm3 parm4 parm5 .
> >parse var options opt1 opt2 opt3 opt4 opt5 opt6 .
> >parse var localopts lopt1 lopt2 lopt3 lopt4 lopt5 .
> >
> >
> >
> >Tony Thigpen
> >
> >Seymour J Metz wrote on 2/24/20 5:50 PM:
> >> Isn't that the same, except for the choice of variable names?
> >>
> >> For the type of source string that you're parsing, I'd probably
> >> break
> it into words with a simple parse and then use a parse var foo bar '.'
> baz
> >>
> >>
> >> --
> >> Shmuel (Seymour J.) Metz
> >> https://urldefense.proofpoint.com/v2/url?u=http-3A__mason.gmu.edu_-
> >> 7Esmetz3=DwIFaQ=Y1KkN7JyAPjrAJTUCirS0fy9vQY8xn4_Oh4EEEpbXx4=7
> >> ds2LAJ99_WyGG6a4BwzaJ7R0vee6JgTc4Txes6yEew=NpaUBaXFEzfPLAebMs9B1G
> >> aKHWOUHAwXKgRJtkaT1o8=TtG3xhRqfA6YTnsgOYLWh64rPyd9IJCBiSKWMRHbQBI
> >> =
> >>
> >> 
> >> From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on
> behalf of Ambros, Thomas
> [010f77c934b1-dmarc-requ...@listserv.ua.edu]
> >> Sent: Monday, February 24, 2020 4:26 PM
> >> To: IBM-MAIN@LISTSERV.UA.EDU
> >> Subject: Re: Rexx parse using period as placeholder
> >>
> >> You mean like this?
> >>
> >> *-* Parse Value myVar with . . . myVal2 '.' .
> >"word1 word2 9.12 word3.ext"
> >>> .>   

Re: Rexx parse using period as placeholder

2020-02-25 Thread Seymour J Metz
> Interesting. Seymours example came back with a blank.

Blank what?

trace i;trace i;parse var myVar v1 v2 v3 myVal '.' rest
95 *-*   trace i;
95 *-*   parse var myVar v1 v2 v3 myVal '.' rest
   >V> "word1 word2 9.12 word3.ext"
   >L> "."
   >>> "."
   >>> "word1"
   >>> "word2"
   >>> "9"
   >>> ""
   >>> "12 word3.ext"
96 *-*   trace 'Off'/* Don't trace rexxtry.
 */
   REXXTRY.CMD on OS/2
say v1 v2 v3 '/'myVal'/' v1 v2 v3 myVal '.' rest
word1 word2 9 // word1 word2 9  . 12 word3.ext

You get a null myVal because v3 has already swallows everything before the 
first period.

> I used PARSE VALUE MYVAR WITH . . . '.' . WORD3 '.' EXT .

Well, I wouldn't have used the same variable name as the test data, and it's 
not clear whether the period in 9.12 is fortuitous. Your parse won't work 
against, e.g., myVar = 'word1 word2 666 word3.ext'

 */
   REXXTRY.CMD on OS/2
say v1 v2 v3
word1 word2 9



--
Shmuel (Seymour J.) Metz
http://mason.gmu.edu/~smetz3


From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on behalf of 
Wayne Bickerdike [wayn...@gmail.com]
Sent: Monday, February 24, 2020 11:03 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Rexx parse using period as placeholder

Interesting. Seymours example came back with a blank.

I used PARSE VALUE MYVAR WITH . . . '.' . WORD3 '.' EXT .



On Tue, Feb 25, 2020 at 10:46 AM Paul Gilmartin <
000433f07816-dmarc-requ...@listserv.ua.edu> wrote:

> On Mon, 24 Feb 2020 18:08:48 -0500, Tony Thigpen wrote:
>
> >You have "passed" your first period before your "'.'" in the parse
> >statement is actually interpreted.
> >
> >For your data example:
> >myVar = 'word1 word2 9.12 word3.ext'
> >The correct parse is:
> >Parse Value myVar with . . myVal2 '.' .
> >
> >Each period, or var name, in the parse "eats" one blank delimited word.
> >For example:
> >myvar = 'a b c d e f g'
> >parse var myvar . . 'e' next .
> >will yield next = 'f', but
> >
> >parse var myvar . . . . . 'e' next .
> >will yield next = ''
> >
> Ummm.  No.  I believe next = 'f':
> parse value 'a b c d e f g' with . . . . . 'e' next .; say next"
>>.>   "a"
>>.>   "b"
>>.>   "c"
>>.>   "d"
>>.>   ""
>>>>   "f"
>>.>   "g"
>>V>   "f"
> f
>
> -- gil
>
>
>
>
> >For your data, I would first parse the words, then parse each var for '.'.
> >
> >Now, if there is really a special character (or string) that you need to
> >identify, it is best to parse the before and after data, then parse each
> >section. This is how you should handle finding options in a parm string
> >passed to a REXX script:
> >
> >parse value arg with parms '(' options ')' localopts
> >parse var parms parm1 parm2 parm3 parm4 parm5 .
> >parse var options opt1 opt2 opt3 opt4 opt5 opt6 .
> >parse var localopts lopt1 lopt2 lopt3 lopt4 lopt5 .
> >
> >For the above to work, the use of ')' *requires* a previous '('.
> >
> >example: arg = aaa bbb ccc ')' ddd eee
> >  parse value arg with parms '(' options ')' localopts
> >
> >will yield:
> >parms = "aaa bbb ccc ) ddd eee"
> >options = ''
> >localopts = ''
> >
> >If this might happen, you would need:
> >parse value arg with part1 ')' localopts
> >parse var part1  parms ')' options
> >parse var parms parm1 parm2 parm3 parm4 parm5 .
> >parse var options opt1 opt2 opt3 opt4 opt5 opt6 .
> >parse var localopts lopt1 lopt2 lopt3 lopt4 lopt5 .
> >
> >
> >
> >Tony Thigpen
> >
> >Seymour J Metz wrote on 2/24/20 5:50 PM:
> >> Isn't that the same, except for the choice of variable names?
> >>
> >> For the type of source string that you're parsing, I'd probably break
> it into words with a simple parse and then use a parse var foo bar '.' baz
> >>
> >>
> >> --
> >> Shmuel (Seymour J.) Metz
> >> http://mason.gmu.edu/~smetz3
> >>
> >> 
> >> From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on
> behalf of Ambros, Thomas [010f77c934b1-dmarc-requ...@listserv.ua.edu]
> >> Sent: Monday, February 24, 2020 4:26 PM
> >> To: IBM-MAIN@LISTSERV.UA.EDU
> >> Subject: Re: Rexx parse using period as placeholder
> >>
> >> 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 

Re: Rexx parse using period as placeholder

2020-02-25 Thread Ambros, Thomas
In my example, I'm trying to ignore the first three blank-delimited strings and 
parse the character string preceding the embedded period in the fourth.  That's 
what surprised me - Parse considers the third value to be "9" and not the blank 
delimited string "9.12".  Subword, on the other hand, hews to the definition of 
blank delimited word with no regard to the embedded period in the character 
string "9.12".

That's where the surprise came in, I was not aware that Parse would break the 
string at any delimiter other than a blank when I coded it as this:

myVar = 'word1 word2 9.12 word3.ext'
Parse Var myVar . . . myVal '.' .

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

-Original Message-
From: IBM Mainframe Discussion List  On Behalf Of 
Wayne Bickerdike
Sent: Monday, February 24, 2020 23:04
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Rexx parse using period as placeholder



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


Interesting. Seymours example came back with a blank.

I used PARSE VALUE MYVAR WITH . . . '.' . WORD3 '.' EXT .



On Tue, Feb 25, 2020 at 10:46 AM Paul Gilmartin < 
000433f07816-dmarc-requ...@listserv.ua.edu> wrote:

> On Mon, 24 Feb 2020 18:08:48 -0500, Tony Thigpen wrote:
>
> >You have "passed" your first period before your "'.'" in the parse
> >statement is actually interpreted.
> >
> >For your data example:
> >myVar = 'word1 word2 9.12 word3.ext'
> >The correct parse is:
> >Parse Value myVar with . . myVal2 '.' .
> >
> >Each period, or var name, in the parse "eats" one blank delimited word.
> >For example:
> >myvar = 'a b c d e f g'
> >parse var myvar . . 'e' next .
> >will yield next = 'f', but
> >
> >parse var myvar . . . . . 'e' next .
> >will yield next = ''
> >
> Ummm.  No.  I believe next = 'f':
> parse value 'a b c d e f g' with . . . . . 'e' next .; say next"
>>.>   "a"
>>.>   "b"
>>.>   "c"
>>.>   "d"
>>.>   ""
>>>>   "f"
>>.>   "g"
>>V>   "f"
> f
>
> -- gil
>
>
>
>
> >For your data, I would first parse the words, then parse each var for '.'.
> >
> >Now, if there is really a special character (or string) that you need
> >to identify, it is best to parse the before and after data, then
> >parse each section. This is how you should handle finding options in
> >a parm string passed to a REXX script:
> >
> >parse value arg with parms '(' options ')' localopts parse var parms
> >parm1 parm2 parm3 parm4 parm5 .
> >parse var options opt1 opt2 opt3 opt4 opt5 opt6 .
> >parse var localopts lopt1 lopt2 lopt3 lopt4 lopt5 .
> >
> >For the above to work, the use of ')' *requires* a previous '('.
> >
> >example: arg = aaa bbb ccc ')' ddd eee
> >  parse value arg with parms '(' options ')' localopts
> >
> >will yield:
> >parms = "aaa bbb ccc ) ddd eee"
> >options = ''
> >localopts = ''
> >
> >If this might happen, you would need:
> >parse value arg with part1 ')' localopts parse var part1  parms ')'
> >options parse var parms parm1 parm2 parm3 parm4 parm5 .
> >parse var options opt1 opt2 opt3 opt4 opt5 opt6 .
> >parse var localopts lopt1 lopt2 lopt3 lopt4 lopt5 .
> >
> >
> >
> >Tony Thigpen
> >
> >Seymour J Metz wrote on 2/24/20 5:50 PM:
> >> Isn't that the same, except for the choice of variable names?
> >>
> >> For the type of source string that you're parsing, I'd probably
> >> break
> it into words with a simple parse and then use a parse var foo bar '.'
> baz
> >>
> >>
> >> --
> >> Shmuel (Seymour J.) Metz
> >> https://urldefense.proofpoint.com/v2/url?u=http-3A__mason.gmu.edu_-
> >> 7Esmetz3=DwIFaQ=Y1KkN7JyAPjrAJTUCirS0fy9vQY8xn4_Oh4EEEpbXx4=7
> >> ds2LAJ99_WyGG6a4BwzaJ7R0vee6JgTc4Txes6yEew=NpaUBaXFEzfPLAebMs9B1G
> >> aKHWOUHAwXKgRJtkaT1o8=TtG3xhRqfA6YTnsgOYLWh64rPyd9IJCBiSKWMRHbQBI
> >> =
> >>
> >> 
> >> From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on
> behalf of Ambros, Thomas
> [010f77c934b1-dmarc-requ...@listserv.ua.edu]
> >> Sent: Monday, February 24, 2020 4:26 PM
> >> To: IBM-MAIN@LISTSERV.UA.EDU
> >> Subject: Re: Rexx parse using period as placeholder
> >>
> >> 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