SDES30 ;ALB/ANU - VISTA SCHEDULING RPCS ;JUN 08, 2021
;;5.3;Scheduling;**790**;Aug 13, 1993;Build 11
;;Per VHA Directive 2004-038, this routine should not be modified
;
Q
;
SPACEBAR(SDESY,SDESDIC,SDESVAL) ;Update ^DISV with most recent lookup value SDESVAL from file SDESDIC
;SPACEBAR(SDESY,SDESDIC,SDESVAL) external parameter tag is in SDES
;SDESDIC is the data global in the form GLOBAL(
;SDESVAL is the entry number (IEN) in the file
;
;Return Status = 1 if success, 0 if fail
;
S SDESY="^TMP(""SDES"","_$J_")"
K @SDESY
N SDES1,SDESRES
S SDESI=0
I (SDESDIC="")!('+$G(SDESVAL)) D ERR(SDESI+1,99) Q
S SDESDIC="^"_SDESDIC
S ^TMP("SDES",$J,0)="T00020ERRORID"_$C(30)
I $D(@(SDESDIC_"SDESVAL,0)")),'$D(^(-9)) D ;Note: Naked reference is immediately preceded by the full global reference per SAC 2.2.2.8
. S ^DISV(DUZ,SDESDIC)=SDESVAL
. S SDESRES=1
E S SDESRES=0
S SDESI=SDESI+1
S ^TMP("SDES",$J,SDESI)=SDESRES_$C(30)_$C(31)
Q
;
ERR(SDESI,SDESERR) ;Error processing
S SDESI=SDESI+1
S ^TMP("SDES",$J,SDESI)=SDESERR_$C(30)
S SDESI=SDESI+1
S ^TMP("SDES",$J,SDESI)=$C(31)
Q
;
ETRAP ;EP Error trap entry
I '$D(SDESI) N SDESI S SDESI=999
S SDESI=SDESI+1
D ERR(99,0)
Q
;
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HSDES30 1245 printed Dec 13, 2024@02:54:58 Page 2
SDES30 ;ALB/ANU - VISTA SCHEDULING RPCS ;JUN 08, 2021
+1 ;;5.3;Scheduling;**790**;Aug 13, 1993;Build 11
+2 ;;Per VHA Directive 2004-038, this routine should not be modified
+3 ;
+4 QUIT
+5 ;
SPACEBAR(SDESY,SDESDIC,SDESVAL) ;Update ^DISV with most recent lookup value SDESVAL from file SDESDIC
+1 ;SPACEBAR(SDESY,SDESDIC,SDESVAL) external parameter tag is in SDES
+2 ;SDESDIC is the data global in the form GLOBAL(
+3 ;SDESVAL is the entry number (IEN) in the file
+4 ;
+5 ;Return Status = 1 if success, 0 if fail
+6 ;
+7 SET SDESY="^TMP(""SDES"","_$JOB_")"
+8 KILL @SDESY
+9 NEW SDES1,SDESRES
+10 SET SDESI=0
+11 IF (SDESDIC="")!('+$GET(SDESVAL))
DO ERR(SDESI+1,99)
QUIT
+12 SET SDESDIC="^"_SDESDIC
+13 SET ^TMP("SDES",$JOB,0)="T00020ERRORID"_$CHAR(30)
+14 ;Note: Naked reference is immediately preceded by the full global reference per SAC 2.2.2.8
IF $DATA(@(SDESDIC_"SDESVAL,0)"))
IF '$DATA(^(-9))
Begin DoDot:1
+15 SET ^DISV(DUZ,SDESDIC)=SDESVAL
+16 SET SDESRES=1
End DoDot:1
+17 IF '$TEST
SET SDESRES=0
+18 SET SDESI=SDESI+1
+19 SET ^TMP("SDES",$JOB,SDESI)=SDESRES_$CHAR(30)_$CHAR(31)
+20 QUIT
+21 ;
ERR(SDESI,SDESERR) ;Error processing
+1 SET SDESI=SDESI+1
+2 SET ^TMP("SDES",$JOB,SDESI)=SDESERR_$CHAR(30)
+3 SET SDESI=SDESI+1
+4 SET ^TMP("SDES",$JOB,SDESI)=$CHAR(31)
+5 QUIT
+6 ;
ETRAP ;EP Error trap entry
+1 IF '$DATA(SDESI)
NEW SDESI
SET SDESI=999
+2 SET SDESI=SDESI+1
+3 DO ERR(99,0)
+4 QUIT
+5 ;