File:  [Coherent Logic Development] / freem_fileman / USER / DINV1DTM.m
Revision 1.1: download - view: text, annotated - select for diffs
Mon Apr 28 14:13:21 2025 UTC (3 months ago) by snw
Branches: MAIN
CVS tags: HEAD
Restructure repository

    1: %ZOSV1	;SFISC/AC,LL/DFH,sfisc/fyb-View commands & special functions (continued) ;03:13 PM  21 Dec 1994
    2: 	;;21.0;VA FileMan;;Dec 28, 1994
    3: 	;Per VHA Directive 10-93-142, this routine should not be modified.
    4: DEVOPN	;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 ODEV="",JOB=$V(0,JA+10,-4)
   11: 	;S A=$V(1,62,-3) I A,$V(0,A+4,-2) D JDEV ; includes parents cur device
   12: 	S A=$V(1,38,-3)
   13: 	F A=A:0 Q:'$V(0,A,-2)  D:$V(0,A+4,-2)=JOB JDEV S A=A+$V(0,A,-2)
   14: 	S Y=$S(CDEV:CDEV_",",1:"")_$E(ODEV,2,999)_$E(",",$E(ODEV,2,999)]"")
   15: 	Q
   16: JSTAT	; Get DTM data - X=Job Number
   17: 	S X=$S($D(X)[0:$J,X'?1N.N:$J,1:X)
   18: 	S ZVER=($P($ZVER,"/",2)'<4) ; ZVER=1 if Version 4
   19: 	S JA=$V(1,(X-1*2)+100,-2)*16
   20: 	Q
   21: JDEV	;
   22: 	S DEV=$V(0,A+2,-2) I DEV,DEV'=PDEV S ODEV=ODEV_","_DEV
   23: 	Q
   24: 	;
   25: FREEDEV	;
   26: 	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
   27: 	;
   28: 	S IO=$S(L:$V(0,P+2,-2),1:"") Q
   29: JOBLIST	; Active Jobs delimited by comma
   30: 	S Y=$$jobs^%mjob Q
   31: 	;
   32: SHUTDOWN	; Check shutdown flag
   33: 	S Y=$S($P($ZVER,"/",2)<4:$V(4,0,-1)#2,1:$V(1,0,-1)#2)
   34: 	Q

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>