Google
 

Trailing-Edge - PDP-10 Archives - scratch - 10,7/unscsp/montst/simupd.ctl
There are 5 other files named simupd.ctl in the archive. Click here to see a list.
;SIMUPD.CTL    %003  TEST SIMULTANEOUS UPDATE
;RUN 5 COPIES OF WRTUPD (D TRAFTON)  TO DO SIMULTANEOUS UPDATE.
;THEN RUN REDUPD (D TRAFTON)  TO CHECK THE FILE.
;
;THIS IS TRIVIAL TO DO WITH OPSER, BUT WE CANT RUN OPSER
;UNDER BATCON, SO ...PUNT...
;
;SM LIBMAN       26 FEB 76
.GOTO SKIP
WAIT::
TITLE WATUPD 
;SYNCRONIZER FOR SIMUPD.CTL
;WAIT FOR A WRTUPD JOB TO APPEAR, THEN WAIT
;FOR ALL OF THEM TO GO AWAY.
START:	MOVE	1,[50,,11]	;LOGMAX
	GETTAB	1,
	  JRST	GTBF
LP1:	SETZM	2		;CURRENT JOB INDEX
LP2:	HRL	3,2
	HRRI	3,3		;JBTPRG
	GETTAB	3,		;LOOK AT NEXT JOB
	  JRST	GTBF
	CAMN	3,['WRTUPD']	;IS IT WRTUPD?
	JRST	LP3		;YES
	AOS	2
	CAMG	2,1		;LOOKED AT ALL JOBS?
	JRST	LP2		;NO
	MOVEI	3,17		;YES, SLEEP A WHILE
	SLEEP	3,
	JRST	LP1		;TRY AGAIN

LP3:	SETZM	2		;NOW WAIT TILL ALL WRTUPD'S ARE GONE
LP4:	HRL	3,2
	HRRI	3,3
	GETTAB	3,
	  JRST	GTBF
	CAMN	3,['WRTUPD']	;IS IT WRTUPD?
	JRST	LP5		;YES
	AOS	2
	CAMG	2,1		;LOOKED AT ALL JOBS?
	JRST	LP4		;NO, LOOK AT NEXT ONE
	EXIT			;YES, DONE. (NO MORE WRTUPD'S)

LP5:	MOVEI	3,17		;FOUND A WRTUPD, SLEEP A WHILE
	SLEEP	3,
	JRST	LP3		;TRY AGAIN

GTBF:	OUTSTR	[ASCIZ /?GETTAB FAILED./]
	EXIT

	END	START
ONE::
;TRY TO RUN VIRTUALLY
.R SETVM
.IF (ERROR) ;IGNORE
.ASS DSK TEST
.RUN TST:WRTUPD
*1/10
.SUBMIT SIMUPD=/MOD/DEP:-1
TWO::
;TRY TO RUN VIRTUALLY
.R SETVM
.IF (ERROR) ;IGNORE
.ASS DSK TEST
.RUN TST:WRTUPD
*2/10
.SUBMIT SIMUPD=/MOD/DEP:-1
THREE::
;TRY TO RUN VIRTUALLY
.R SETVM
.IF (ERROR) ;IGNORE
.ASS DSK TEST
.RUN TST:WRTUPD
*6/10
.SUBMIT SIMUPD=/MOD/DEP:-1
FOUR::
;TRY TO RUN VIRTUALLY
.R SETVM
.IF (ERROR) ;IGNORE
.ASS DSK TEST
.RUN TST:WRTUPD
*10/10
.SUBMIT SIMUPD=/MOD/DEP:-1
FIVE::
;TRY TO RUN VIRTUALLY
.R SETVM
.IF (ERROR) ;IGNORE
.ASS DSK TEST
.RUN TST:WRTUPD
*5/10
.SUBMIT SIMUPD=/MOD/DEP:-1
SKIP::
;TRY TO RUN VIRTUALLY
.R SETVM
.IF (ERROR) ;IGNORE
;***
;CHECK TO SEE IF WE CAN RUN
;***
.R ISIT ;SIMUPD
;WE'LL BOMB OUT HERE IF THIS SYSTEM DOESN'T HAVE SIM. UPDATE
;***
;CREATE ALL OF THE FILES WE NEED
;
.R TECO				;MAKE THE FILE
=ERSIMUPD.CTL
*_WAIT::
=0,.K
=EWWATUPD.MAC
=NONE::0L
=.,ZKPWEF
.R TECO				;MAKE THE FILE
=ERSIMUPD.CTL
*_ONE::
=0,.K
=EWWRTUP1.CTL
=NTWO::0L
=.,ZKPWEF
.R TECO				;MAKE THE FILE
=ERSIMUPD.CTL
*_TWO::
=0,.K
=EWWRTUP2.CTL
=NTHREE::0L
=.,ZKPWEF
.R TECO				;MAKE THE FILE
=ERSIMUPD.CTL
*_THREE::
=0,.K
=EWWRTUP3.CTL
=NFOUR::0L
=.,ZKPWEF
.R TECO				;MAKE THE FILE
=ERSIMUPD.CTL
*_FOUR::
=0,.K
=EWWRTUP4.CTL
=NFIVE::0L
=.,ZKPWEF
.R TECO				;MAKE THE FILE
=ERSIMUPD.CTL
*_FIVE::
=0,.K
=EWWRTUP5.CTL
=NSKIP::0L
=.,ZKPWEF
;***
;NOW SUBMIT THE WRITERS
;***
.SUBMIT WRTUP1/UNIQUE:0/TIM:200,/DISP:DEL
.SUBMIT WRTUP2/UNIQUE:0/TIM:200,/DISP:DEL
.SUBMIT WRTUP3/UNIQUE:0/TIM:200,/DISP:DEL
.SUBMIT WRTUP4/UNIQUE:0/TIM:200,/DISP:DEL
.SUBMIT WRTUP5/UNIQUE:0/TIM:200,/DISP:DEL
;.EXECUTE WATUPD
;HERE WHEN ALL OF THE WRITERS ARE DONE
;NOW READ THE FILE
;***
;NOW RESUBMIT OURSELF TO RUN WHEN THE WRITERS ARE DONE
;(NOTE THAT WE ARE NO LONGER USING WATUPD)
;GO AWAY, BUT COME BACK TO HERE.
;***
.SUBMIT SIMUPD/TAG:READ/DEPEND:5/UNIQUE:0/TIM:200,/DISP:DEL
.K/F
READ::
.ASS DSK TEST
.RUN TST:REDUPD
*1/10,2/10,5/10,6/10,10/10
;FIELD ERRORS ETC.  FOR NOW JUST QUIT
.IF (ERROR) .GOTO B
.PLEASE SIMUPD SUCCESSFUL
.DELETE UPDATE.BIN
.GOTO A
B::
.PLEASE ERROR RUNNING SIMUPD (UPDATE.BIN HAS NOT BEEN DELETED)
A::
%FIN:
.NOERROR
.DELETE WRTUP?.CTL,WATUPD.*