/*-------------------------------REXX---------------------------------*/ /* Name: WHERE */ /* Function: Give TSO users vital system information (where they are) */ /* Originally this exec was used to differentiate a Y2k */ /* system from the production pre-Y2k system. This exec */ /* is nice to use when there are duplicated or mirrored */ /* systems at a site and the only way to tell the systems */ /* apart is by the CPU serial number. In the configure */ /* section below describes the alternate system as the Y2k */ /* system, this literal can be changed to any name you like */ /* or you can just leave this exec the way it is and it */ /* will default to the system SMFID in the display. */ /* Caller: From TSO command line or ISPF command line */ /* Example: TSO WHERE */ /* Created: 12/11/97 - Dave Francis - Protech PTS (Consultant) */ /* */ /* Configure: Replace '?????' to the unique 5 digits of the Y2k */ /* system CPU serial number. (Line 43 below) */ /*--------------------------------------------------------------------*/ /*--------------------------------------------------------------------*/ /* Start of exec (error handling and argument passing) */ /*--------------------------------------------------------------------*/ trace n signal on syntax name error_routine signal on error name error_routine signal on halt name halt_routine parse source . . execname . dsn . parse upper arg debug +0 'DEBUG' +5 . if debug = 'DEBUG' then trace i /*--------------------------------------------------------------------*/ /* TPUT to the TSO user all local information */ /*--------------------------------------------------------------------*/ main_logic: say 'You are: ' sysvar('sysuid') say 'Your Logon Proc: ' sysvar('sysproc') numeric digits 10 smfid=storage(d2x(c2d(storage(d2x(c2d(storage('10',4))+196),4))+16),4) numeric digits 9 pccavt = storage(c2x(storage(d2x(c2d(storage(10,4))+764),4)),64) parse var pccavt @pcca 5 rest if substr(storage(d2x(c2d(@pcca)+4),12),4,5) = '?????' then do smfid = 'Y2K SYSTEM' end say ' ' say 'You are on system: ' smfid say ' ' current_date = date('w') date('m') word(date(),1)',' word(date(),3) say 'Current Date: ' current_date say 'Current Time: ' time() say ' ' say 'JES Node name: ' sysvar('sysnode') say ' ' if mvsvar('sysmvs') >= 'SP4.1.0' then do say 'SYSPLEX Name: ' mvsvar('sysplex') end if mvsvar('sysmvs') >= 'SP5.2.0' then do say 'SYSCLONE name: ' mvsvar('sysclone') end say ' ' say 'MVS Version: ' storage(d2x(c2d(storage(10,4))-40),8) say ' ' say 'Enabled CPUs:' do i = 0 to 15 if @pcca <> '00000000'x then say ' CPU' right(i,2,'0') '=' storage(d2x(c2d(@pcca)+4),12) parse var rest @pcca 5 rest end call exit /*--------------------------------------------------------------------*/ /* Error processing routine */ /*--------------------------------------------------------------------*/ error_routine: trace n say 'DCA0911E - REXX ERROR OCCURRED IN: 'execname' ON LINE 'sigl call exit /*--------------------------------------------------------------------*/ /* Halt processing routine */ /*--------------------------------------------------------------------*/ halt_routine: trace n say 'DCA0900W - REXX: 'execname' HALTED' do while queued() > 0 pull end call exit /*--------------------------------------------------------------------*/ /* Exit and return to caller (end of exec) */ /*--------------------------------------------------------------------*/ exit: exit