! @(#)reset.prg 17.1.1.1 (ESO-DMD) 01/25/02 17:46:17 ! ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ! ! MIDAS procedure reset.prg for command RESET/DISPLAY ! ! K. Banse 910228, 920907, 930707, 960116, 981214, 991207, 010307 ! ! execute as RESET/DISPLAY [ALL] ! ! ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ! define/param p1 No C "Enter NO/ALL for complete (full) reset:" if p1(1:1) .ne. "N" then @ dazlogin L !full reset of keyword `dazdevr' if aux_mode(1) .ne. 1 then !only Unix $ sh $MID_PROC/reset.sh {MID$SESS(11:12)} !get rid of all idiserv's mid$sess(6:7) = "--" return endif else if ididev(18) .eq. -1 return !it's the NULL device... endif ! define/local success/i/1/1 1 define/local filecntr/i/1/2 0,0 define/local reco/c/1/20 " " all ! open/file MID_WORK:idiserv{MID$SESS(11:12)}.log read filecntr if filecntr(1) .lt. 0 then write/out "Could not find file MID_WORK:idiserv{MID$SESS(11:12)}.log ..." success = 0 else read/file {filecntr(1)} reco 20 write/keyw reco " " all read/file {filecntr(1)} reco 20 !pid of IDI server is in 2. record close/file {filecntr(1)} endif if aux_mode(1) .eq. 1 then !VAX/VMS -DELETE MID_WORK:IDISERV.*.* if success .eq. 1 then $ stop/id={reco} else write/out "You have to kill the process IDISERV{mid$sess(11:12)}" - by hand!" endif -DELETE MID_WORK:idiserv{MID$SESS(11:12)}.log.* -DELETE MID_WORK:sxw{MID$SESS(11:12)}*.dat.* else !Unix -DELETE MID_WORK:midas_xw{MID$SESS(11:12)}* -DELETE MID_WORK:IDISERV if success .eq. 1 then $ kill -9 {reco} else write/out "You have to kill the process `idiserv.exe' by hand!" endif -DELETE MID_WORK:idiserv{MID$SESS(11:12)}.log -DELETE MID_WORK:sxw{MID$SESS(11:12)}*.dat endif ! ! now reset all stuff ! mid$sess(6:7) = "--" dazdevr(4) = 1 @ dazlogin !force a clean keyword IDIDEV write/keyw dazdevr/i/10/2 -1,-1 if success .eq. 0 WRITE/OUT After that ! WRITE/OUT - "use CREATE/DISPLAY or CREATE/GRAPHICS to recreate your windows..."