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/ZOSV1DTM.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: 1.2 KB
RevLine 
[613]1%ZOSV1 ;SFISC/AC,LL/DFH,sfisc/fyb - ;07/07/95 16:09
2 ;;8.0;KERNEL;;JUL 03, 1995
3DEVOPN ;X=$J,Y=List of devices separated by a comma
4 N A,I,JA,JOB,DEV,CDEV,ODEV,PDEV
5 S X=$J D JSTAT
6 I 'ZVER S Y=$$jstat^%mjob(X),Y=$S($P(Y,"|",6)>0:$P(Y,"|",6)_",",1:"")_$P(Y,"|",9)_$E(",",$P(Y,"|",9)]"") Q
7 ;S PDEV=$V(0,JA+18,-3),PDEV=$S(PDEV:$V(0,PDEV+2,-2),1:"-")
8 ;S CDEV=$V(0,JA+22,-3),CDEV=$S(CDEV:$V(0,CDEV+2,-2),1:"-")
9 S PDEV=$P($zjob(X),"|",5)
10 S CDEV=$P($zjob(X),"|",6)
11 S ODEV="",JOB=$V(0,JA+10,-4)
12 ;S A=$V(1,62,-3) I A,$V(0,A+4,-2) D JDEV ; includes parents cur device
13 S A=$V(1,38,-3)
14 F A=A:0 Q:'$V(0,A,-2) D:$V(0,A+4,-2)=JOB JDEV S A=A+$V(0,A,-2)
15 S Y=$S(CDEV:CDEV_",",1:"")_$E(ODEV,2,999)_$E(",",$E(ODEV,2,999)]"")
16 Q
17JSTAT ; Get DTM data - X=Job Number
18 S X=$S($D(X)[0:$J,X'?1N.N:$J,1:X)
19 S ZVER=($P($ZVER,"/",2)'<4) ; ZVER=1 if Version 4
20 ;S JA=$V(1,(X-1*2)+100,-2)*16
21 S JA=0
22 Q
23JDEV ;
24 S DEV=$V(0,A+2,-2) I DEV,DEV'=PDEV S ODEV=ODEV_","_DEV
25 Q
26 ;
27FREEDEV ;
28 F P=$V($S($P($ZVER,"/",2)<4:4,1:1),38,-3):0 S L=$V(0,P,-2) Q:'L Q:'$V(0,P+4,-2)&($V(0,P+6,-1)=6) S P=P+L
29 ;
30 S IO=$S(L:$V(0,P+2,-2),1:"") Q
31JOBLIST ; Active Jobs delimited by comma
32 S Y=$$jobs^%mjob Q
33 ;
34SHUTDOWN ; Check shutdown flag
35 S Y=$S($P($ZVER,"/",2)<4:$V(4,0,-1)#2,1:$V(1,0,-1)#2)
36 Q
Note: See TracBrowser for help on using the repository browser.