				RS016				Page 1

		    RSTS/E Swap Console SYS Call

			   Bruce L. Gaarder
			The Gaarder Group, Inc.
			 1711 Highland Parkway
			  St. Paul, MN  55116

----------------------------------------------------------------------

Overview 

o  A very simple SYS call which can avoid CHAINing between applications.

o  Executing the Swap Console SYS call detaches the current executing job
   and attaches a detached job to the console terminal.

o  Use is limited to systems that have extra job slots available.

o  Saves a lot of time when the programs have high start-up overhead,
   such as opening a lot of files and reading from them.

o  What programming is needed?

   o  Each program needs a special input routine to detect that the swap
      is desired.

   o  The first program needs to spawn the second, or have some way of
      finding out which job to swap with.

   o  The second job needs a way of finding out which job swapped with
      it, if it is not spawned.

   o  You probably need privileges to kill off the detached job when it
      is time to exit.

----------------------------------------------------------------------
                                                                                                                                                                                                                                                                                                                                                          