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

INHE.m

Go to the documentation of this file.
  1. INHE ;JSH; 27 Feb 96 16:05;Interface Error handler part 1
  1. ;;3.01;BHL IHS Interfaces with GIS;;JUL 01, 2001
  1. ;COPYRIGHT 1991-2000 SAIC
  1. ;
  1. ENO(TT,UIF,DEST,ERROR) ;Log an Output Controller error in the Interface Error File (IEF)
  1. D LOAD(TT,"",UIF,"O","",DEST,"",.ERROR)
  1. Q
  1. ;
  1. ENF(TT,DA,DUZ,ARRAY,ERROR) ;Log a Formatter error in the IEF
  1. D LOAD(TT,DA,"","F",DUZ,"",.ARRAY,.ERROR)
  1. Q
  1. ;
  1. END(UIF,ERROR,DEST) ;Log a deformatter error in the IEF
  1. D LOAD("","",UIF,"D","",$G(DEST),"",.ERROR)
  1. Q
  1. ;
  1. ENT(UIF,DEST,ERROR,BPN) ;Log an Transceiver error in the IEF
  1. I $G(BPN)'="" D:$D(ERROR)
  1. .N PROC S PROC="<"_$P($G(^INTHPC(BPN,0)),U)_"> "
  1. .I $D(ERROR)<10 S:$L(PROC_ERROR)<256 ERROR=PROC_ERROR Q
  1. .S:$L(PROC_$G(ERROR(1)))<256 ERROR(1)=PROC_$G(ERROR(1))
  1. D LOAD("","",UIF,"T","",DEST,"",.ERROR,$G(BPN))
  1. Q
  1. ;
  1. ENI(TT,DEST,ERROR) ;Log an Input Driver error in the IEF
  1. D LOAD(TT,"","","I","",DEST,"",.ERROR)
  1. Q
  1. ;
  1. ENR(BPN,ERROR) ;Log a receiver error in the IEF
  1. D:$D(ERROR)
  1. .N PROC S PROC="<"_$P($G(^INTHPC(BPN,0)),U)_"> "
  1. .I $D(ERROR)<10 S:$L(PROC_ERROR)<256 ERROR=PROC_ERROR Q
  1. .S:$L(PROC_$G(ERROR(1)))<256 ERROR(1)=PROC_$G(ERROR(1))
  1. D LOAD("","","","R","","","",.ERROR,BPN)
  1. Q
  1. ;
  1. ENK(UIF,ERROR) ;Log a negative acknowledgement
  1. D LOAD("","",UIF,"K","","","",.ERROR)
  1. Q
  1. ;
  1. LOAD(TT,INDA,UIF,LOC,DUZ,DEST,ARRAY,ERROR,BPN,ENUM) ;Load an error entry
  1. ;TT = Transaction type (file #4000)
  1. ;INDA = DA of from file
  1. ;UIF = entry # in UIF (file #4001)
  1. ;LOC = location of error
  1. ;DUZ = originating user
  1. ;DEST = Destination entry # (file #4005)
  1. ;ARRAY = Programmer's array
  1. ;ERROR = Array of error strings - if only ERROR exists and no
  1. ; descendents, then that will be used as ERROR(1)
  1. ;BPN = Entry number in Background Process Control file (#4004)
  1. ;ENUM = IEN of INTERFACE ERROR entry created (PBR to retrieve)
  1. ;
  1. N DIK,X,Y,I,%,DIC,DLAYGO S X=+$G(DUZ) N DUZ S DUZ=X,DUZ(0)="@" K DO
  1. S U="^",X="""NOW""",DIC=4003,DIC(0)="L",DLAYGO=4003 D ^DIC Q:Y<0
  1. S:$G(LOC)]"" LOC=$O(^INTHERL("C",LOC,""))
  1. S $P(^INTHER(+Y,0),U,2,10)=$G(TT)_U_$G(INDA)_U_$G(UIF)_U_$G(LOC)_U_U_U_$G(DUZ)_U_$G(DEST)_U_0_U_$G(BPN)
  1. I $D(ERROR)=1,ERROR]"" S ERROR(1)=ERROR
  1. S (%,I)=0 F S I=$O(ERROR(I)) Q:'I S %=%+1,^INTHER(+Y,2,%,0)=ERROR(I)
  1. S:% ^INTHER(+Y,2,0)=U_U_%_U_%
  1. ;FIX THIS WHOLE THING - DO SOME KIND OF %XY^%RCR TO ACCOUNT FOR LOWER LEVEL SUBSCRIPTS IN ARRAY - USE $Q
  1. S (%,I)=0 I $D(ARRAY)>9 F S I=$O(ARRAY(I)) Q:I="" S %=%+1,^INTHER(+Y,1,%,0)=I,%=%+1,^INTHER(+Y,1,%,0)=$G(ARRAY(I))
  1. S:% ^INTHER(+Y,1,0)=U_U_%_U_%
  1. N DA S DIK="^INTHER(",(DA,ENUM)=+Y D IX1^DIK
  1. Q