| 1 | DIWE11 ;SFISC/GFT,MWE-WORD PROCESSING UTILITY FUNCTION ;3/4/92  9:55 AM
 | 
|---|
| 2 |  ;;22.0;VA FileMan;;Mar 30, 1999
 | 
|---|
| 3 |  ;Per VHA Directive 10-93-142, this routine should not be modified.
 | 
|---|
| 4 |  S DWOU="EFT"
 | 
|---|
| 5 | 1 R !,"UTILITY Option: ",X:DTIME S:'$T DTOUT=1 G QQ:U[X!(X=".")
 | 
|---|
| 6 | LC I X?1L S X=$C($A(X)-32)
 | 
|---|
| 7 |  S J="^DOPT(""DIWE11""," I X?1U S I=$F(DWOU,X)-1 I I>0 S ^DISV(DUZ,J)=I S I=I*2-1 G OPT
 | 
|---|
| 8 |  I X=" ",$D(^DISV(DUZ,J)) S I=^(J),X=$E(DWOU,I) I X]"" W X S I=I*2-1 G OPT
 | 
|---|
| 9 |  W !?5,"Choose, by first letter, a Utility Command"
 | 
|---|
| 10 |  I X?2"?".E W " from the following:" F I=1:2 S Y=$T(OPT+I),J=$E(Y,1) Q:J=" "  I DWOU[J W !?10,$P(Y,";",4)
 | 
|---|
| 11 |  G 1
 | 
|---|
| 12 |  ;
 | 
|---|
| 13 | OPT Q:$D(DTOUT)  S X1=$T(OPT+I),X=$P(X1,";",3) W $E(X,'$X)_$E(X,2,99) G @$E(X1,1)
 | 
|---|
| 14 | E ;;Editor;Editor Change
 | 
|---|
| 15 |  G ^DIWE12
 | 
|---|
| 16 | F ;;File transfer;File Transfer from Foreign CPU
 | 
|---|
| 17 |  G NA:'$D(^%ZOSF("EON"))!'$D(^("EOFF")) D X^DIWE5 G QQ
 | 
|---|
| 18 | T ;;Text-Terminator;Text-Terminator-String Change
 | 
|---|
| 19 |  D TT G QQ
 | 
|---|
| 20 |  ;;
 | 
|---|
| 21 | TT ;
 | 
|---|
| 22 |  W !,"Text-Terminator: ",$S(DIWPT="":"<NULL-STRING>",1:DIWPT),"//"
 | 
|---|
| 23 |  R X:DTIME S:'$T DTOUT=1 Q:U[X
 | 
|---|
| 24 |  K:$L(X)>5!(X'?.ANP)!(X["?")!(X["^") X
 | 
|---|
| 25 |  I '$D(X) W !?5,"Answer must be 1 to 5 Characters, no question marks or up-arrows,",!?5,"to go back to the Null-String just type ""@"" !",$C(7) G TT
 | 
|---|
| 26 |  I X="@" W !?5,"Text-Terminator is now Null-String !" S X=""
 | 
|---|
| 27 |  S DIWPT=X Q
 | 
|---|
| 28 | QQ K DWOU Q
 | 
|---|
| 29 | ASK W ! S DIR("A")="MAXIMUM string length? "
 | 
|---|
| 30 |  S DIR("B")=75,DIR(0)="N^3:245:0" D ^DIR K DIR I $D(DIRUT) S X="" G XQ1
 | 
|---|
| 31 |  W !!,"You have 30 seconds to start sending text."
 | 
|---|
| 32 |  W !,"An End Of File is assumed on 30 second time-out."
 | 
|---|
| 33 |  W !!,"TABs are converted to 1 thru 9 spaces to start the next character"
 | 
|---|
| 34 |  W !,"at a column evenly divisable by 9 plus 1. (10,19,28,37...)"
 | 
|---|
| 35 |  W !!,"End of Line = Carriage Return/$C(13) or Escape/$C(27)."
 | 
|---|
| 36 |  W !,"All other control characters will be stripped.",!!
 | 
|---|
| 37 |  Q
 | 
|---|
| 38 | XQ X ^%ZOSF("EON") W !!,"File Transfer Complete",$C(7),!
 | 
|---|
| 39 | XQ1 K %,%1,%2,%B,%0,DIWL,DIR,DIRUT,DIROUT,DTOUT,DUOUT
 | 
|---|
| 40 |  Q
 | 
|---|
| 41 | NA W !!,"This option is not available without the rest of the KERNEL"
 | 
|---|
| 42 |  G QQ
 | 
|---|