Yes, I do the same. It is fairly simple thing to do from a REXX program (the SIR command will tell you the CPU ID, both read and virtual). I've written an assembler program to retrieve some of the basic OS information to a variable, which in turn can be used to set a SYSTEM variable. (We typically use the Virtual Machine name, rather than the CPUID)
***********************************************************************
* SYVAR001: Sets various system variables based on system information *
* (see below). *
* *
* // EXEC SYVAR001,PARM='info1 info2 info3 ...' *
* *
* Where Information type is: *
* Af = Advanced functions version SY$AF *
* Date = Standard date in mm/dd/yy SY$DATE *
* DAT6 = mmddyy SY$DAT6 *
* DAT8 = yyyymmdd SY$DAT8 *
* DAT1{0} = yyyy-mm-dd SY$DAT1 *
* Jnm = z/VSE job name SY$JNM *
* Lpar = LPAR name or 8 spaces SY$LPAR *
* LPAR# = LPAR number SY$LPR# *
* Name = Either VM name or LPAR name SY$NAME *
* Pid = Partition identifier SY$PID *
* PJnm = POWER/VSE job name SY$PJNM *
* PJNO = POWER/VSE job number SY$PJNO *
* Rcpu = Real CPU (12-digit) SY$RCPU *
* RCPU6 = Real CPU (6-digit) SY$RCP6 *
* Time = Current time hh:mm:ss SY$TIME *
* TIM6 = Current time hhmmss SY$TIM6 *
* Vcpu = Virtual CPU (12-digit) SY$VCPU *
* VCPU6 = Virtual CPU (6-digit) SY$VCP6 *
* VSe = VSE version information SY$VSE *
* VM = VM version information SY$VM *
* VMU = VM user name (or spaces) SY$VMU *
Frank M. Ramaekers Jr.