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

ENETRAN.m

Go to the documentation of this file.
ENETRAN ;(WASH ISC)/DH-Assign Electronic Work Orders ;1.30.97
 ;;7.0;ENGINEERING;**35**;Aug 17, 1993
EN N IOINLOW,IOINHI D ZIS^ENUTL
 S %DT="XT",X="N" D ^%DT X ^DD("DD") S ENDATE=Y
 I $D(ENSHKEY),ENSHKEY'>0 K ENSHKEY
 I $D(ENSHKEY),ENSHKEY#100>89 D GATH2 G EXIT
 S:$D(ENSHKEY) ENOLKEY=ENSHKEY K ENSHKEY I $D(^DIC(6910,1,0)),$P(^(0),U,6)]"" S ENSHKEY=$P(^(0),U,6)
 E  S DIC="^DIC(6922,",DIC(0)="AEQ",DIC("S")="I Y#100>89" D ^DIC K DIC("S") G:Y'>0 EXIT S ENSHKEY=+Y
 I $D(ENSHKEY) D GATH2 G EXIT
GATH1 ;
 S ENSHKEY=89 F  S ENSHKEY=$O(^DIC(6922,ENSHKEY)) Q:ENSHKEY'>0  D:ENSHKEY#100>89 GATH2
 G EXIT
GATH2 ;Procss fict shop
 K ^TMP($J) S ENCNT=0
 S ENSHOP=$P(^DIC(6922,ENSHKEY,0),U,1)
 ;   get work orders from incomplete work order x-ref ("AINC")
 S ENDX=0
 F  S ENDX=$O(^ENG(6920,"AINC",ENSHKEY,ENDX)) Q:ENDX'>0  D
 . S DA=9999999999-ENDX
 . Q:'$D(^ENG(6920,DA,0))  ; missing 0 node
 . Q:$P($G(^ENG(6920,DA,5)),U,2)]""  ; closed out
 . L +^ENG(6920,DA):1 I '$T Q  ; being edited
 . ; OK to add on list
 . L -^ENG(6920,DA)
 . S ENCNT=ENCNT+1,^TMP($J,DA)="" W:'(ENCNT#10) "."
DONE D ^ENETRAN1
 Q
 ;
EXIT K ^TMP($J),ENSHOP,ENDA,ENDATE,ENCNT,ENL,ENWO,ENEWO,ENSHKEY,ENDSTAT,ENLOC,ENDX
 K EN,ENPG,ENY,ENTO,ENFR,ENDA,ENPRI,ENMAN,ENCAT,ENEX,ENEX1,ENEX2,ENEX3,ENEX4,ENERN,ENRDT,ENBY,ENDATE,ENNX,ENEWKEY,ENSABR,ENTRAN,ENCODEN,ENCODE,ENCODEI
 K I,J,K,X,DIC,DIE,DA,DR,DIWL,DIWR,DIWF
 I $D(ENOLKEY) S ENSHKEY=ENOLKEY K ENOLKEY
 S:$D(ZTQUEUED) ZTREQ="@"
 Q
HLD S X="" W !,"Press RETURN to continue, '^' to escape..." R X:DTIME
 Q
 ;ENETRAN