Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: PRC0B2

PRC0B2.m

Go to the documentation of this file.
  1. PRC0B2 ;WISC/PLT-TASK/DEVICE/MM UTILITY ; 06/30/94 12:40 PM
  1. V ;;5.1;IFCAP;;Oct 20, 2000
  1. ;Per VHA Directive 10-93-142, this routine should not be modified.
  1. QUIT ; invalid entry
  1. ;
  1. ;prca date ~1=[label]^routine, ~2=task description
  1. ;prcb data ~1=variable name/global root, ~2...
  1. ;prcc data ~1=1 if ask start time, ~2=start time (fm time/$h-time), ~3=keep until time (fm/$h)
  1. ; ~4=i/o device name, ~5=priority(1-10),
  1. ; ~6=task uci, ~7=volume set,
  1. TASK(PRCA,PRCB,PRCC) ;EF value ^1 task number, ^2=start time(fm/$h)
  1. ;task set-up
  1. N ZTRN,ZTDESC,ZTDTH,ZTIO,ZTUCI,ZTCPU,ZTPRI,ZTSAVE,ZTKIL,ZTSK
  1. N A,B
  1. S ZTRTN=$P(PRCA,"~"),ZTDESC=$P(PRCA,"~",2)
  1. I $G(PRCB)]"" F A=1:1 Q:$P(PRCB,"~",A,999)="" S B=$P(PRCB,"~",A) S:B]"" @("ZTSAVE("""_B_""")=""""")
  1. S ZTIO=""
  1. S PRCC=$G(PRCC) S:'PRCC ZTDTH=$S($P(PRCC,"~",2)="":$H,1:$P(PRCC,"~",2))
  1. I $P(PRCC,"~",3,999)]"" D
  1. . S:$P(PRCC,"~",3)]"" ZTKILL=$P(PRCC,"~",3)
  1. . S:$P(PRCC,"~",4)]"" ZTIO=$P(PRCC,"~",4)
  1. . S:$P(PRCC,"~",5)]"" ZTPRI=$P(PRCC,"~",5)
  1. . S:$P(PRCC,"~",6)]"" ZTUCI=$P(PRCC,"~",6)
  1. . S:$P(PRCC,"~",7)]"" ZTCPU=$P(PRCC,"~",7)
  1. . QUIT
  1. D ^%ZTLOAD
  1. QUIT $G(ZTSK)_"^"_$G(ZTSK("D"))
  1. ;
  1. ;PRCA data ^1=message subject, ^2=message sender's name (option)
  1. ;xmtext text array name with left parenthesis
  1. ;.xmy recipients ri/name, group array
  1. ;.xmrou rourtine name array
  1. ;.xmstrip striped character array
  1. MM(PRCA,XMTEXT,XMY,XMROU,XMSTRIP) ;mail message sending
  1. N XMSUB,XMDUZ
  1. S XMSUB=$P(PRCA,"^") S:$P(PRCA,"^",2)]"" XMDUZ=$P(PRCA,"^",2)
  1. D ^XMD
  1. QUIT
  1. ;
  1. ;A=ri of file 3.8
  1. MG(A) ;EF value=mail group name in file 3.8
  1. D PIECE^PRC0B("3.8;;"_A,.01,"I","A")
  1. QUIT $G(A(3.8,A,.01,"I"))
  1. ;
  1. ;PRCA=package name (.01) in file 9.4
  1. PKGVER(PRCA) ;EF - ^1=ri of file 9.4, ^2=version number from node version if defined
  1. ; ^3=version number from node 22, ^4=version install date from node 22
  1. N A,B,C
  1. S (A,B)=""
  1. Q:$D(PRCPKVER(PRCA)) PRCPKVER(PRCA)
  1. S A=$O(^DIC(9.4,"B",PRCA,""))
  1. I A S PRCPKVER(PRCA)=A,$P(PRCPKVER(PRCA),"^",2)=$P($G(^DIC(9.4,A,"VERSION")),"^"),$P(PRCPKVER(PRCA),"^",3)=$P(PRCPKVER(PRCA),"^",2) D:$P(PRCPKVER(PRCA),"^",2)=""
  1. . D EN^DDIOL("Package is defined, but has not current version data.")
  1. . D EN^DDIOL("Please call IRM!")
  1. S:'A PRCPKVER(PRCA)=""
  1. QUIT PRCPKVER(PRCA)
  1. ;
  1. ;A=DATE/TIME, B='I' if fileman date, 'H' if $H DATE, 'E' if external date
  1. ;C="S" if second required
  1. DT(A,B,C) ;EF value: -1 if wrong format, ^1=fileman.time, ^$h date,time
  1. ; ^3-week day, ^4=mm/dd/yy@time, ^5=alpha date@time
  1. N %DT,X,Y,Z,%H,%,%T,%Y
  1. S:'$D(C) C="" S Z=""
  1. I B="E" D QUIT:Z=-1 Z
  1. . S %DT="FPT" S:C="S" %DT=%DT_"S"
  1. . S X=A D ^%DT S Z=Y
  1. I B="H" D
  1. . S %H=A D YMD^%DTC S Z=X,%=$P(A,",",2) D S^%DTC S Z=Z_%
  1. S:Z="" Z=A
  1. S X=Z D H^%DTC S $P(Z,"^",2)=%H_","_%T,$P(Z,"^",3)=%Y
  1. S Y=$P(Z,"^") S:C="S" %DT="S" D DD^%DT S $P(Z,"^",5)=Y,A=$P(Y,"@",2)
  1. S $P(Z,"^",4)=$E(Z,4,5)_"/"_$E(Z,6,7)_"/"_$E(Z,2,3)
  1. S:$P(Z,"^")["." $P(Z,"^",4)=$P(Z,"^",4)_"@"_$TR(A,":","")
  1. QUIT Z