Hello,
the documentation for classic rexx was written way before the current realease of RexxUtil and the support for decimal numbers instead of full seconds (integer) was therefore not even thought of in that release.
RexxUtil that come with eCS is at the level of Object Rexx and therefore contain alot of extra neat stuff that you can need to read about in either the Object Rexx help or Rexx Tips & Tricks.
Regarding queues, Yes, the output can be read line by line with something like
/* Clear session queue in case it contain "garbage" from a previous run */
'@rxqueue SESSION /CLEAR'
/* Try to determine the scanner, send output to the app rexxqueue, that place it in the rexx queue */
'@scanimage -L | rxqueue SESSION /FIFO'
/* Read the first line from the rexx queue */
parse value LINEIN( 'QUEUE:' ) with 'device `'cfg.device"' is a" cfg.scanner.manufacturer cfg.scanner.name cfg.scanner.model cfg.scanner.type 'scanner'
//Jan-Erik
Correct... 5 decimal digits are safe in eCS and WSeB and MCP and ACP for any version of REXX included (CREXX or OREXX). Someplace I have a post on the subject. Exceeding a certain number of digits after the decimal place will make CREXX or OREXX treat the number as a zero, meaning the SysSleep statement will not do anything at all. The number is 6 or 7 depending on REXX version, thus I stick with 5 or less digits to ensure proper program operation.
This of course will create problems with older versions of CREXX (ie: on older OS/2 installs such as base Warp 4 no FP and Warp 3 or OS/2 2.0) where it will not accept a decimal number and the smallest number usable is 1 (as in one second). Determination can be made of such capabilities by querying the REXX or REXXUTIL version and then setting a "MinimalWait" variable to either 1 or to some decimal number, then using that variable in any "wait as short a period as possible" SysSleep statement.
An example (
NOT actual code - dont have the time to write such now) is this:
/* At Top Section of REXX program */
RxVer=CheckRexxVersion()
If RxVer>=BetterRexxUtilVerNumber Then
MinimalWait=.01
Else
MinimalWait=1
/* Someplace below in main code or function calls */
Do Something (Loop, etc)
Some instruction(s)
rtc=SysSleep(MinimalWait)
End (Loop, etc)
Do MoreStuff (Loop, etc)
Some instruction(s)
rtc=SysSleep(MinimalWait)
End (Loop, etc)
In each, MinimalWait will be properly defined determined by REXX version, and then whenever used, will ensure a compatible, working number is sent to SysSleep.
Which version support what? Notta clue. I dont have any older REXX installations running. One would have to find the version numbers and subsitute it in the psuedo-code above where "
BetterRexxUtilVerNumber" is located.
But basically, it is that easy.