- PSXSTP ;BIR/BAB-Stop Interface ;[ 04/08/97 2:06 PM ]
- ;;2.0;CMOP;;11 Apr 97
- ;Called from PSXJOB
- Q
- EN ;Enter here to set status to stopped (stop interface)
- ;K LOG,PSXONE S LOG(1)="STP Stopping the interface now!",$G(XCNT),ZCNT)=$G(DUZ)_" STOP INTERFACE DETECTED. ^"_$H,ZCNT=ZCNT+1 D LOG^PSXUTL
- K LOG,PSXONE S LOG(1)="STP Stopping the interface now!"
- ;Wait for PSXJOB to release lock
- WAIT L +^PSX(553,1,"S"):3 E W "." G WAIT
- S ^PSX(553,1,"S")="S" W !!,"Stopping the interface..." S ZTREQ="@"
- W "Done!"
- L -^PSX(553,1,"S")
- Q
- --- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HPSXSTP 546 printed Feb 18, 2025@23:11:39 Page 2
- PSXSTP ;BIR/BAB-Stop Interface ;[ 04/08/97 2:06 PM ]
- +1 ;;2.0;CMOP;;11 Apr 97
- +2 ;Called from PSXJOB
- +3 QUIT
- EN ;Enter here to set status to stopped (stop interface)
- +1 ;K LOG,PSXONE S LOG(1)="STP Stopping the interface now!",$G(XCNT),ZCNT)=$G(DUZ)_" STOP INTERFACE DETECTED. ^"_$H,ZCNT=ZCNT+1 D LOG^PSXUTL
- +2 KILL LOG,PSXONE
- SET LOG(1)="STP Stopping the interface now!"
- +3 ;Wait for PSXJOB to release lock
- WAIT LOCK +^PSX(553,1,"S"):3
- IF '$TEST
- WRITE "."
- GOTO WAIT
- +1 SET ^PSX(553,1,"S")="S"
- WRITE !!,"Stopping the interface..."
- SET ZTREQ="@"
- +2 WRITE "Done!"
- +3 LOCK -^PSX(553,1,"S")
- +4 QUIT