On Tue, 16 Sep 2025 11:24:38 -0500, Charles Mills wrote:

>Follow-up question if I may:
>
>Would you expect (your command(s) here) | cp - "//DD:MYDDNAME" to work if the 
>command were executed from Rexx using SYSCALLS and BPXWUNIX?
>
or ADDRESS SYSCALL spawn.

>(Assuming all of the usual -- good allocation, RACF authorization, no ENQ 
>conflicts, etc.)
>
Some programmers rely on   _BPX_SHAREAS=MUST for this.

I believe redirection needs a descriptor.

open() returns a descriptor but doesn't handle Classic data sets.

fopen() handle s Classic data sets but doesn't return a descriptor.

After fopen(), fileno() returns the file descriptor for the FILE. 
<https://www.ibm.com/docs/en/zos/3.1.0?topic=functions-fileno-get-file-descriptor-from-open-stream>
    MVS data sets are not supported, so fileno() of an MVS data set returns -1.

Some operations on UNIX files are nearly impossible on MVS data sets.

>I am asking because the doc says
>
>In order to use the //DD:DDNAME format, the dataset must be allocated in the 
>address space that the following command will run in. However, in the login 
>shell environment, the user cannot use the //DD:DDNAME format due to the 
>restriction that the address space of the allocated dataset is not always the 
>same as the running command.
>
>I read that as "it might work, and it might not -- and even if it worked in 
>test, it might not work in production."

-- 
gil

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to