source: WorldVistAEHR/trunk/r/ENGINEERING-EN/ENLBL10.m@ 1361

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

initial load of WorldVistAEHR

File size: 3.1 KB
RevLine 
[613]1ENLBL10 ;(WASH ISC)/DH-Print Bar Coded Equipment Labels ;10.10.97
2 ;;7.0;ENGINEERING;**12,35,45**;Aug 17, 1993
3PM ;Range of PM numbers
4 S ENERR=0 D STA^ENLBL3 G:ENEQSTA="^" QUIT^ENLBL3
5 N DIC,DIE,DA,DR,X,X1,X2,I,J,K,I1
6PM1 S X="" R !,"Starting with: ",X:DTIME G:X=""!($E(X)="^") EXIT1^ENLBL8
7 I $E(X)="?" D G PM1
8 . W !!,"Property Management (PM) numbers should consist of four numbers, followed",!,"by a dash (-), followed by four more numbers. There may be an alphabetic"
9 . W !,"at the end (for a grand total of ten characters), but there usually isn't."
10 . W !!,"The first four numbers correspond to the Federal Supply Classification Code."
11 . W !,"The next four numbers are assigned at the site, usually by the Property",!,"Management Section in A&MM."
12 . W !!,"It is the intent of VACO Program Offices to phase out PM numbers in favor of",!,"the AEMS/MERS entry number, but no official timetable has been established.",!
13 S FR=X I FR'?4N1"-"4N W !,"Doesn't look like a standard PM number. Are you sure",*7 S %=2 D YN^DICN G:%<0 EXIT1^ENLBL8 G:%=2 PM1 I %=0 W !,"PM #'s look like '7025-5001'." G PM1
14 I FR=+FR S FR=FR_" "
15PM2 S X="" R !,"and ending with: ",X:DTIME G:X="^"!(X="") EXIT1^ENLBL8 S TO=X I FR]TO W !!,"Your ending point does not follow your starting point. I'm confused.",*7 G PM1
16 I TO'?4N1"-"4N W !,"Are you sure" S %=2 D YN^DICN G:%<0 EXIT1^ENLBL8 G:%=2 PM2 I %=0 W !,"PM numbers look like '7025-5001'." G PM2
17 I '$D(^ENG(6914,"C",FR)) S I=$O(^ENG(6914,"C",FR)) I I]TO W !!,*7,"Sorry, but there doesn't appear to be any equipment in specified range." G PM1
18 D EN^ENLBL9 I $D(DIRUT) G EXIT1^ENLBL8
19 I '$D(ENEQIO),%<0 G EXIT1^ENLBL8
20 S ENLOCSRT=1
21PM21 W !,"Sort labels by LOCATION" S %=1 D YN^DICN G:%<0 EXIT1^ENLBL8 I %=0 W !,"Say YES to sort labels by DIVISION, BUILDING, then by ROOM.",!,"If you say NO, labels will be sorted by VA PM #." G PM21
22 S:%=2 ENLOCSRT=0
23 S %ZIS("A")="Select BAR CODE PRINTER: ",%ZIS("B")="",%ZIS="Q" I $D(ENEQIO),ENEQIO=IO S %ZIS=""
24 K IO("Q") D ^%ZIS K %ZIS G:POP EXIT1^ENLBL8
25 S ENBCIO=IO,ENBCIOSL=IOSL,ENBCIOF=IOF,ENBCION=ION,ENBCIOST=IOST,ENBCIOST(0)=IOST(0),ENBCIOS=IOS S:$D(IO("S")) ENBCIO("S")=IO("S")
26 I $D(IO("Q")) K IO("Q") S ZTIO=ION,ZTRTN="PM3^ENLBL10",ZTSAVE("D*")="",ZTSAVE("EN*")="",ZTSAVE("FR")="",ZTSAVE("TO")="",ZTDESC="NX Barcode Labels by PM #" D ^%ZTLOAD K ZTSK G EXIT1^ENLBL8
27PM3 S ENEQBY="PM # "_FR_" thru "_TO
28 I $D(ENEQIO) D OPEN^ENLBL9 I POP G:$D(ZTQUEUED) REQ^ENLBL8 W !,*7,"Companion Printer UNAVAILABLE." D HOLD G EXIT1^ENLBL8
29 K ^TMP($J) S I1=FR I $D(^ENG(6914,"C",FR)) S DA=$O(^ENG(6914,"C",FR,0)) D STATCK^ENLBL3 I DA]"" D:ENLOCSRT SORT^ENLBL3 I 'ENLOCSRT D PMNSRT
30 F K=0:0 S I1=$O(^ENG(6914,"C",I1)) Q:I1=""!(I1]TO) S DA=$O(^ENG(6914,"C",I1,0)) D STATCK^ENLBL3 I DA]"" D:ENLOCSRT SORT^ENLBL3 D:'(DA#10) DOTS^ENLBL3 I 'ENLOCSRT D PMNSRT
31 I $D(^TMP($J)) U ENBCIO D FORMAT^ENLBL7 S I1="" F J1=0:0 S I1=$O(^TMP($J,I1)) Q:I1="" F DA=0:0 S DA=$O(^TMP($J,I1,DA)) Q:DA'>0 U ENBCIO D NXPRT^ENLBL7 D:$D(ENEQIO) CPRNT^ENLBL9 D:'(DA#10) DOTS^ENLBL3 D BCDT^ENLBL7
32 G EXIT^ENLBL8
33 ;
34PMNSRT S ^TMP($J,I1,DA)="" Q
35HOLD W !,"Press <RETURN> to continue..." R X:DTIME
36 Q
37 ;ENLBL10
Note: See TracBrowser for help on using the repository browser.