OnDemand User Group

Tips and Tricks => Tips and Tricks => Topic started by: Ed_Arnold on May 25, 2011, 11:08:14 AM

Title: On z/OS, how can you prove whether you're executing within a USERMOD?
Post by: Ed_Arnold on May 25, 2011, 11:08:14 AM
The absolute simplest method I know of is to put a WTO somewhere within the assembler code.

For example, I have stuck the following at an arbitrary point in the middle of the ARSUSECX code:

                             
         WTO   'Ed Arnold  ' Write To Operator     
         WTO   'says that  ' Write To Operator     
         WTO   'YOU ARE IN ' Write To Operator     
         WTO   'ARSUSEX1   ' Write To Operator     
         WTO   'RIGHT NOW  ' Write To Operator   

I stuck it right in the middle of the inits:

INIT200  DC    0H'0'                                           
         WTO   'Ed Arnold  ' Write To Operator                 
         WTO   'says that  ' Write To Operator                 
         WTO   'YOU ARE IN ' Write To Operator                 
         WTO   'ARSUSEX1   ' Write To Operator                 
         WTO   'RIGHT NOW  ' Write To Operator                 
         LA    R0,WKSIZE(,0)            Load the workarea length

and you get in the SYSLOG:

STC02415 00000010  Ed Arnold   
STC02415 00000010  says that   
STC02415 00000010  YOU ARE IN   
STC02415 00000010  ARSUSEX1     
STC02415 00000010  RIGHT NOW   

Yeah, it looks hokey, but it's quick and easy.