If I may make an alternate suggestion, assuming your program is already 
LE-enabled (HLL or LE-enabled assembler) there is the CEEINF LE callable 
subroutine which returns a fullword of flags where the bits tell you where you 
are executing:

0 Currently executing in the CICS environment
1 Currently executing in a CICS_PIPI environment
2-3 Reserved for other specific CICS environments
4 Currently executing in a TSO environment
5 Currently executing in a Batch environment
6 Currently executing in a z/OS UNIX environment
7-28 Reserved for future use
29 Currently executing on z/VSE(r)
30 Currently executing on z/OS
31 Reserved.

HTH

Peter

-----Original Message-----
From: IBM Mainframe Discussion List [mailto:[email protected]] On Behalf 
Of PINION, RICHARD W.
Sent: Friday, June 30, 2017 3:53 PM
To: [email protected]
Subject: Re: Assembler program

Thanks to everyone who replied.  I used John McKown's example.

-----Original Message-----
From: IBM Mainframe Discussion List [mailto:[email protected]] On Behalf 
Of Jousma, David
Sent: Friday, June 30, 2017 3:00 PM
To: [email protected]
Subject: Re: Assembler program

Here is a program I wrote last millennium.  Not saying it's the best, but it 
worked at the time.  

<Snipped contributed program>

-----Original Message-----
From: IBM Mainframe Discussion List [mailto:[email protected]] On Behalf 
Of PINION, RICHARD W.
Sent: Friday, June 30, 2017 12:52 PM
To: [email protected]
Subject: Assembler program

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

--

This message and any attachments are intended only for the use of the addressee 
and may contain information that is privileged and confidential. If the reader 
of the message is not the intended recipient or an authorized representative of 
the intended recipient, you are hereby notified that any dissemination of this 
communication is strictly prohibited. If you have received this communication 
in error, please notify us immediately by e-mail and delete the message and any 
attachments from your system.

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

Reply via email to