1 | XMCD ;(WASH ISC)/THM-Communications Diagnostics ;04/17/2002 08:27
|
---|
2 | ;;8.0;MailMan;;Jun 28, 2002
|
---|
3 | ; Entry points used by MailMan options (not covered by DBIA):
|
---|
4 | ; DIALER XMDXMODEM
|
---|
5 | ; TRAN XMDXSCRIPT
|
---|
6 | ; SMTP XMDXSMTP
|
---|
7 | Q
|
---|
8 | DIALER ; Test the modem autodialer
|
---|
9 | W !!,"This tests the modem autodialer by allowing you to enter a phone number"
|
---|
10 | W !,"which this program will then dial on the selected modem.",!!
|
---|
11 | N XMABORT,XMPHONE,XMHANG,XMSTAT,XMDIAL,DIR,X,Y
|
---|
12 | S (XMABORT,ER)=0
|
---|
13 | F D ^%ZIS Q:POP D Q:XMABORT
|
---|
14 | . D D1^XMC1B
|
---|
15 | . U IO(0)
|
---|
16 | . I XMC("MODEM")="" W !,$C(7),"This device has no modem defined for it." Q
|
---|
17 | . W !,^%ZIS(2,XMC("MODEM"),0)," is the defined modem for device ",IO
|
---|
18 | . I $L(XMSTAT) W !,"Checking status..." U IO X XMSTAT U IO(0) W " Status: ",Y
|
---|
19 | . I '$L(XMDIAL) W !,"No dialer logic specified for this modem type" Q
|
---|
20 | . I '$L(XMHANG) W !,"No hangup logic specified for this modem type",$C(7) Q
|
---|
21 | . F D Q:XMABORT!'ER
|
---|
22 | . . K DIR,X,Y
|
---|
23 | . . S DIR(0)="F^3:30"
|
---|
24 | . . S DIR("A")="Enter the phone number to dial"
|
---|
25 | . . D ^DIR I $D(DIRUT) S XMABORT=1 Q
|
---|
26 | . . S XMPHONE=Y
|
---|
27 | . . U IO X XMDIAL U IO(0)
|
---|
28 | . . I ER W !,$C(7),"Call failed: ",Y
|
---|
29 | . Q:XMABORT
|
---|
30 | . W !,"Successful. Now hanging up ..."
|
---|
31 | . U IO X XMHANG U IO(0)
|
---|
32 | . I ER W !,$C(7),"Hang up unsuccessful" Q
|
---|
33 | . W !,"Hang up successful."
|
---|
34 | D KILL^XMC
|
---|
35 | Q
|
---|
36 | SMTP ; SMTP Tester
|
---|
37 | W !!,"This procedure will test the Simple Mail Transfer Protocol,"
|
---|
38 | W !,"allowing you to interactively enter each of the SMTP commands."
|
---|
39 | W !,"The messages will not actually be delivered to the named recipients."
|
---|
40 | W !,"That which you type will be preceded with an 'S: '."
|
---|
41 | W !,"The SMTP responses will be preceded with an 'R: '"
|
---|
42 | W !!,"Terminate the session with a QUIT command",!!
|
---|
43 | D TST^XMR
|
---|
44 | Q
|
---|
45 | TRAN ; Test transmission error rates, speeds
|
---|
46 | N XMSECURE,%X,%Y
|
---|
47 | W !!,"This will test a link by executing the script, then sending 20 lines"
|
---|
48 | W !,"in echo test mode. It will report the number of recoverable and "
|
---|
49 | W !,"unrecoverable errors, as well as the transmission efficiency."
|
---|
50 | D LOADCODE^XMJMCODE
|
---|
51 | S %X="XMSECURE(",%Y="^TMP(""XMS"",$J,""S""," D %XY^%RCR
|
---|
52 | K XMSECURE
|
---|
53 | S XMC("TEST")=1
|
---|
54 | D PLAY^XMCX
|
---|
55 | K XMC("TEST"),^TMP("XMS",$J,"S")
|
---|
56 | D KILL^XMC
|
---|
57 | Q
|
---|