In OS/2 WARP 4 you can use the new setup string MENUITEMSELECTED to force a lockup of the desktop:
/* ------------------------------------------------------------------ */
/* LOCKUP.CMD - force a desktop lockup now */
/* */
/* (only possible in WARP 4!!! */
/* */
call rxFuncAdd 'SysSetObjectData', 'REXXUTIL', 'SysSetObjectData'
call rxFuncAdd 'SysOS2Ver', 'REXXUTIL', 'SysOS2Ver'
if SysOS2Ver() < 2.40 then
do
say 'Sorry, this program needs WARP 4 or above!'
exit 255
end /* if SysOS2Ver() < 2.40 then */
call SysSetObjectData '<WP_DESKTOP>', 'MENUITEMSELECTED=705;'
exit 0