ENARX12 ;(WASH ISC)/SAW/DH-Work Order Archive ;2.10.97
;;7.0;ENGINEERING;**40**;Aug 17, 1993
D DT^DICRW S %=1,U="^",DSEC=0
I $D(DIFQ(0)) W !,"SHALL I WRITE OVER EXISTING DATA DEFINITIONS" S %=2 D YN^DICN
S NO=$P("I 0^I $D(@X)#2,X[U",U,%) I %<1 K DIFQ Q
I %=1,$D(DIFQ(0)) W !,"SHALL I WRITE OVER FILE SECURITY CODES" S %=2 D YN^DICN S DSEC=%=1 I %<1 K DIFQ Q
Q:'$D(DIFQ) S %=0 W !!,"ARE YOU SURE EVERYTHING'S OK" D YN^DICN I %-1 K DIFQ Q
D DT^DICRW K ^UTILITY(U,$J),^UTILITY("DIK",$J) D WAIT^DICD F R=1001:1:1002 D @("^ENARX1"_$E(R,3,4)) W "."
F D=6919.1,6919.11,6919.12,6919.13 D IX
DATA W "." S (D,DDF(1),DDT(0))=$O(^UTILITY(U,$J,0)) Q:D'>0
I '$D(DIFQ(D)) S DTO=0,DMRG=1,DTO(0)=^(D),Z=^(D)_"0)",D0=^(D,0),@Z=D0,DFR(1)="^UTILITY(U,$J,DDF(1),D0,",DKP='$D(DIFQR(D)) F D0=0:0 S D0=$O(^UTILITY(U,$J,DDF(1),D0)) Q:'$D(^(D0,0)) S Z=^(0) D I^DITR
K ^UTILITY(U,$J,DDF(1)),DDF,DDT,DTO,DFR,DFN,DTN G DATA
;
W S Y=$P($T(@X),";",2) W !,"NOTE: THIS PACKAGE ALSO CONTAINS "_Y_"S",! Q:'$D(DIFQ(0))
S %=2 W ?5,"SHALL I WRITE OVER EXISTING "_Y_"S OF THE SAME NAME" D YN^DICN I %-1 S DIFQ(X)=0 K:%<1 DIFQ
Q
;
OPT ;OPTION
ROU ;ROUTINE DOCUMENTATION NOTE
FUNC ;FUNCTION
BULL ;BULLETIN
SE ;SECURITY KEY
HELP ;HELP FRAME
DIPT ;PRINT TEMPLATE
DIE ;INPUT TEMPLATE
DIBT ;SORT TEMPLATE
;
IX W "." S DIK="A" F %=0:0 S DIK=$O(^DD(D,DIK)) Q:DIK="" K ^(DIK)
S DA(1)=D,DIK="^DD("_D_"," D IXALL^DIK
I $D(^DIC(D,"%",0)) S DIK="^DIC(D,""%""," G IXALL^DIK
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HENARY12 1471 printed Dec 13, 2024@01:51:43 Page 2
ENARX12 ;(WASH ISC)/SAW/DH-Work Order Archive ;2.10.97
+1 ;;7.0;ENGINEERING;**40**;Aug 17, 1993
+2 DO DT^DICRW
SET %=1
SET U="^"
SET DSEC=0
+3 IF $DATA(DIFQ(0))
WRITE !,"SHALL I WRITE OVER EXISTING DATA DEFINITIONS"
SET %=2
DO YN^DICN
+4 SET NO=$PIECE("I 0^I $D(@X)#2,X[U",U,%)
IF %<1
KILL DIFQ
QUIT
+5 IF %=1
IF $DATA(DIFQ(0))
WRITE !,"SHALL I WRITE OVER FILE SECURITY CODES"
SET %=2
DO YN^DICN
SET DSEC=%=1
IF %<1
KILL DIFQ
QUIT
+6 if '$DATA(DIFQ)
QUIT
SET %=0
WRITE !!,"ARE YOU SURE EVERYTHING'S OK"
DO YN^DICN
IF %-1
KILL DIFQ
QUIT
+7 DO DT^DICRW
KILL ^UTILITY(U,$JOB),^UTILITY("DIK",$JOB)
DO WAIT^DICD
FOR R=1001:1:1002
DO @("^ENARX1"_$EXTRACT(R,3,4))
WRITE "."
+8 FOR D=6919.1,6919.11,6919.12,6919.13
DO IX
DATA WRITE "."
SET (D,DDF(1),DDT(0))=$ORDER(^UTILITY(U,$JOB,0))
if D'>0
QUIT
+1 IF '$DATA(DIFQ(D))
SET DTO=0
SET DMRG=1
SET DTO(0)=^(D)
SET Z=^(D)_"0)"
SET D0=^(D,0)
SET @Z=D0
SET DFR(1)="^UTILITY(U,$J,DDF(1),D0,"
SET DKP='$DATA(DIFQR(D))
FOR D0=0:0
SET D0=$ORDER(^UTILITY(U,$JOB,DDF(1),D0))
if '$DATA(^(D0,0))
QUIT
SET Z=^(0)
DO I^DITR
+2 KILL ^UTILITY(U,$JOB,DDF(1)),DDF,DDT,DTO,DFR,DFN,DTN
GOTO DATA
+3 ;
W SET Y=$PIECE($TEXT(@X),";",2)
WRITE !,"NOTE: THIS PACKAGE ALSO CONTAINS "_Y_"S",!
if '$DATA(DIFQ(0))
QUIT
+1 SET %=2
WRITE ?5,"SHALL I WRITE OVER EXISTING "_Y_"S OF THE SAME NAME"
DO YN^DICN
IF %-1
SET DIFQ(X)=0
if %<1
KILL DIFQ
+2 QUIT
+3 ;
OPT ;OPTION
ROU ;ROUTINE DOCUMENTATION NOTE
FUNC ;FUNCTION
BULL ;BULLETIN
SE ;SECURITY KEY
HELP ;HELP FRAME
DIPT ;PRINT TEMPLATE
DIE ;INPUT TEMPLATE
DIBT ;SORT TEMPLATE
+1 ;
IX WRITE "."
SET DIK="A"
FOR %=0:0
SET DIK=$ORDER(^DD(D,DIK))
if DIK=""
QUIT
KILL ^(DIK)
+1 SET DA(1)=D
SET DIK="^DD("_D_","
DO IXALL^DIK
+2 IF $DATA(^DIC(D,"%",0))
SET DIK="^DIC(D,""%"","
GOTO IXALL^DIK