On 2014-04-30 08:33, Farley, Peter x23353 wrote:
>>
>>> mbrRC = BPXWUNIX('head -1 "//''TSOUSER.MYLIB('mbrname')''"')
>>>
>>> The above will return mbrRC = 1 if mbrname does not exist and mbrRC =
>> 0 if mbrname does exist.
>>>
>> That argument to "head" is unsupported. Use at your own risk. But:
>>
>> mbrRC = BPXWUNIX('cp "//''TSOUSER.MYLIB('mbrname')''" /dev/null')
>>
>> ... (untested) might do what you want and be supported.
>
> Yes it is an obsolete parameter, but unsupported? Not yet anyway, and I would guess never.
>
I meant the use of a data set name as a parameter to "head" is
unsupported; nowhere documented.
>>> Unfortunately, the "//'DD:DDNAME'" format for file names does not
>> work with the "head" utility when run from BPXWUNIX. When I tried it I
>> got this error message:
>>>
>> And that construct is not supported, even as an argument to "cp".
>
> Yes, I know, but I was hoping z/OS head was programmed to use fopen and thus support the construct like z/OS awk was, at least at one point in its life.
>
When? Cite. You appear to be conflating "supported", as in
documented, so problems are APARable, with "works by happenstance",
use at your own risk.
> Lately the //'DD:ddname' construct has been ever harder to use effectively, or at all for that matter, with z/OS Unix utilities.
>
And that is the hazard of using constructs that were never documented
as supported.
BTW, I routinely use UNIX directories in my SYSEXEC catenation.
Also unsupported, but very useful. I accept the risk, and
don't do it in code distributed to clients. An RFE might be
in order.
> Of course "DD:DDNAME" is not a data set name in JCL, but it is *supposed* to be available in z/OS Unix, especially in a shell environment, as a *substitute* for a data set name.
>
Cite.
> IMHO the fact that it is not universally available is a crying shame.
>
I agree. By "universally available" do you mean that DDNAMEs should
be inherited by forked children? Ain't gonna happen. (Well, maybe
the scope of ENQs should be made "job" (whatever that means), as
opposed to address space. I'm not holding my breath.)
As an alternative, I would like to see the entire z/OS Classic data
set space made available as a mountable Virtual File System.
-- gil