Mark,

We've been using this little program every since we moved our computer to LPARs at least 6 years ago-- and added a program that uses that technique around then.

Many of our programs check to see if they're on our production or test system. We used to retrieve the system serial number. This fails on an LPAR-- all of the systems have the same serial number!

We modified this program to return the system serial number (7 chars) concatenated with a single digit for LPAR ID#. Since our systems compare the retrieved 'serial number' with a data area, changing things for new hardware is a snap!

of course, if we ever get more than 9 iSeries LPARS, all bets are off...

One question I have-- where does this 'dlpar_get_info' come from? Is that a system-level procedure?

--Paul E Musselman


At 7:43 PM +0000 2/3/21, Mark Waterbury wrote:
James,

If you just want to know the LPAR #, you can use this little CL program:

PGM DCL VAR(&RECEIVER) TYPE(*CHAR) LEN(256) DCL VAR(&FORMAT) TYPE(*CHAR) LEN(4) VALUE(X'00000001')
DCL VAR(&SIZE) TYPE(*CHAR) LEN(4) VALUE(X'00000100') DCL VAR(&LPARNBR) TYPE(*CHAR) LEN(10) CALLPRC PRC('dlpar_get_info') PARM((&RECEIVER) + (&FORMAT *BYVAL) (&SIZE *BYVAL)) CHGVAR VAR(&LPARNBR) VALUE(%BIN(&RECEIVER 41 4)) SNDPGMMSG MSG(&LPARNBR) TOPGMQ(*EXT) ENDPGM

Hope that helps,

Mark S. Waterbury

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.