In a recent note, John Mattson said:
> Date: Tue, 8 Aug 2006 14:44:33 -0700
>
> Another interesting JCL thing.
> If you invoke a program such as REXX with JCL and pass a parm with
> back slashes in it, the back slashes work fine. Ex :
> //JS001 EXEC PGM=IKJEFT01,PARM='%SAYPRM \X\XX'
> However, when I do essentially the same JCL with a program which
> uses IBM LE and C Environments the back slashes are removed, forcing me to
> use double back slashes to get one single one. In this case UCMD from
> Stonebranch Software.
> //JS001 EXEC PGM=UCMD,PARM='-o "\\tmp\\xxx\\zzzz"'
> I have spoken with Stonebranch, and they say that there is nothing
> in their code to give any special handling to back slashes. They believe
> that this is in LE or C runtime libraries in MVS. This is a real pain in
> in the neck when the parm you wish to pass is a MS directory.
> I HATE it when software is TOO helpful.
>
It's tradition; the CRTL startup routine is attempting to emulate
the behavior of the POSIX shell, in which the command string,
UCMD foo\ bar wombat
passes UCMD two arguments, "foo bar" and "wombat". A syntax more
consonant with JCL, etc. syntax would say:
PGM=UCMD,PARM=('foo bar','wombat')
Alas, the facility for multiple parameters was left out of JCL
(although CALL, LINK, and ATTACH all provide it). The CRTL
did the best it could to meet the requirements of C in a fashion
that would be comfortably familiar to the audience.
It's not nice; it's necessary until someone devises something
better.
-- gil
--
StorageTek
INFORMATION made POWERFUL
----------------------------------------------------------------------
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