SDEC17 ;ALB/SAT - VISTA SCHEDULING RPCS ;JAN 15, 2016
;;5.3;Scheduling;**627**;Aug 13, 1993;Build 249
;
Q
;
SCHUSR(SDECY) ;Return recordset of all users in NEW PERSON having SDECZMENU and/or SDECZMGR key
;SCHUSR(SDECY) external parameter tag is in SDEC
;
N SDECDUZ,SDECKEY,SDECI,SDECNAM,SDECKEYN
S SDECY="^TMP(""SDEC"","_$J_")"
K @SDECY
K ^TMP($J,"SDEC17")
S SDECI=0
S @SDECY@(0)="I00020USERID^T00030USERNAME"_$C(30)
;$O Through ^VA(200,"AB",
F SDECKEYN="SDECZMENU","SDECZMGR" S SDECKEY=+$O(^DIC(19.1,"B",SDECKEYN,0)) D
. Q:'+SDECKEY S SDECDUZ=0 F S SDECDUZ=$O(^VA(200,"AB",SDECKEY,SDECDUZ)) Q:'+SDECDUZ D
. . Q:SDECDUZ<1
. . Q:'$D(^VA(200,SDECDUZ,0))
. . Q:$D(^TMP($J,"SDEC17",SDECDUZ))
. . S SDECNAM=$P(^VA(200,SDECDUZ,0),U)
. . S SDECI=SDECI+1
. . S ^TMP($J,"SDEC17",SDECDUZ)=""
. . S @SDECY@(SDECI)=SDECDUZ_"^"_SDECNAM_$C(30)
. . Q
. Q
;
S @SDECY@(SDECI)=@SDECY@(SDECI)_$C(31)
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HSDEC17 943 printed Nov 22, 2024@18:00:11 Page 2
SDEC17 ;ALB/SAT - VISTA SCHEDULING RPCS ;JAN 15, 2016
+1 ;;5.3;Scheduling;**627**;Aug 13, 1993;Build 249
+2 ;
+3 QUIT
+4 ;
SCHUSR(SDECY) ;Return recordset of all users in NEW PERSON having SDECZMENU and/or SDECZMGR key
+1 ;SCHUSR(SDECY) external parameter tag is in SDEC
+2 ;
+3 NEW SDECDUZ,SDECKEY,SDECI,SDECNAM,SDECKEYN
+4 SET SDECY="^TMP(""SDEC"","_$JOB_")"
+5 KILL @SDECY
+6 KILL ^TMP($JOB,"SDEC17")
+7 SET SDECI=0
+8 SET @SDECY@(0)="I00020USERID^T00030USERNAME"_$CHAR(30)
+9 ;$O Through ^VA(200,"AB",
+10 FOR SDECKEYN="SDECZMENU","SDECZMGR"
SET SDECKEY=+$ORDER(^DIC(19.1,"B",SDECKEYN,0))
Begin DoDot:1
+11 if '+SDECKEY
QUIT
SET SDECDUZ=0
FOR
SET SDECDUZ=$ORDER(^VA(200,"AB",SDECKEY,SDECDUZ))
if '+SDECDUZ
QUIT
Begin DoDot:2
+12 if SDECDUZ<1
QUIT
+13 if '$DATA(^VA(200,SDECDUZ,0))
QUIT
+14 if $DATA(^TMP($JOB,"SDEC17",SDECDUZ))
QUIT
+15 SET SDECNAM=$PIECE(^VA(200,SDECDUZ,0),U)
+16 SET SDECI=SDECI+1
+17 SET ^TMP($JOB,"SDEC17",SDECDUZ)=""
+18 SET @SDECY@(SDECI)=SDECDUZ_"^"_SDECNAM_$CHAR(30)
+19 QUIT
End DoDot:2
+20 QUIT
End DoDot:1
+21 ;
+22 SET @SDECY@(SDECI)=@SDECY@(SDECI)_$CHAR(31)
+23 QUIT