home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky bit.listserv.ibm-main:2578 bit.listserv.asm370:169
- Newsgroups: bit.listserv.ibm-main,bit.listserv.asm370
- Path: sparky!uunet!uaisun4!mrl
- From: mrl@uai.com (Mark R. Ludwig)
- Subject: Using EXTRACT macro to detect execution under TSO
- Message-ID: <MRL.92Nov5152809@sun4.uai.com>
- Followup-To: poster
- Sender: mrl@uai.com (Mark R. Ludwig)
- Organization: Universal Analytics, Inc., Torrance (LA), CA
- Date: 5 Nov 92 15:28:09
- Lines: 73
-
- Several months ago, I asked how to determine, from Assembler, whether
- the program is executing under TSO. You collectively pointed me to
- the EXTRACT macro, which I've been using happily for months to do just
- that. Suddenly, it's not working, and I'm at a loss to explain why.
- I would appreciate any insight into what's wrong with the following
- code. That is, I want to know why I get a high-order byte of X'00' in
- TSOFLAG from EXTRACT when I execute the program from the terminal!
-
- (On the off chance that a guru's reading and it actually means
- something, the rest of TSOFLAG is X'B0E6B1'.)
-
- O o
- X
- --------------------------------------/-\--------------------------------------
- SPACE
- R0 EQU 0
- R1 EQU 1
- R2 EQU 2
- R3 EQU 3
- R4 EQU 4
- R5 EQU 5
- R6 EQU 6
- R7 EQU 7
- R8 EQU 8
- R9 EQU 9
- R10 EQU 10
- R11 EQU 11
- R12 EQU 12
- R13 EQU 13
- R14 EQU 14
- R15 EQU 15
- SPACE
- TESTTERM CSECT
- SAVE (14,12),T,*
- *
- BALR R12,0
- USING *,R12
- *
- OPEN (SNAPDCB,(OUTPUT))
- SNAP DCB=SNAPDCB,ID=0
- *
- EXTRACT TSOFLAG,'S',FIELDS=(TSO) Get flag indicating TSO
- TM TSOFLAG,TSOYES
- BO TSO
- *
- L R5,TSOFLAG
- LA R6,TSOYES
- SNAP DCB=SNAPDCB,PDATA=REGS,ID=1
- *
- TSO DS 0H
- RETURN (14,12),T
- *
- DROP
- *
- LTORG
- *
- TSOFLAG DC F'-1' Flag indicating presence of TSO
- TSOYES EQU B'10000000' Flag value meaning TSO is present
- *
- SNAPDCB DCB DSORG=PS,RECFM=VBA,MACRF=(W),BLKSIZE=882,LRECL=125, +
- DDNAME=SNAPOUT
- END
- --------------------------------------\-/--------------------------------------
- X
- O o
-
- On the assumption that I have done something wrong (which has waited
- until this most inopportune time to fail), please reply directly, and
- I'll summarize if there's interest.$$
- --
- INET: mrl@uai.com NIC: ML255 ICBM: USA; Lower Left Coast
- "A computer is one of life's joys; it follows simple rules. Just like
- children, adults need toys, only we like to call them 'tools.'" -- Dave Ross
-