If you're using WPS-related code in your STARTUP.CMD, you should use the following code (or use the function SysWaitForShell from the new REXXUTIL DLL) to wait until the WPS is up:
call rxFuncAdd 'SysLoadFuncs', 'REXXUTIL', 'SysLoadFuncs'
call SysLoadFuncs
rc = SysIni('USER', 'PM_InstallObject', 'ALL:', 'stem')
do while rc \= 'ERROR:'
call SysSleep 2
rc = SysIni('USER', 'PM_InstallObject', 'ALL:', 'stem')
end /* do while rc \= 'ERROR:' */
/* add WPS related code here */