On Mon, 6 Feb 2012 14:34:15 -0600, McKown, John wrote:
>
>The thought of trying to duplicate this feat is scary to me. But, being the 
>weirdo that I am, it occurs to me that I can write an IDCAMS front end program 
>__in UNIX__ which is marked as APF authorized. There would be something like 
>RC=AMSCALLS('ON') similar to the RC=ISFCALLS('on') and RC=SYSCALLS('on'). This 
>AMSCALLS would do a spawn of the UNIX program. It would also set up a pair of 
>anonymous pipes so that the REXX environment could send commands to the AMS 
>process and receive the output back. The APF UNIX program would set up things 
>and invoke IDCAMS with ATTACHX and set pointers to subroutines which direct 
>IDCAMS' I/O to SYSIN and SYSPRINT via the pipes back to the REXX environment. 
>This should be secure since IDCAMS would be running in a separate address 
>space from the REXX program itself.
> 
Have you considered BPX1EXM/execmvs()?  (Oops; the latter is C.)  But Rexx has
"address SYSCALL forkexecmvs" or something like that, IIRC.


>I'm just not sure it if is worth bothering with. Using UNIX REXX, I can do an 
>ADDRESS TSO which spawns a TSO address space and do other TSO commands in 
>addition to IDCAMS commands.

I've long imagined an APF-authorized interface under BPX1EXM which
performs allocations according to the TSOALLOC environment variable
(see "man tso") (I understand that descriptors and environment
variables are inherited under BPX1EXM), then XCTLs to PARM(1) passing
PARM(2),... in the R1 vector.  This wouldn't be limited to IDCAMS, but
could support any Classic utility in a load module.

The misdesign of "address TSO" is that stdin becomes SYSTSIN and
stdout becomes SYSTSPRT and all other descriptors are closed.
Drat!

As for SYSIN and SYSPRINT, remember that WJS said that one of the
challenges in "address TSO" was detecting when a command had
completed so it was proper to prompt for the next input line and pass
it to the TSO address space.  Apparently TSO development was
not very supportive of this endeavor.

-- gil

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

Reply via email to