Before I get too much static, I ask that you read all the way to the end
before replying.

If it were me, my solution would be to run under ISPF and use [ADDRESS
ISPEXEC] "SELECT CMD(FOO ...)" .

Here is my thinking and approach:

   - ISPF has a huge number of highly useful and valuable facilities, which
   are expensive or impractical to forego.
   - It is impractical and costly to write software that is either :
      - Dual pathed for both ISPF and non-ISPF execution environments.
      - Not dependent on ISPF.

Yes, for a single module, dual pathing is no big deal, but if you are
reusing common code, you rapidly reach the point where the common code
costs of dual pathing cause code bloat.

Therefore, I create a single JCL proc that executes any TSO command in
batch with ISPF active.  This proc includes allocations that match the
online environment.  While this is non-trivial, it is a one-time cost.
 (You have to deal with command and return code passing at two levels.  See
ZISPFRC.)  That cost is more than offset (by many orders of magniture) by
the benefit of being able to write modules that work unchanged in both
foreground or batch.

Note:  One of the most important allocations for ISPF batch is:

//ISPLOG   DD  SYSOUT=*

even if you disable the ISPF log in foreground.  There are situations where
you need the log messages.

YMMV.

On Tue, May 5, 2015 at 7:59 PM, Charles Mills <[email protected]> wrote:

> Thanks much.
>
> > I'm surprised the doc isn't clear, but it's one of those "everyone knows
> that" sort of things, so I don't doubt you.
>
> Notice I said "not very clear to me" LOL. I've written a lot of programs
> in my career but never a TSO command or the like. What can I say?
>
> OK, I "get" your TEST example. You bring foo into memory from a specified
> library telling TEST it's a CP and then run it. Thanks.
>
> > Over the decades just about everyone wrote a CALLCP command to do this,
> often with variations. I'll bet there are several on the CBT site.
>
> Hmmm. I'm actually wishing to do this from within a command I will write.
> Is there any reason I cannot use normal MVS functions such as LOAD to find
> a particular FOO and then pass my own "constructed" CPPL:
>
> CPPLCBUF: Pointer to a buffer in my program containing H'21',H'4',C'FOO
> SOME OPERANDS'
> CPPLUPT: Copied from my entry CPPL.
> CPPLPSCB: Copied from my entry CPPL.
> CPPLECT: Copied from my entry CPPL.
>
> Will that work (assuming no screw-ups) or is there some "magic" that TSO
> performs for a CP that will be missing if I do a LOAD and BASSM or BALR? I
> was thinking there was (some TSO magic necessary) but perhaps there is not?
>
> Note: all unauthorized. No APF considerations here.
>
> Thanks again,
>
> Charles
>
> ----------------------------------------------------------------------
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to [email protected] with the message: INFO IBM-MAIN
>



-- 
OREXXMan

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

Reply via email to