CMDTUX_CAT:122 Error configuring PeopleSoft Application Server

I just started working for a new client, and they have a very long domain name, and then the new servers they created for their new HR 9.1 environment were on a subdomain as well.  So the server name (LMID – logical machine ID) exceeds 30 characters in length, which happens to cause Tuxedo to get very angry.  I found the easy way to resolve this issue is by doing the following:

Step: 1
Add a new environment variable called PMID (physical machine id). The value I set to simply the machine name (without the domain).
export PMID=psappmachine1

Step: 2
Verify that there is a psappmachine1 reference in the hosts file so that the IP can resolve
more /etc/hosts

Step: 3
Change the psappsrv.ubx file that is in the $PS_HOME/appserv directory. Change all references to {MACH} to the value of PMID, making sure that the case matches exactly.
vi psappsrv.ubx
:%s/{MACH}/psappmachine1/g

Step: 4
Build a new domain for the application server and there should be no CMDTUX_CAT:122 or 868 errors.