Redo

Set Redo [ filename ]

(Default: none)

(Initially: temporary file)

Commands entered at the Qedit prompt are saved in something called the redo stack. You can recall commands from this stack by using other commands such as Before, Do and Redo. By default, the redo stack is stored in a temporary file and discarded as soon as you exit Qedit. This does no allow the stack to be preserved across Qedit invocations.

Set Redo allows you to assign a permanent file as the redo stack, allowing the stack to be available for future Qedit invocations. To assign the Myredo file as a persistent redo stack, enter

  /Set Redo Myredo  

If the file does not exist, Qedit creates it. Otherwise, Qedit uses the existing file. All your subsequent commands are written to the persistent redo stack. The setting is valid for the duration of the Qedit session. As soon as you exit Qedit, the setting is discarded. Next time you run Qedit, you will get the temporary stack. If you want to use a persistent stack every time you run Qedit, you have to insert the Set Redo command in one of the Qeditmgr files.

If the file name is not qualified, the redo stack is created in the logon group and account. This may be desirable if you want to have separate stacks. If you prefer to always use the same persistent stacks, you should qualify the name.

The Verify command shows which stack is currently in use. If it shows <temporary>, then Qedit is using the default stack. Anything else is the name of the file used on the Set Redo command.

Concurrency

When Qedit uses the default, the temporary stack is only accessible to that particular instance of Qedit. You can run as many Qedit instances as you need, and each one gets its own redo stack. You will never have concurrency problems.

If you start using a persistent redo stack, however, you might start running into concurrency problems. A persistent redo stack can be used only by one Qedit instance at a time. If you try to use a persistent redo stack that is already in use, you will get the following message:

  /Set Redo Myredo  EXCLUSIVE VIOLATION: FILE BEING ACCESSED  (FSERR 90)  Unable to open file for REDO stack  

In this situation, Qedit continues to use the redo stack active at the time and lets you continue working as normal.

Suprtool, STExport and Suprlink also have the ability to have permanent redo stacks. It is advisable to have separate redo stacks for each product, because they will write commands to each other’s redo stack if you supply the same file name.

For example if you use the command

  set redo myredo  

you will have a redo stack called Myredo for your Qedit commands. If you exit Qedit and run Suprtool and supply the same Set Redo command, your Suprtool commands will be written to the same file that is used for your Qedit commands.

By default Qedit builds a permanent redo stack that contains 1,000 commands. If you require a larger redo stack, you can specify its size by using a file equation prior to the Set Redo command.

  file myredo;disc=10000  set redo myredo  

This will only be in effect the first time that the redo stack is built; subsequent file commands will not affect the size of the redo file. You can make the file bigger by using tools such as MPEX’s %altfile command, or by building a larger file and copying your current redo stack into it.

This command is ignored when Qedit is run in server mode.

Redo