.TITLE JBHOLD.MAC ;+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++; ; COPYRIGHT (c) 1985 by ; ; H.H. Klin. Neuro. AZG ; ; ; ; This software is furnished under a LICENSE and may be USED ONLY IN ; ; ACCORDANCE WITH THE TERMS OF SUCH LICENSE. This software or ; ; any other copies thereof may not be provided or otherwise made ; ; available to any other person. NO TITLE TO AND OWNERSHIP OF THE ; ; SOFTWARE IS HEREBY TRANSFERRED. ; ; ; ; The information in this software is subject to change without notice. ; ; ; ;+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++; ; JBHOLD (File JBHOLD.MAC) is a FORTRAN callable subroutine set for ; controlling JOB activity: ; 1. IERR=JBHOLD ; Initialize, should be called only ONCE before ; calling the following routines: ; 2. IERR=JBSPND ; Suspend DC job ; 3. IERR=JBRSUM ; Resume DC job ; --> For each call JBSPND a matching JBRSUM ; should be executed! ; FUNCTION VALUE IERR: 0 = normal return ; -1 = Initialization error ; -2 = No initialization done or IO-error ; -3 = Initialization already done ; CONDITIONALS: ERRMES = 1 ;.NE. -> error messages are printed. .MCALL .CHCOPY, .PRINT, .SPFUN, .ABTIO, .WAIT .ENABL LC ;--------------- INITIALIZE CHANNEL TO JOB -------------------; JBHOLD::TST FIRST BNE INDONE .CHCOPY #AREA,#0,#15. BCS INERR INC FIRST CLR R0 RETURN INERR: .IIF NE,ERRMES .PRINT #TINERR MOV #-1,R0 RETURN INDONE: .IIF NE,ERRMES .PRINT #TINDON MOV #-3,R0 RETURN ;------------------ CONTROL JOB ACTIVITY ---------------------; JBSPND::.SPFUN #AREA,#0,#300,#BUFF,#1,#BLK,#1 ;SUSPEND JOB BCC JEXIT .IIF NE,ERRMES .PRINT #TIOERR MOV #-2,R0 RETURN JBRSUM::.ABTIO #0 ;RESUME JOB .WAIT #0 JEXIT: CLR R0 RETURN ;--------------------------- DATA AREA -----------------------------; FIRST: .WORD 0 AREA: .BLKW 7 BUFF: .WORD 0 BLK: .BLKW 4 ; .IF NE,ERRMES TINERR: .ASCIZ /?JBHOLD-F-Initialisation error/ TINDON: .ASCIZ /?JBHOLD-W-Already initialised!/ TIOERR: .ASCIZ /?JBHOLD-F-Not INITIALIZED or IO-error!/ .EVEN .ENDC ;ERRMES .END