source: WorldVistAEHR/trunk/r/LAB_SERVICE-LR-LS/LRSRVR4.m@ 1199

Last change on this file since 1199 was 613, checked in by George Lilly, 15 years ago

initial load of WorldVistAEHR

File size: 816 bytes
RevLine 
[613]1LRSRVR4 ;DALOI/JMC -LAB DATA SERVER, CONT'D - UUENCODE UTILITY ; Dec 14, 2004
2 ;;5.2;LAB SERVICE;**303**;Sep 27, 1994
3 ;
4 ;
5UUEN(STR) ; Uuencode string passed in.
6 N J,K,LEN,LRI,LRX,S,TMP,X,Y
7 S TMP="",LEN=$L(STR)
8 F LRI=1:3:LEN D
9 . S LRX=$E(STR,LRI,LRI+2)
10 . I $L(LRX)<3 S LRX=LRX_$E(" ",1,3-$L(LRX))
11 . S S=$A(LRX,1)*256+$A(LRX,2)*256+$A(LRX,3),Y=""
12 . F K=0:1:23 S Y=(S\(2**K)#2)_Y
13 . F K=1:6:24 D
14 . . S J=$$DEC^XLFUTL($E(Y,K,K+5),2)
15 . . S TMP=TMP_$C(J+32)
16 S TMP=$C(LEN+32)_TMP
17 Q TMP
18 ;
19 ;
20ENCODE(LRSTR) ; Encode a string, keep remainder for next line
21 ; Call with LRSTR by reference, Remainder returned in LRSTR
22 ;
23 S LRQUIT=0,LRLEN=$L(LRSTR)
24 F D Q:LRQUIT
25 . I $L(LRSTR)<45 S LRQUIT=1 Q
26 . S LRX=$E(LRSTR,1,45)
27 . S LRNODE=LRNODE+1,^TMP($J,"LRDATA",LRNODE)=$$UUEN(LRX)
28 . S LRSTR=$E(LRSTR,46,LRLEN)
29 Q
Note: See TracBrowser for help on using the repository browser.