On Tue, 28 Dec 2010 00:02:58 -0500, Pinnacle wrote:
>
>If you're assuming, and it looks like you are, that cmd is syntactically
>correct, then this should work:
>
>/* rexx */
>parse arg cmd
>address tso '"'cmd'"' /* singlequote, doublequote, singlequote */
>
Errr... No. Example:
u...@mvs:138$ cat foocmd
/* rexx */
trace R
parse arg cmd
address tso '"'cmd'"' /* singlequote, doublequote, singlequote */
address tso cmd /* no quotes */
u...@mvs:139$ foocmd time
4 *-* parse arg cmd
>>> "time"
5 *-* address tso '"'cmd'"' /* singlequote, doublequote, singlequote */
>>> ""time""
TSOLNK failed: rc=20 rsn=44 code=FFFFFFFF
7 *-* address tso cmd /* no quotes */
>>> "time"
IKJ56650I TIME-10:26:10 PM. CPU-00:00:00 SERVICE-227 SESSION-00:00:00
DECEMBER 27,2010
I am continually astonished by the ingenuity programmers exhibit
in taking something simple that works and transforming it into
something complicated that doesn't work.
I'd be interested in seeing an example that works with the funky
quotes but fails in their absence.
-- gil
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html