On Fri, Sep 22, 2017 at 4:01 PM, Walt Farrell <walt.farr...@gmail.com>
wrote:

> On Fri, 22 Sep 2017 15:38:33 -0500, John McKown <
> john.archie.mck...@gmail.com> wrote:
>
> >Could someone tell me of some of the "real life" uses of this capability?
> >Why can't I just do a DYNALLOC on the libraries, OPEN them, then
> >LINKX/ATTACHX DCB= whatever it is I need? The only thing that I can think
> >of where this would be a problem is if the code doing so is APF authorized
> >and the program to be run is in a nonAPF library.
> >
>
> Yes, you as a programmer could do that.
>
> However, consider a TSO user who wants to run a TSO command from READY,
> which is comprised of multiple load modules, and which lives in a library
> that is neither in the linklist nor in the STEPLIB for the user's TSO logon
> proc.
>
> How does he do that, given that he cannot change the logon proc?
>
> (Note that if the module were a "normal" program rather than a TSO command
> he could use the CALL command, but that won't work for TSO commands. Note,
> too, that if he wanted to run it under ISPF he could use ISPF facilities to
> handle it. But he can't run it from READY without some kind of dynamic
> STEPLIB or tasklib capability.)
>

​Right. Use a TASKLIB. How? Well write a TSO CP which sets up the TASKLIB,
then creates the appropriate CPPL based on what is in the new CP's command,
and does an ATTACHX​ with the DCB= of actual TSO CP which was desired. I
don't have any code to share, but what the user might type in could look
something like:

ALLOC DDN(TASKLIB) DSN(...) SHR REUSE
DOCP REALCP PARAMETERS TO (REAL CP

The DOCP command would OPEN the DD of TASKLIB (hard coded DD name for
simplicity). It would then do the ATTACHX of REALCP passing a created CPPL
so that REALCP "sees" the command, properly TSO parsed, as

REALCP PARAMETERS TO (REAL CP

​But I will have to admit that I am not overly knowledgeable in writing a
TSO command processor so I may be overlooking some weird TSO thing about
problems using TSO service routines in a program which is ATTACH'd from the
actual CP program. I.e. TSO doesn't really support multi-tasking. Hum,
perhaps I could mess around with something like this for the CBT.​

​A truly advanced DOCP command would either accept the DSNs for the TASKLIB
or the DD name to use, instead of just using the name TASKLIB.​



> --
> Walt
>
>

-- 
UNIX was not designed to stop you from doing stupid things, because that
would also stop you from doing clever things. -- Doug Gwyn

Maranatha! <><
John McKown

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to