code: private static int getPID()
      {
          if (tc.isEntryEnabled())
              Tr.entry(tc, "getPID");
  
          short spid = 0;
          int ipid = 0;
  
          try
          {
              spid = Short.parseShort(com.ibm.ejs.ras.RasHelper.getProcessId());
          } catch (Throwable t)
          {
              // No FFDC code needed.
  
              if (tc.isEventEnabled())
                  Tr.event(tc, "Caught throwable parsing PID", t);
              spid = (short) (new java.util.Random().nextInt() & 0x0000FFFF); // (i.e. keep 16 bits)
          }
  
          // Convert the spid value (a 16 bit short that could be posivive or negative)
          // into an integer without allowing java to perform sign extension. This is required
          // as the value will be bit-wise ORed onto a larger structure during the
          // generation of individual UUIDs. If the number was negative then the sign extension
          // would cause the two most significant bytes to be FF and this would damage the
          // larger structure (these bytes MUST be 00)
          ipid = (spid & 0x0000FFFF);
  
          if (tc.isEntryEnabled())
              Tr.exit(tc, "getPID", Integer.valueOf(ipid));
  
          return ipid;
      }
docs: /* ------------------------------------------------------------------------