On 19/09/2013 3:10 AM, Kirk Wolf wrote:
Minor suggestion;  should use:

         System.out.println( new String(cpuid,
ZFile.DEFAULT_EBCDIC_CODE_PAGE) );

otherwise, the default file.encoding is used, which is very often
"ISO8849-1" on z/OS


Yuk! Is that a general ROT? If so would it be a good idea to create a simple ZString class with a delegating constructor to add a dash of syntactic sugar?

Kirk Wolf
Dovetailed Technologies
http://dovetail.com


On Wed, Sep 18, 2013 at 12:08 PM, Denis Gäbler <[email protected]>wrote:

Hi Arye,

this will give you the CPUID from the first PCCA.

         long cvt = ZUtil.peekOSMemory(16, 4);
         long cvtpccat = ZUtil.peekOSMemory(cvt+764, 4);
         long pcca = ZUtil.peekOSMemory(cvtpccat + 0*4, 4);
         byte[] cpuid = new byte[12];
         ZUtil.peekOSMemory(pcca+4, cpuid, 0, 12);
         System.out.println(new String(cpuid));

Output Example:
FF1111112097

Matches D M=CPU Output:
RESPONSE=SYS1
  IEE174I 16.50.42 DISPLAY M 166
  PROCESSOR STATUS
  ID  CPU                  SERIAL
  00  +                     1111112097

Its z/OS dependent code. Hope it helps.



  Denis.



-----Original Message-----
From: Arye Shemer <[email protected]>
To: IBM-MAIN <[email protected]>
Sent: Tue, Sep 17, 2013 9:21 pm
Subject: Re: Get CPUID and srial number from JAVA code


Thank you guys,
I will consider all the options.

Thanks again,
Arye.


On 17 September 2013 18:54, Bernd Oppolzer <[email protected]
wrote:
I wrote an ANSI C function that fetched this information using
the callable service CSRSI (System Information Service),
so if nothing else helps, you should IMO be able to call this
using JNI.

Kind regards

Bernd



Am 17.09.2013 15:28, schrieb Arye Shemer:

Hi,

Has anyone know how I can get CPUID and machine serial number from JAVA
code ?

Is there a z/OS Java forum that I can get help on this issue ?

thanks,

Arye Shemer.

------------------------------**------------------------------**
----------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN


------------------------------**------------------------------**----------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN



----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to