> -----Original Message----- > From: IBM Mainframe Assembler List > [mailto:[email protected]] On Behalf Of Scott Bennett > Sent: Friday, August 20, 2010 10:10 AM > To: [email protected] > Subject: How can I best determine if assembler is running > under batch or uss > > I am interested in hearing what others have done to determine if your > assembler code is being called from a standard batch job step > vs. being > called from a USS shell command. > > My plan is to have a single assembler program that will > either write his > output to SYSOUT (using CEEMOU) or STDOUT (using BPX1WRT) > based on some > information that would indicate if the program is running > under USS or not. > > Thanks in advance for you help.
Well, you can test to see if you are "dubbed" as a UNIX process using BPX1QDB. If not, then you aren't running from a UNIX shell. Then, you can check to see if file description 1 (stdout) is allocated to a terminal, or even allocated at all using BPX1FST. BPX1QDB, aka "querydub": http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/BPXZB190/2.148 BPX1FST, aka "fstat": http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/BPXZB190/2.43 Note that just having fd1 "open" does not mean you are running on a UNIX shell or not. If you really need to know if stdout is allocated to a terminal, look at BPX1ITY (istty). http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/BPXZB190/2.85 -- John McKown Systems Engineer IV IT Administrative Services Group HealthMarkets(r) 9151 Boulevard 26 * N. Richland Hills * TX 76010 (817) 255-3225 phone * (817)-691-6183 cell [email protected] * www.HealthMarkets.com Confidentiality Notice: This e-mail message may contain confidential or proprietary information. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message. HealthMarkets(r) is the brand name for products underwritten and issued by the insurance subsidiaries of HealthMarkets, Inc. -The Chesapeake Life Insurance Company(r), Mid-West National Life Insurance Company of TennesseeSM and The MEGA Life and Health Insurance Company.SM
