SCMCRPT ;BP/DMR - PCMM Intitution file check
;;5.3;Scheduling;**286,1015**;AUG 13,1993;Build 21
;
S (INST,IEN,TEAM,TEST)=""
F S TEAM=$O(^SCTM(404.51,"B",TEAM)) Q:TEAM="" D
.S IEN="" F S IEN=$O(^SCTM(404.51,"B",TEAM,IEN)) Q:IEN="" D
..S INST="" S INST=$P($G(^SCTM(404.51,IEN,0)),"^",7)
..S TEST="" S TEST=$$GET1^DIQ(4,INST_",",11)
..IF TEST'["N" W !!,"Team "_TEAM_" points to an INSTITUTION that is not NATIONAL."
..Q
K INST,IEN,TEAM,TEST
SCMCRPT ;BP/DMR - PCMM Intitution file check
+1 ;;5.3;Scheduling;**286,1015**;AUG 13,1993;Build 21
+2 ;
+3 SET (INST,IEN,TEAM,TEST)=""
+4 FOR
SET TEAM=$ORDER(^SCTM(404.51,"B",TEAM))
IF TEAM=""
QUIT
Begin DoDot:1
+5 SET IEN=""
FOR
SET IEN=$ORDER(^SCTM(404.51,"B",TEAM,IEN))
IF IEN=""
QUIT
Begin DoDot:2
+6 SET INST=""
SET INST=$PIECE($GET(^SCTM(404.51,IEN,0)),"^",7)
+7 SET TEST=""
SET TEST=$$GET1^DIQ(4,INST_",",11)
+8 IF TEST'["N"
WRITE !!,"Team "_TEAM_" points to an INSTITUTION that is not NATIONAL."
+9 QUIT
End DoDot:2
End DoDot:1
+10 KILL INST,IEN,TEAM,TEST