Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: XMCD

XMCD.m

Go to the documentation of this file.
  1. XMCD ;(WASH ISC)/THM-Communications Diagnostics ;04/17/2002 08:27
  1. ;;8.0;MailMan;;Jun 28, 2002
  1. ; Entry points used by MailMan options (not covered by DBIA):
  1. ; DIALER XMDXMODEM
  1. ; TRAN XMDXSCRIPT
  1. ; SMTP XMDXSMTP
  1. Q
  1. DIALER ; Test the modem autodialer
  1. W !!,"This tests the modem autodialer by allowing you to enter a phone number"
  1. W !,"which this program will then dial on the selected modem.",!!
  1. N XMABORT,XMPHONE,XMHANG,XMSTAT,XMDIAL,DIR,X,Y
  1. S (XMABORT,ER)=0
  1. F D ^%ZIS Q:POP D Q:XMABORT
  1. . D D1^XMC1B
  1. . U IO(0)
  1. . I XMC("MODEM")="" W !,$C(7),"This device has no modem defined for it." Q
  1. . W !,^%ZIS(2,XMC("MODEM"),0)," is the defined modem for device ",IO
  1. . I $L(XMSTAT) W !,"Checking status..." U IO X XMSTAT U IO(0) W " Status: ",Y
  1. . I '$L(XMDIAL) W !,"No dialer logic specified for this modem type" Q
  1. . I '$L(XMHANG) W !,"No hangup logic specified for this modem type",$C(7) Q
  1. . F D Q:XMABORT!'ER
  1. . . K DIR,X,Y
  1. . . S DIR(0)="F^3:30"
  1. . . S DIR("A")="Enter the phone number to dial"
  1. . . D ^DIR I $D(DIRUT) S XMABORT=1 Q
  1. . . S XMPHONE=Y
  1. . . U IO X XMDIAL U IO(0)
  1. . . I ER W !,$C(7),"Call failed: ",Y
  1. . Q:XMABORT
  1. . W !,"Successful. Now hanging up ..."
  1. . U IO X XMHANG U IO(0)
  1. . I ER W !,$C(7),"Hang up unsuccessful" Q
  1. . W !,"Hang up successful."
  1. D KILL^XMC
  1. Q
  1. SMTP ; SMTP Tester
  1. W !!,"This procedure will test the Simple Mail Transfer Protocol,"
  1. W !,"allowing you to interactively enter each of the SMTP commands."
  1. W !,"The messages will not actually be delivered to the named recipients."
  1. W !,"That which you type will be preceded with an 'S: '."
  1. W !,"The SMTP responses will be preceded with an 'R: '"
  1. W !!,"Terminate the session with a QUIT command",!!
  1. D TST^XMR
  1. Q
  1. TRAN ; Test transmission error rates, speeds
  1. N XMSECURE,%X,%Y
  1. W !!,"This will test a link by executing the script, then sending 20 lines"
  1. W !,"in echo test mode. It will report the number of recoverable and "
  1. W !,"unrecoverable errors, as well as the transmission efficiency."
  1. D LOADCODE^XMJMCODE
  1. S %X="XMSECURE(",%Y="^TMP(""XMS"",$J,""S""," D %XY^%RCR
  1. K XMSECURE
  1. S XMC("TEST")=1
  1. D PLAY^XMCX
  1. K XMC("TEST"),^TMP("XMS",$J,"S")
  1. D KILL^XMC
  1. Q