1 | DVBHQD2 ;ALB/CMM - INDIVIDUAL HINQ ; 7/7/05 11:15am
|
---|
2 | ;;4.0;HINQ;**22,33,34,43,49**;03/25/92
|
---|
3 | ;
|
---|
4 | KTO K TRY,CN,DVBZ0,DVBZ1 Q
|
---|
5 | ;
|
---|
6 | DOT U IO(0) W "." U IO Q
|
---|
7 | ;
|
---|
8 | ABS S Y0=255-Y0 Q:($Y+Y0)<(DVBIOSL-4)
|
---|
9 | ;
|
---|
10 | SROLL Q:DVBIOST'["C-"!($D(DVBJDX)) U IO(0) W !,$C(7),"Press Enter to continue or '^' to quit" R X:DTIME S:'$T X="^" W @DVBIOF S Y0=$Y Q
|
---|
11 | ;
|
---|
12 | REQENT U IO(0) W !,"Request being processed " U IO Q
|
---|
13 | ;
|
---|
14 | RECMAL U IO(0) W !,"Response received and mailed" Q
|
---|
15 | ;
|
---|
16 | LOAD2 ;
|
---|
17 | U IO(0) W !!
|
---|
18 | I $D(DVBRTC) W $S(DVBRTC>3:"Received 'Missing Character' more than 9 times.",1:"")
|
---|
19 | W !,"Try again later."
|
---|
20 | S IO=DVBIO U IO(0) K DVBP,DVBMISS S DVBABORT=0
|
---|
21 | G ASK^DVBHQD1
|
---|
22 | Q
|
---|
23 | LOAD ;
|
---|
24 | U IO(0) W !!
|
---|
25 | I $D(DVBRTC) W $S(DVBRTC>3:"Received 'Missing Character' more than 9 times.",1:"")
|
---|
26 | U IO(0) W !," Request loaded into the HINQ Suspense file with a status of Pending."
|
---|
27 | Q
|
---|
28 | RETRY ;
|
---|
29 | N ANS
|
---|
30 | S DVBRTC=DVBRTC+1 I DVBRTC>3 S DVBNRT="N" Q
|
---|
31 | U IO(0) R !!,"Received 'Missing Character' 3 times,",!,"Would you like to try again (Y/N)? Y//",ANS:DTIME
|
---|
32 | I ('$T)!(ANS["^")!("N"=$E(ANS))!("n"=$E(ANS)) S DVBNRT="N" Q
|
---|
33 | I ANS["?" W !!,"Enter Y to try again or N to Quit",!! G RETRY
|
---|
34 | I (ANS="")!("Yy"[$E(ANS)) S DVBNRT="Y",DVBTRY=1 W !! Q
|
---|
35 | G RETRY
|
---|
36 | ;
|
---|
37 | SEND K X U IO F Z=1:1:1000 R *X:0 Q:'$T
|
---|
38 | W $S('TRY:DVBZ0,1:DVBZ1),$C(13),! S DVBECHO=$P($H,",",2)
|
---|
39 | ;
|
---|
40 | REC ;;;U IO R X:10 S DVBECHO=$P($H,",",2)-DVBECHO I 'DVBTSK D REQENT^DVBHQD2
|
---|
41 | ;;;I '$L(X) S DVBABORT=DVBABORT+1 U IO(0) W:'DVBTSK "No response" H 1 Q
|
---|
42 | ;
|
---|
43 | S F4=5
|
---|
44 | F Z=1:1:10 R X(1)#512:33 Q:$L(X(1))&(X(1)'=$C(10)) D:DVBXM DOT
|
---|
45 | S F1=$F(X(1),DVBEND) G:F1 OK^DVBHQD1
|
---|
46 | ;
|
---|
47 | ;added with DVB*4*49 to make loops more robust and to add more
|
---|
48 | ;iterations of the loop if needed
|
---|
49 | N DVBC,DVBCT
|
---|
50 | S DVBCT=0
|
---|
51 | F DVBC=2:1:30 D LOOP Q:DVBCT=1
|
---|
52 | I DVBCT=0 S DVBABORT=DVBABORT+1
|
---|
53 | Q
|
---|
54 | LOOP ;
|
---|
55 | F Z=1:1:4 R X(DVBC)#512:5 Q:$L(X(DVBC))!DVBCT=1 D:DVBXM DOT
|
---|
56 | S F1=$F(X(DVBC),DVBEND) I F1 S DVBCT=1 G OK^DVBHQD1
|
---|
57 | S W=DVBC D CH^DVBHQD1 I F1 S DVBCT=1 G OK^DVBHQD1
|
---|
58 | Q
|
---|