View Single Post
Old 14 July 2015, 16:21   #56
BigFan
Registered User
 
BigFan's Avatar
 
Join Date: Feb 2014
Location: Germany
Posts: 261
Running from Workbench

Running REXX programs from Workbench.

The shell is a useful interface during development of rexx programs. Results show
up in current or additional consoles. You have all of the control over the rexx
programs running. But after testing your code thoroughly, you may like to see it
working in the background, but on every start from wb the rx output window pops
up. A rexx script doesn't need special protection bits. All you need is an icon.

  • Icon type must be "project".
  • Set "Default Tool" to "rx".
  • Add a new tooltype.
  • Enter "Console=NIL:"


The script starts silently from wb. It is still accessable and listens for any
message to come.
Rexx offers a few tools to share data with your program or to stop them.
See sektion "Signal on ..." and prepare your script for proper error handling.

Shell Commands:

HI - send a "Halt Interrupt" to all active rexx programs, forcing them to
exit immediately.

RXSET - send data to rexx clipboard. RXC test="testclip" copies "testclip" to
clipboard entry named 'test'. From within a rexx program access it via
"dat = Getclip(test)". RXSET without argument lists the clipboard entries in
shell window.

RXC
- closes the REXX resident process after the last rexx program exits.
Meanwhile, no new rexx programs can be started, except RexxMast is restarted.
Not recommended, but sometimes helpful, if a program calls other script in an
infinite loop, otherwise memory is getting low rapidly.

WaitforPort - 10 seconds delay. Result code shows an error if named port is not
listed. E.g.: "WaitforPort CATCH" after launching "rx catch" from shell or
"WaitforPort GOLDED.1" if the editor needs some time to get loaded
(slow harddrive, f.e.).
BigFan is offline  
 
Page generated in 0.07409 seconds with 11 queries