REXX Tips & Tricks, Version 2.80


Inf-HTML [About][Toc][Index] 0.9b (c) 1995 Peter Childs


Release or hold a printer queue



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


  

Inf-HTML End Run - Successful