home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / bit / listserv / ibmmain / 2578 < prev    next >
Encoding:
Internet Message Format  |  1992-11-07  |  2.7 KB

  1. Xref: sparky bit.listserv.ibm-main:2578 bit.listserv.asm370:169
  2. Newsgroups: bit.listserv.ibm-main,bit.listserv.asm370
  3. Path: sparky!uunet!uaisun4!mrl
  4. From: mrl@uai.com (Mark R. Ludwig)
  5. Subject: Using EXTRACT macro to detect execution under TSO
  6. Message-ID: <MRL.92Nov5152809@sun4.uai.com>
  7. Followup-To: poster
  8. Sender: mrl@uai.com (Mark R. Ludwig)
  9. Organization: Universal Analytics, Inc., Torrance (LA), CA
  10. Date: 5 Nov 92 15:28:09
  11. Lines: 73
  12.  
  13. Several months ago, I asked how to determine, from Assembler, whether
  14. the program is executing under TSO.  You collectively pointed me to
  15. the EXTRACT macro, which I've been using happily for months to do just
  16. that.  Suddenly, it's not working, and I'm at a loss to explain why.
  17. I would appreciate any insight into what's wrong with the following
  18. code.  That is, I want to know why I get a high-order byte of X'00' in
  19. TSOFLAG from EXTRACT when I execute the program from the terminal!
  20.  
  21. (On the off chance that a guru's reading and it actually means
  22. something, the rest of TSOFLAG is X'B0E6B1'.)
  23.  
  24.                                       O o
  25.                                        X
  26. --------------------------------------/-\--------------------------------------
  27.          SPACE
  28. R0       EQU   0
  29. R1       EQU   1
  30. R2       EQU   2
  31. R3       EQU   3
  32. R4       EQU   4
  33. R5       EQU   5
  34. R6       EQU   6
  35. R7       EQU   7
  36. R8       EQU   8
  37. R9       EQU   9
  38. R10      EQU   10
  39. R11      EQU   11
  40. R12      EQU   12
  41. R13      EQU   13
  42. R14      EQU   14
  43. R15      EQU   15
  44.          SPACE
  45. TESTTERM CSECT
  46.          SAVE  (14,12),T,*
  47. *
  48.          BALR  R12,0
  49.          USING *,R12
  50. *
  51.          OPEN  (SNAPDCB,(OUTPUT))
  52.          SNAP  DCB=SNAPDCB,ID=0
  53. *
  54.          EXTRACT TSOFLAG,'S',FIELDS=(TSO) Get flag indicating TSO
  55.          TM    TSOFLAG,TSOYES
  56.          BO    TSO
  57. *
  58.          L     R5,TSOFLAG
  59.          LA    R6,TSOYES
  60.          SNAP  DCB=SNAPDCB,PDATA=REGS,ID=1
  61. *
  62. TSO      DS    0H
  63.          RETURN (14,12),T
  64. *
  65.          DROP
  66. *
  67.          LTORG
  68. *
  69. TSOFLAG  DC    F'-1'              Flag indicating presence of TSO
  70. TSOYES   EQU   B'10000000'        Flag value meaning TSO is present
  71. *
  72. SNAPDCB  DCB   DSORG=PS,RECFM=VBA,MACRF=(W),BLKSIZE=882,LRECL=125,     +
  73.                DDNAME=SNAPOUT
  74.          END
  75. --------------------------------------\-/--------------------------------------
  76.                                        X
  77.                                       O o
  78.  
  79. On the assumption that I have done something wrong (which has waited
  80. until this most inopportune time to fail), please reply directly, and
  81. I'll summarize if there's interest.$$
  82. -- 
  83. INET: mrl@uai.com           NIC: ML255           ICBM: USA; Lower Left Coast
  84. "A computer is one of life's joys; it follows simple rules.  Just like
  85.  children, adults need toys, only we like to call them 'tools.'" -- Dave Ross
  86.