source: WorldVistAEHR/trunk/r/VA_FILEMAN-ARJT-DI-DD-DM-DT-%DT-%RCR/DINV1DTM.m@ 1801

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

initial load of WorldVistAEHR

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