--------------------------------------------------------
The information contained in this message is intended only for the recipient, and may be a confidential attorney-client communication or may otherwise be privileged and confidential and protected from disclosure. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, please be aware that any dissemination or copying of this communication is strictly prohibited. If you have received this communication in error, please immediately notify us by replying to the message and deleting it from your computer. The McGraw-Hill Companies, Inc. reserves the right, subject to applicable local law, to monitor and review the content of any electronic message or information sent to or from McGraw-Hill employee e-mail addresses without informing the sender or recipient of the message.
--------------------------------------------------------
Try this -
/* rexx */
trace OFF
'EXECIO 1 CP (VAR IPSERNUM STRING Q CPUID';
if substr(IPSERNUM,9,2) = 'FF';then say 'Running in a virtual machine';
say 'We are running in LPAR - 'substr(IPSERNUM,11,2);
say 'The processor serial number is - 'substr(IPSERNUM,13,4);
exit;
Ready; T=0.01/0.01 16:32:23
cpuid
Running in a virtual machine
We are running in LPAR - 16
The processor serial number is - AC8E
Ready; T=0.01/0.01 16:32:29
HITACHI
DATA SYSTEMS
Raymond E. Noal
Senior Technical Engineer
Office: (408) 970 - 7978
-----Original Message-----
From: TSO REXX Discussion List [mailto:TSO-...@VM.MARIST.EDU] On Behalf Of Dave Salt
Thank you VERY much for your REXX sample! I just ran it on my z/OS 1.9 machine and the EXECIO statement failed with this message:
IRX0603E EXECIO "operation" positional parameter is not valid. Specify DISKR, DISKRU, or DISKW.
I'm guessing it's because "EXECIO 1 CP" is something that will only run on VM? If that's the case, I'd need to make sure this statement in my REXX procedure only executes if I'm on a virtual machine. Otherwise, the above error message would be displayed and there doesn't seem to be any way I can stop it.
Looking at your REXX code, I see that if the IPSERNUM is 'FF', this means it's a virtual machine. Is this the same indicator that's returned by the first 2 characters in the SYSCPUS variable? For example, my customer said that when he runs this REXX code:
cpurc = syscpus("cpus_stem.")
say cpus_stem.1
He sees this result: FF0000002084
Note that the first 2 characters are 'FF'; does this indicate for sure that he's on a virtual machine? If so, would the following code identify the CPU serial number for both regular and virtual machines?
cpurc = syscpus("cpus_stem.")
if left(cpus_stem.1,2) = "FF" then do
"EXECIO 1 CP (VAR IPSERNUM STRING Q CPUID)"
say "The processor serial number is "substr(ipsernum,13,4)
end
else say "The processor serial number is "substr(cpus_stem.1,5,4)
Note that I've tested the above on my z/OS machine, and it correctly returns the serial number. But I don't have a virtual machine to test on, so there's no way for me to be sure this would work on a virtual machine. Could you or anyone else on this list please confirm that the above code would work on both a virtual and regular machine?
Thanks again for your help with this!
Dave Salt
See the new SimpList(tm) rollover image at:
http://www.mackinney.com/products/SIM/simplist.htm
> Date: Wed, 9 Jul 2008 16:34:06 -0700
> From: Raymon...@HDS.COM
> Subject: Re: How to determine the CPU serial number
> To: TSO-...@VM.MARIST.EDU
_________________________________________________________________
Mark Zelden has a nice exec that shows all the CPU serial numbers plus a bunch more information. It is called IPLINFO.
http://home.flash.net/~mzelden/mvsutil.html
RESPONSE=ZMVS
IEE174I 15.41.51 DISPLAY M 914
PROCESSOR STATUS
ID CPU SERIAL
00 + 07B77A2094
01 + 07B77A2094
02 + 07B77A2094
03 + 07B77A2094
04 + 07B77A2094
05 + 07B77A2094
06 +I 07B77A2094
07 +A 07B77A2094
08 +A 07B77A2094
CPC ND = 002094.S18.IBM.02.00000004B77A
CPC SI = 2094.714.IBM.02.000000000004B77A
CPC ID = 00
+ ONLINE - OFFLINE . DOES NOT EXIST W WLM-MANAGED
N NOT AVAILABLE
A APPLICATION ASSIST PROCESSOR (zAAP)
I INTEGRATED INFORMATION PROCESSOR (zIIP)
CPC ND CENTRAL PROCESSING COMPLEX NODE DESCRIPTOR
CPC SI SYSTEM INFORMATION FROM STSI INSTRUCTION
CPC ID CENTRAL PROCESSING COMPLEX IDENTIFIER
I'm sure a peek at the control block that Mark uses in his IPLINFO would tell.
-----Original Message-----
From: TSO REXX Discussion List [mailto:TSO-...@VM.MARIST.EDU] On Behalf Of Dave Salt
Sent: 10. heinäkuuta 2008 5:19
The customer said that when they run this:
cpurc = syscpus("cpus_stem.")
say cpus_stem.1
They see this: FF0000002084
Note that it's all zeroes where the CPU serial number is supposed to be. I'm wondering if the 'FF' at the start indicates they're running under z/VM instead of z/OS? If so, at least I'll have a way to tell what type of system they're on, and then perhaps be able to take a different logic path to determine their CPU serial number. So, this brings up 2 questions:
1) Can anyone confirm if the leading 'FF' returned by the SYSCPUS system variable indicates z/VM?
2) If z/OS is being run under z/VM, does anyone know how to get the CPU serial number?
Thanks!
Dave Salt
See the new SimpList(tm) rollover image at:
http://www.mackinney.com/products/SIM/simplist.htm
_________________________________________________________________
Try Chicktionary, a game that tests how many words you can form from the letters given. Find this and more puzzles at Live Search Games!
http://g.msn.ca/ca55/207
It's been many years since I was in a VM world with guest OSes, but when
I was, it was pointed out to me that the CPU id was, in fact, marked
with x'FF' as the high order byte to indicate that the OS was a guest
beneath VM.
Given your client's results, I suspect this has not changed. I would,
however, hope that someone with more current knowledge than I can
confirm or refute this.
Good Luck,
Chuck
<snip>
The customer said that when they run this:
cpurc = syscpus("cpus_stem.")
say cpus_stem.1
They see this: FF0000002084
</snip>
-----Original Message-----
From: TSO REXX Discussion List [mailto:TSO-...@VM.MARIST.EDU] On Behalf Of Dave Salt
Sent: 10. heinäkuuta 2008 17:51
To: TSO-...@VM.MARIST.EDU
Subject: Re: [TSO-REXX] How to determine the CPU serial number
-----Original Message-----
From: TSO REXX Discussion List [mailto:TSO-...@VM.MARIST.EDU] On Behalf
Of Dave Salt
Sent: Thursday 10 July 2008 07:51
To: TSO-...@VM.MARIST.EDU
Subject: Re: [TSO-REXX] How to determine the CPU serial number
They see this: FF0000002084
Thanks!
Dave Salt
--------------------------------------------------------
The information contained in this message is intended only for the recipient, and may be a confidential attorney-client communication or may otherwise be privileged and confidential and protected from disclosure. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, please be aware that any dissemination or copying of this communication is strictly prohibited. If you have received this communication in error, please immediately notify us by replying to the message and deleting it from your computer. The McGraw-Hill Companies, Inc. reserves the right, subject to applicable local law, to monitor and review the content of any electronic message or information sent to or from McGraw-Hill employee e-mail addresses without informing the sender or recipient of the message.
--------------------------------------------------------
----------------------------------------------------------------------
Hi Raymond,
Dave Salt
_________________________________________________________________
--------------------------------------------------------
The information contained in this message is intended only for the recipient, and may be a confidential attorney-client communication or may otherwise be privileged and confidential and protected from disclosure. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, please be aware that any dissemination or copying of this communication is strictly prohibited. If you have received this communication in error, please immediately notify us by replying to the message and deleting it from your computer. The McGraw-Hill Companies, Inc. reserves the right, subject to applicable local law, to monitor and review the content of any electronic message or information sent to or from McGraw-Hill employee e-mail addresses without informing the sender or recipient of the message.
--------------------------------------------------------
----------------------------------------------------------------------
Thanks for the clarification regarding the QUERY CPUID command. As I don't have access to z/VM, someone tried the command for me on their z/VM machine and it failed. Another poster suggested an assembler solution, and I might follow up on that if I can't do what I want in REXX, so thanks to Bill for suggesting it. But meanwhile I've come up with the following REXX and it seems to work in both a z/OS and z/VM environment:
/* REXX to display 4 digit CPU serial number */
CVT = C2d(Storage(10,4))
CVTHID = C2d(Storage(D2x(CVT + 1068),4))
CPUNUM = Storage(D2x(CVTHID+48),4)
say "CPU serial number = "cpunum
This has only been tested by 1 person, but the indication was that it correctly returned the CPU serial number. If anyone else has a machine where z/OS is running as a guest under z/VM, I'd really appreciate it if you could try the above and let me know if it works.
Thanks!
Dave Salt
See the new SimpList(tm) rollover image at:
http://www.mackinney.com/products/SIM/simplist.htm
> Date: Thu, 10 Jul 2008 08:54:58 -0700
> From: Rober...@CTB.COM