Bob Bridges
2017-07-05 20:45:04 UTC
Here's an odd one I just encountered - not to do with REXX itself but rather with the way TSO itself handles comments in TSO commands.
According to the TSO Command Reference (see http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ikj3c530/1.2.2), you can include comments in a TSO command, like this for example:
tso help xmit /* this is a comment
You can close the comment with "*/", but if there's nothing else on the line you don’t have to. Ok, I knew that; I use it often when writing a REXX that puts commands into a PDS so that I can examine the commands before executing them.
Here's the surprise: Since everything after "/*" in a TSO command is a comment, I assumed that the TSO command parser would omit the comment when passing the arguments on to whatever command is being executed. For example, if in a CLIST appears this:
TSS ADD(DWHIT12) PROF(PROF1234) /* DAVE WHITLEY
...I supposed that what the TSS command would see is "ADD(DWHIT12) PROF(PROF1234)", with the comment stripped out. Otherwise, ~every~ command that is ever called by TSO would have to know what to do with "/*".
And apparently every command does. I just wrote a quick REXX to say the arguments. When I call it from the READY prompt it shows the whole command line including the comment:
X arg /* more args
ARG /* MORE ARGS
READY
When I execute it from ISPF it's even weirder:
Command ===> tso x arg /* more args
ARG /* MORE ARGS)
***
ISPF is apparently adding a right paren to the command. But it doesn't do that when I close the comment:
Command ===> tso x arg /* more args */
ARG /* MORE ARGS */
***
This is not at all what I expected, and I don't understand the rationale for it. Is it documented anywhere?
---
Bob Bridges
***@gmail.com, cell 336 382-7313
***@InfoSecInc.com
/* If you refuse to accept anything but the best you often get it. -unknown
The rest of the time you get nothing. The really good trick is knowing when you should settle. -Bob Bridges */
----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to ***@VM.MARIST.EDU with the message: INFO TSO-REXX
According to the TSO Command Reference (see http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ikj3c530/1.2.2), you can include comments in a TSO command, like this for example:
tso help xmit /* this is a comment
You can close the comment with "*/", but if there's nothing else on the line you don’t have to. Ok, I knew that; I use it often when writing a REXX that puts commands into a PDS so that I can examine the commands before executing them.
Here's the surprise: Since everything after "/*" in a TSO command is a comment, I assumed that the TSO command parser would omit the comment when passing the arguments on to whatever command is being executed. For example, if in a CLIST appears this:
TSS ADD(DWHIT12) PROF(PROF1234) /* DAVE WHITLEY
...I supposed that what the TSS command would see is "ADD(DWHIT12) PROF(PROF1234)", with the comment stripped out. Otherwise, ~every~ command that is ever called by TSO would have to know what to do with "/*".
And apparently every command does. I just wrote a quick REXX to say the arguments. When I call it from the READY prompt it shows the whole command line including the comment:
X arg /* more args
ARG /* MORE ARGS
READY
When I execute it from ISPF it's even weirder:
Command ===> tso x arg /* more args
ARG /* MORE ARGS)
***
ISPF is apparently adding a right paren to the command. But it doesn't do that when I close the comment:
Command ===> tso x arg /* more args */
ARG /* MORE ARGS */
***
This is not at all what I expected, and I don't understand the rationale for it. Is it documented anywhere?
---
Bob Bridges
***@gmail.com, cell 336 382-7313
***@InfoSecInc.com
/* If you refuse to accept anything but the best you often get it. -unknown
The rest of the time you get nothing. The really good trick is knowing when you should settle. -Bob Bridges */
----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to ***@VM.MARIST.EDU with the message: INFO TSO-REXX