source: FOIAVistA/trunk/r/VA_FILEMAN-ARJT-DI-DD-DM-DT-%DT-%RCR/DDIOL.m@ 899

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

initial load of FOIAVistA 6/30/08 version

File size: 1.8 KB
Line 
1DDIOL ;SFISC/MKO-THE LOADER ;1:53 PM 12 Sep 1995
2 ;;22.0;VA FileMan;;Mar 30, 1999
3 ;Per VHA Directive 10-93-142, this routine should not be modified.
4 ;
5EN(A,G,FMT) ;Write the text contained in local array A or global array G
6 ;If one string passed, use format FMT
7 N %,Y,DINAKED
8 S DINAKED=$$LGR^%ZOSV
9 ;
10 S:'$D(A) A=""
11 I $G(A)="",$D(A)<9,$G(FMT)="",$G(G)'?1"^"1A.7AN,$G(G)'?1"^"1A.7AN1"(".E1")" Q
12 ;
13 G:$D(DDS) SM
14 G:$D(DIQUIET) LD
15 ;
16 N F,I,S
17 I $D(A)=1,$G(G)="" D
18 . S F=$S($G(FMT)]"":FMT,1:"!")
19 . W @F,A
20 ;
21 E I $D(A)>9 S I=0 F S I=$O(A(I)) Q:I'=+$P(I,"E") D
22 . S F=$G(A(I,"F"),"!") S:F="" F="?0"
23 . W @F,$G(A(I))
24 ;
25 E S I=0 F S I=$O(@G@(I)) Q:I'=+$P(I,"E") D
26 . S S=$G(@G@(I,0),$G(@G@(I)))
27 . S F=$G(@G@(I,"F"),"!") S:F="" F="?0"
28 . W @F,S
29 ;
30 I DINAKED]"" S DINAKED=$S(DINAKED["""""":$O(@DINAKED),1:$D(@DINAKED))
31 Q
32 ;
33LD ;Load text into ^TMP
34 N I,N,T
35 S T=$S($G(DDIOLFLG)["H":"DIHELP",1:"DIMSG")
36 S N=$O(^TMP(T,$J," "),-1)
37 ;
38 I $D(A)=1,$G(G)="" D
39 . D LD1(A,$S($G(FMT)]"":FMT,1:"!"))
40 ;
41 E I $D(A)>9 S I=0 F S I=$O(A(I)) Q:I'=+$P(I,"E") D
42 . D LD1($G(A(I)),$G(A(I,"F"),"!"))
43 ;
44 E S I=0 F S I=$O(@G@(I)) Q:I'=+$P(I,"E") D
45 . D LD1($G(@G@(I),$G(@G@(I,0))),$G(@G@(I,"F"),"!"))
46 ;
47 K:'N @T S:N @T=N
48 I DINAKED]"" S DINAKED=$S(DINAKED["""""":$O(@DINAKED),1:$D(@DINAKED))
49 Q
50 ;
51LD1(S,F) ;Load string S, with format F
52 ;In: N and T
53 N C,J,L
54 S:S[$C(7) S=$TR(S,$C(7),"")
55 F J=1:1:$L(F,"!")-1 S N=N+1,^TMP(T,$J,N)=""
56 S:'N N=1
57 S:F["?" @("C="_$P(F,"?",2))
58 S L=$G(^TMP(T,$J,N))
59 S ^TMP(T,$J,N)=L_$J("",$G(C)-$L(L))_S
60 Q
61 ;
62SM ;Print text in ScreenMan's Command Area
63 I $D(DDSID),$D(DTOUT)!$D(DUOUT) G SMQ
64 N DDIOL
65 S DDIOL=1
66 ;
67 I $D(A)=1&($G(G)="")!($D(A)>9) D
68 . D MSG^DDSMSG(.A,"",$G(FMT))
69 E I $D(@G@(+$O(@G@(0)),0))#2 D
70 . D WP^DDSMSG(G)
71 E D HLP^DDSMSG(G)
72 ;
73SMQ I DINAKED]"" S DINAKED=$S(DINAKED["""""":$O(@DINAKED),1:$D(@DINAKED))
74 Q
Note: See TracBrowser for help on using the repository browser.