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

DIFG0A.m

Go to the documentation of this file.
DIFG0A ;SFISC/DG(OHPRD)-CALLED FOR CONTEXT SWITCH ;6/5/92  12:32 PM [ 04/02/2003   8:25 AM ]
 ;;22.0;VA FileMan;**1001**;APR 1, 2003
 ;;22.0;VA FileMan;;Mar 30, 1999
 ;THIS ROUTINE CONTAINS AN IHS MODIFICATION BY IHS/TUCSON/LAB 3/13/96
 ;Per VHA Directive 10-93-142, this routine should not be modified.
SWITCH ;CONTEXT SWITCH
 N DIC,DIFGM,DIFGNDC,DA,DIFGINCR,DIFGSKIP,DIFGDI,DIFGMO,DIFGPOIN
 S DIFG=DIFG+1,(DIFGNDC,DIFGLAGO)=0
 S DIFGTYPE="FILE"
 D BASE^DIFG0
 I DIFGER G X1
 D FUNC^DIFG0
 I '$D(DIFG("NOLKUP")) D BEGEND
 I DIFGER G X1
 D SET
 D KILLVAR0
 D FILE^DIFG
 S DIFG=DIFG-1
 D KILLVAR
X1 Q
 ;
BEGEND ;CALL DIFG3 TO PROCESS BEGIN-END BLOCK
 I "AL"[$P(DIFGMO(DIFGMULT),U) S DIFGSECP=$P(^DD(DIC,.01,0),U,2) S:DIFGSECP["P" DIFGPOIN="" I DIFGSECP'["'"!($D(DIFGENV("LAYGO",DIC,.01))) S DIFGLAGO=1
 D ^DIFG3
 Q
 ;
SET ;
 I '$D(DIFGSKIP(DIFGMULT)),$D(^UTILITY("DIFG",$J,DIFGINCR,DIC)),'$D(^(DIC,"DA")) S ^UTILITY("DIFG",$J,DIFGINCR,DIC,"DA")=+Y,^("DR")=""
 I $D(DIFGSKIP(DIFGMULT)) S ^UTILITY("DIFG",$J,DIFGINCR,DIC,"DA")=DIFGALNK S:'$D(DIFGFLUS) ^("X")=$S($E(X)="`":$E(X,2,245)_"^N",X[("^UTILITY(""DIFG@"","_$J):X_"^N",1:X)
 I $D(DIFGFLUS),$P(DIFGMO(DIFGMULT),U)="L" S $P(^UTILITY("DIFG",$J,DIFGINCR,DIC,"MODE"),U)="M"
 S ^UTILITY("DIFG",$J,DIFGINCR,DIC,"GL")=^DIC(DIC,0,"GL"),(DA,DIFGDA(0))=DIFGALNK I $D(^("DIC(""DR"")")) S ^("MODE")="A"_"^"_$P(^("MODE"),U,2)
X2 K DIFGFLUS Q
 ;
KILLVAR0 ;KILL VARIABLES AFTER LOOKUP FOR FILE ON THE WAY TO FIELDS
 K DIFGALNK,DIFGO(DIFGMULT),DIFGFLD,DIFGPC,DIFGVAL,DIFGDOL,DIFGNUMF,DIFGNOLK,DIFGLAGO,Y,DIFG("NOLKUP")
 Q
 ;
KILLVAR ;KILL VARIABLES AFTER EACH CONTEXT SWITCH
 ;----- BEGIN IHS MODIFICATION
 ;THE LINE BELOW IS COMMENTED OUT AND REPLACED BY THE NEXT TWO LINES
 ;THE 2ND PIECE OF DIFGMO(DIFGMULT) IS SOMETIMES NULL, CAUSING A
 ;SUBSCRIPT ERROR IN FILEGRAM INSTALLS. ORIGINAL MODIFICATION BY
 ;IHS/TUCSON/LAB 3/13/96
 ;K DIFGDA,DIFGDIC,DIFGDOL,DIFGFIND,DIFGFIRP,DIFGFLDN,DIFGHAT,DIFGMLND,DIFGNODE,DIFGNUM,DIFGNUMF,DIFGPC,DIFGPTER,DIFGSECP,DIFGSTRT,DIFGVAL,DIFGNDC,DIFGM,DIFGFLD,DIFGNOLK($P(DIFGMO(DIFGMULT),U,2)),DIFGDIC,DIFGSAVE,DIFGSVVL
 K DIFGDA,DIFGDIC,DIFGDOL,DIFGFIND,DIFGFIRP,DIFGFLDN,DIFGHAT,DIFGMLND,DIFGNODE,DIFGNUM,DIFGNUMF,DIFGPC,DIFGPTER,DIFGSECP,DIFGSTRT,DIFGVAL,DIFGNDC,DIFGM,DIFGFLD,DIFGDIC,DIFGSAVE,DIFGSVVL
 K:$P($G(DIFGMO(DIFGMULT)),U,2)]"" DIFGMOLK($P(DIFGMO(DIFGMULT),U,2))
 ;----- END IHS MODIFICATION
 K DIFGSKIP
 Q
 ;