In OS/2 WARP 4 you can use the new setup string MENUITEMSELECTED to hold or release printer queue:
/* ------------------------------------------------------------------ */ /* release or hold a printer queue */ /* */ /* (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 */ /* object ID of the printer object */ printerID = '<WPPO_EpsonSty>' /* -------------- hold a printer queue ---------------------------- */ thisRC = SysSetObjectData( printerID, 'MENUITEMSELECTED=9004;' ) /* -------------- release a printer queue ------------------------- */ thisRC = SysSetObjectData( printerID, 'MENUITEMSELECTED=9005;' ) exit 0