Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!mit-eddie!ll-xn!ames!ucbcad!ucbvax!NMFECC.ARPA!KARNEY%PPC.MFENET From: KARNEY%PPC.MFENET@NMFECC.ARPA Newsgroups: comp.os.vms Subject: BOSS interactive job controller source (part 1 of 2) Message-ID: <870825083013.00i@NMFECC.ARPA> Date: Tue, 25-Aug-87 11:30:13 EDT Article-I.D.: NMFECC.870825083013.00i Posted: Tue Aug 25 11:30:13 1987 Date-Received: Thu, 27-Aug-87 02:26:29 EDT Sender: daemon@ucbvax.BERKELEY.EDU Organization: The ARPA Internet Lines: 157 Here is a program I wrote to allow VMS users to run several interactive jobs simultaneously. BOSS lets you create up to 8 processes. One of these processes is `current'. This means that what you type is sent to that process, and output from that process is sent to your terminal. A process which is not current can run but cannot do output. You can make some other process current by typing control-\ followed by an identifying letter. BOSS requires that you have Pseudo TTYs installed. Charles Karney Plasma Physics Laboratory Phone: 609/683-2607 Princeton University MFENet: Karney@PPC.MFENET PO Box 451 ARPANet: Karney%PPC.MFENET@NMFECC.ARPA Princeton, NJ 08544-0451 Bitnet: Karney%PPC.MFENET@ANLVMS.BITNET ....................... Cut between dotted lines and save ...................... $!.............................................................................. $! VAX/VMS archive file created by VMS_SHAR V-4.03 05-Aug-1987 $! which was written by Michael Bednarek (U3369429@ucsvc.dn.mu.oz.au) $! To unpack, simply save and execute (@) this file. $! $! This archive was created by KARNEY $! on Tuesday 25-AUG-1987 11:03:30.41 $! $! ATTENTION: To keep each article below 15872 bytes, this program $! has been transmitted in 2 parts. $! You should concatenate ALL parts to ONE file and execute (@) that file. $! $! It contains the following 2 files: $! BOSS.HLP BOSS.C $!============================================================================== $ Set Symbol/Scope=(NoLocal,NoGlobal) $ Version=F$GetSYI("VERSION") ! See what VMS version we have here: $ If Version.ges."V4.4" then goto Version_OK $ Write SYS$Output "Sorry, you are running VMS ",Version, - ", but this procedure requires V4.4 or higher." $ Exit 44 $Version_OK: CR[0,8]=13 $ Pass_or_Failed="failed!,passed." $ Goto Start $Convert_File: $ Read/Time_Out=0/Error=No_Error1/Prompt="creating ''File_is'" SYS$Command ddd $No_Error1: Define/User_Mode SYS$Output NL: $ Edit/TPU/NoSection/NoDisplay/Command=SYS$Input/Output='File_is' - VMS_SHAR_DUMMY.DUMMY f:=Get_Info(Command_Line,"File_Name");b:=Create_Buffer("",f); o:=Get_Info(Command_Line,"Output_File");Set (Output_File,b,o); Position (Beginning_of(b));Loop x:=Erase_Character(1); Loop ExitIf x<>"V"; Move_Vertical(1);x:=Erase_Character(1);Append_Line;Move_Horizontal (-Current_Offset);EndLoop;Move_Vertical(1);ExitIf Mark(None)=End_of(b) EndLoop;Exit; $ Delete VMS_SHAR_DUMMY.DUMMY;* $ Checksum 'File_is $ Success=F$Element(Check_Sum_is.eq.CHECKSUM$CHECKSUM,",",Pass_or_Failed)+CR $ Read/Time_Out=0/Error=No_Error2/Prompt=" CHECKSUM ''Success'" SYS$Command ddd $No_Error2: Return $Start: $ File_is="BOSS.HLP" $ Check_Sum_is=1796768615 $ Copy SYS$Input VMS_SHAR_DUMMY.DUMMY X1 BOSS XBOSS is an interactive job controller. It lets you run several interactive Xjobs simultaneously. Before running BOSS put X X $ boss :== $usr:[utility]boss X Xinto your login.com file. In order to run BOSS type X X $ boss X XBOSS was written by Charles Karney based on the PHOTO program written by Asbed XBedrossian of USC. It utilizes the Pseudo TTY package of Kevin Carosso of XHughes Aircraft Co. X XBugs, questions, etc. to Charles Karney (Karney@PPC). X2 Description XBOSS lets you create up to 8 processes each of which is identified by a Xsingle letter (A thru Z). This letter is used in the process name and in Xthe DCL prompt. At most one of these processes is `current'. This means Xthat what you type is sent to that process, and output from that process is Xsent to your terminal. A process which is not current can run but cannot do Xoutput. (Output is saved until you make that process current.) X XYou can run any program under BOSS. For example, you might X run Emacs or EVE in process E X SET HOST to the EPX in process H X run NETTY to the B machine in process B X do a FORTRAN compilation in process F X execute DCL commands in process D X talk to your colleague using PHONE in process P Xand so on. X XOf course, you would normally not need to run so many processes. (Indeed Xyour subprocess quota may only let you run 5 processes.) When you are Xthrough with a process, you should log out of it (with `logout') and switch Xback to some other process. X XBOSS makes no attempt to keep track of what is on your screen. Usually when Xswitching to a process which manages the screen in an advanced manner, you Xshould issue a command to the program to get it to re-draw the screen. X(This is control-w for EVE, PHONE, SPELL; control-l for Emacs.) X XBOSS uses the VT100 escape sequences for clearing the screen, etc. However Xit should still be useable on non-VT100-compatible terminals. X2 Commands XUsually, all commands to BOSS begin with the C-\ (control-\). The exception Xis when there is no current process (i.e., initially and immediately after Xlogging out of a process). In that case the C-\ is optional. X XThe commands are: X X C-h (or BS) Print command summary X C-z Quit (asking confirmation if there are processes) X a thru z Switch to a particular process (starting it if necessary) X A thru Z the same except clear the screen first X ? List processes (* means current, + means waiting for output) X C-\ Send a real C-\ to the current process X DEL Do nothing X other Sound the bell on the terminal X2 Bugs XBOSS does single character input. This is rather slow. Don't expect it to Xbe able to keep up with lots of data coming from the terminal. X XThe output on a Visual 550 at 9600 baud occasionally has glitches in it. XThis is because the Visual 550 needs flow control enabled to operate at X9600 baud, but BOSS doesn't react quickly enough to the control-s sent by Xthe terminal. The solution is to run at 4800 baud or slower. X XOutput gets garbled when using BOSS via SET HOST (i.e., SET HOST followed by XBOSS). This happens when you type while output is coming to your terminal. XThe symptom is that the lines come out in the wrong order. It's OK to use XSET HOST while in BOSS (i.e., BOSS followed by SET HOST). X XPC file transfer (e.g., using MACX, XMODEM) probably doesn't work through XBOSS. (Actually I have got downloads to work with MACX. That presumably is Xan accident of the Mac not sending a C-\ as part of the handshaking. XUploads seem to stall.) X XAttempting to attach to the process running BOSS from one of its Xsubprocesses causes a hangage. X2 Unfeatures XThe following features are not implemented but are possible future Xenhancements. X X* Log files. X* Largish output buffer for non-current processes (have to worry about X controlling the output though). Sending a C-s won't work. X* Ability to kill particular processes. X* Ability to ATTACH to non-BOSS processes. I haven't managed to make this X work yet. X* Configurable for other terminals. X* Allow programs to talk back to BOSS to do process switching X* Allow default directory to propagate to other processes. $ GoSub Convert_File $ Goto Part2