source: FOIAVistA/tag/r/ENGINEERING-EN/ENARL.m@ 1096

Last change on this file since 1096 was 628, checked in by George Lilly, 15 years ago

initial load of FOIAVistA 6/30/08 version

File size: 2.6 KB
Line 
1ENARL ;(WIRMFO)/JED/SAB-ARCHIVE ACTIVITY LOG ;2.19.97
2 ;;7.0;ENGINEERING;**40**;Aug 17, 1993
3 ;CALLED BY ENAR
4 Q
5L ; entry point
6 ; ask log entry
7 S DIC="^ENG(6919,",DIC(0)="AEQM"
8 D ^DIC G:Y<0 EXIT S ENDA=+Y
9L1 ; entry point with ENDA already defined
10 ; if equipment archive then ask if equipment should also be listed
11 S ENEQL=0 I $P($G(^ENG(6919,ENDA,1)),U)=3 D G:$D(DIRUT) EXIT
12 . S DIR(0)="Y",DIR("A")="Should archived equipment Entry #s be listed"
13 . S DIR("B")="NO"
14 . D ^DIR K DIR S ENEQL=Y
15 ; ask device
16 D DEV^ENLIB G:POP EXIT
17 I $D(IO("Q")) D G EXIT
18 . S ZTRTN="PRNT^ENARL",ZTDESC="Engineering Archive Activity Log"
19 . S ZTSAVE("ENDA")="",ZTSAVE("ENEQL")=""
20 . D ^%ZTLOAD,HOME^%ZIS K ZTSK
21PRNT ; queued entry point
22 S (END,ENPG)=0 D NOW^%DTC S Y=% D DD^%DT S ENDTR=Y
23 K ENDL S $P(ENDL,"-",80)=""
24 S ENDAN=$P($G(^ENG(6919,ENDA,0)),U)
25 D HD
26 ; print archive log
27 S ENY=$G(^ENG(6919,ENDA,1))
28 W !,"RECORDS TYPE: ",$$EXTERNAL^DILFD(6919,1,"",$P(ENY,U))
29 W ?40,"FILE VERSION: ",$P(ENY,U,8)
30 W !,"START DATE: ",$$FMTE^XLFDT($P(ENY,U,2))
31 W ?40,"STOP DATE: ",$$FMTE^XLFDT($P(ENY,U,3))
32 W !,"OPT PARAMETERS: ",$P(ENY,U,4)
33 W !,"RECORDS SAVED: ",$P(ENY,U,5)
34 W ?25,"PHYSICAL LOCATION: ",$P(ENY,U,6)
35 W !,"TAPE DESCRIPTION: ",$P(ENY,U,7)
36 ; print activity list
37 D HDA
38 I '$O(^ENG(6919,ENDA,2,0)) W !!,"There is no activity recorded"
39 E S ENI=0 F S ENI=$O(^ENG(6919,ENDA,2,ENI)) Q:'ENI D Q:END
40 . I $Y+4>IOSL D HD Q:END D HDA
41 . S ENX=$G(^ENG(6919,ENDA,2,ENI,0))
42 . S ENX(1)=$$FMTE^XLFDT($P(ENX,U))
43 . S ENX(2)=$$EXTERNAL^DILFD(6919.01,1,"",$P(ENX,U,2))
44 . W !,?5,$P(ENX(1),"@")," ",$P(ENX(1),"@",2),?28,ENX(2),?50,$P(ENX,U,3)
45 ; print equipment list
46 I 'END,ENEQL D
47 . I $Y+8>IOSL D HD Q:END
48 . D HDE S ENX=""
49 . I '$O(^ENG(6919,ENDA,3,0)) W !!,"There is no archived equipment"
50 . E S ENI=0 F S ENI=$O(^ENG(6919,ENDA,3,ENI)) Q:'ENI D Q:END
51 . . I $Y+4>IOSL D HD Q:END D HDE
52 . . S ENEQ=$P($G(^ENG(6919,ENDA,3,ENI,0)),U)
53 . . I $L(ENX)+$L(ENEQ)+11>IOM W !,?5,ENX_"," S ENX=ENEQ
54 . . E S ENX=ENX_$S(ENX]"":", ",1:"")_ENEQ
55 . I 'END,ENX]"" W !,?5,ENX
56 I 'END,$E(IOST,1,2)="C-" S DIR(0)="E" D ^DIR K DIR
57 I $D(ZTQUEUED) S ZTREQ="@"
58 D ^%ZISC
59EXIT ;
60 K DIC,DIR,DIROUT,DIRUT,DTOUT,DUOUT,X,Y
61 K END,ENDA,ENDAN,ENDL,ENDTR,ENEQ,ENEQL,ENI,ENPG,ENX,ENY
62 Q
63 ;
64HD ; page header
65 I $E(IOST,1,2)="C-",ENPG S DIR(0)="E" D ^DIR K DIR I 'Y S END=1 Q
66 I $E(IOST,1,2)="C-"!ENPG W @IOF
67 S ENPG=ENPG+1
68 W !,"Archive Log Report ",?49,ENDTR,?72,"page ",ENPG
69 W !,"ARCHIVE ID: ",ENDAN
70 Q
71HDA ; activity list header
72 W !!,ENDL
73 W !?5,"ACTIVITY DATE",?28,"ACTIVITY TYPE",?50,"REQUESTOR"
74 W !,ENDL
75 Q
76HDE ; equipment list header
77 W !!,ENDL
78 W !,?5,"ARCHIVED EQUIPMENT LIST"
79 W !,ENDL
80 Q
81 ;ENARL
Note: See TracBrowser for help on using the repository browser.