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

XMA21C.m

Go to the documentation of this file.
  1. XMA21C ;(WASH ISC)/CAP- Input Transform (3.7,.3) Mail Name ;04/17/2002 07:14
  1. ;;8.0;MailMan;;Jun 28, 2002
  1. ;
  1. ;Input transform for field .3 in file 3.7 (Mail Name)
  1. MNAME ;Change to all upper case
  1. I '$D(XMDUZ) N XMDUZ S XMDUZ=DUZ
  1. S X=$$UP^XLFSTR(X)
  1. I $L(X)<7!($L(X)>30) S %="Name cannot be "_$S($L(X)<7:"LESS THAN 7",1:"GREATER THAN 30")_" characters long." G QQ
  1. I X'?1.AN1"."1.AN1".".E,X'?1.AN,X'?1.AN1"."1.AN S %="Name must not contain punctuation other than a '.' and a maximum of two '.'s." G QQ
  1. ;
  1. L +^XMB(3.7,"C",X):1 E Q:$D(ZTQUEUED)!$D(XMCHAN) S %="Please try again, Some one else is enterring a mail name." G QQ
  1. ;
  1. ;Check if unique / inform user...
  1. I $D(^XMB(3.7,"C",X)) S %=$C(7)_" >> Already in use" G QQ
  1. N % S %=$O(^XMB(3.7,"C",X)) I $E(%,1,$L(X))=X S %=$C(7)_" >> This name is not unique -- it is a partial match to another name" G QQ
  1. ;
  1. ;Test if Name Server can find it elsewhere
  1. K XMY N XMA21C S XMA21C=X D WHO^XMA21 I $L($O(XMY(""))) S %="The string '"_XMA21C_"' identifies someone else." K XMY G QQ
  1. ;
  1. ;Put into x-ref so it cannot be used immediately
  1. S ^XMB(3.7,"C",X,XMDUZ)=""
  1. ;
  1. G Q
  1. QQ D Q K X Q:$D(ZTQUEUED)!$D(XMCHAN) W !!,$C(7),%,!! Q
  1. Q L -^XMB(3.7,"C",X) Q
  1. ;
  1. ;EXECUTABLE HELP
  1. HELP W !!,"Mail names are used as return addresses when you send a message to someone"
  1. W !,"whose mail box is in a different mail environment. It could be different"
  1. W !,"machines in the same facility, an entirely separate facility or simply a"
  1. W !,"different configuration (or UCI) on the same machine."
  1. W !!,"The valid format for a mail name is one that is acceptable to all"
  1. W !,"mail systems. It is therefore between 7 and 30 characters long, and"
  1. W !,"contains no punction other than periods. It may contain up to two (2)"
  1. W !,"periods each of which must be preceeded and succeeded with at least"
  1. W !,"one alpha or numeric character."
  1. Q