source: WorldVistAEHR/trunk/r/KERNEL-XU-A4A7-USC-XG-XLF-XNOA-XPD-XQ-XVIR-ZI-ZOSF-ZOSV-ZT-ZU-%Z-XIP--XQAB--XUC--XUR--ZIN--ZTED/XUDHSET.m@ 1211

Last change on this file since 1211 was 613, checked in by George Lilly, 15 years ago

initial load of WorldVistAEHR

File size: 844 bytes
RevLine 
[613]1XUDHSET ;ISC-SF/RWF - Setup devices ;5/5/97 15:41
2 ;;8.0;KERNEL;**49**;Jul 10, 1995
3 Q
4 ;N1 device name, N2 resource name, CNT # of slots
5RES(N1,N2,CNT,LOC,SUB) ;Build a RESOURCE device entry
6 N X,Y,%,XUFD,XUDA,DIC
7 S:'$D(N2) N2=N1 S:'$D(CNT) CNT=1 S:'$D(LOC) LOC="Resource Device" S:'$D(SUB) SUB="P-OTHER"
8 S DIC="^%ZIS(1,",DIC(0)="M",X=N1 D ^DIC I Y>0 Q "-1^Device name in use"
9 S DIC="^%ZISL(3.54,",DIC(0)="M",X=N2 D ^DIC I Y>0 Q "-1^Resource name in use"
10 S %=$O(^%ZIS(2,"B",SUB,0)) S:%'>0 %=$O(^%ZIS(2,"B",SUB)),%=$S(%[SUB:$O(^%ZIS(2,"B",%,0)))
11 S XUDA="+1,",XUDA2="+2,"
12 S XUFD(3.5,XUDA,.01)=N1,XUFD(3.5,XUDA,2)="RES",XUFD(3.5,XUDA,1)=N2,XUFD(3.5,XUDA,35)=CNT,XUFD(3.5,XUDA,.02)=LOC
13 S:%>0 XUFD(3.5,XUDA,3)=%
14 D UPDATE^DIE("","XUFD","XUDA")
15 S %=$O(^TMP("DIERR",$J,0)) I % Q "-1^"_^(%,"TEXT",1)
16 Q XUDA(1)_"^"_$P(^%ZIS(1,XUDA(1),0),"^")
Note: See TracBrowser for help on using the repository browser.