On Fri, Jun 30, 2017 at 11:52 AM, PINION, RICHARD W. <
[email protected]> wrote:

> I need a program or snippet of code that determines if the program is
> being executed from a TSO user or a batch job.
> FIRST TENNESSEE
>
>
​EXTRACT macro:
https://www.ibm.com/support/knowledgecenter/en/SSLTBW_2.1.0/com.ibm.zos.v2r1.ieaa200/iea3a2_Description6.htm
​

Perhaps something like:

         EXTRACT ANSWERS,'S',FIELDS=(TSO,PSB)
         LT    R5_32,@PSB
         JZ    NOTTSO  NOT TSO
         L     R4_32,@TSO
         CLI   0(R4_32),0
         JE    BATCH_TMP
* RUNNING TSO FOREGROUND
...
BATCH_TMP DS   0H
* RUNNING TSO IN BATCH
...
NOTTSO   DS    0H
* NOT TSO ADDRESS SPACE.
...
ANSWERS  DS    0F
@TSO     DS    A
@PSB     DS    A


​


-- 
Veni, Vidi, VISA: I came, I saw, I did a little shopping.

Maranatha! <><
John McKown

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

Reply via email to