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

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

initial load of FOIAVistA 6/30/08 version

File size: 2.5 KB
Line 
1DDBRWB ;SFISC/DCL-VA FILEMAN BROWSER PROTOCOLS ;NOV 04, 1996@13:56
2 ;;22.0;VA FileMan;;Mar 30, 1999
3 ;Per VHA Directive 10-93-142, this routine should not be modified.
4 Q
5STPB ; Save To Paste Buffer
6 I DDBSA=$NA(^TMP("DDWB",$J)) D G PS^DDBR2
7 .N X
8 .S X(1)="",X(2)=$$CTXT^DDBR("<< Copy to Paste Buffer RESTRICTED When Viewing Buffer >>","",IOM)
9 .W $$WS^DDBR1(.X),$C(7)
10 .R X:5
11 .Q
12 I $E(DDBSA,1,11)="^DI(.84,920" D G PS^DDBR2
13 .N X
14 .S X(1)="",X(2)=$$CTXT^DDBR("<< RESTRICTED Must Exit HELP to Copy to Paste Buffer >>","",IOM)
15 .W $$WS^DDBR1(.X),$C(7)
16 .R X:5
17 .Q
18 N X,XF,XT
19GTR S X(1)=$G(X(1)),X(2)="Copy Text Line(s) to Paste Buffer >"
20 W $$WS(.X)
21 D G:X=""!(X=U) OUT
22 .D EN^DIR0($P(DDBSY,";",3)-1,$L($G(X(2)))+2,30,1,"",100,1,"","KPW",.X)
23 .K DIR0
24 .Q
25 I $E(X)="?" S X(1)="* Enter line or range, separated by "":"", of lines *" G GTR
26 I 'X&($E(X)'="*") G OUT
27 I $E(X)="*" S X=$TR(X,"a","A"),XF=1,XT=DDBTL
28 E S X=$TR(X,"a-/;|* ","A:::::"),XF=+X,XT=+$P(X,":",2)
29 I XF<1!(XF>DDBTL) S X(1)="Must be a valid line or range of lines, from 1 to "_DDBTL G GTR
30 I XT,XT<1!(XT>DDBTL) S X(1)="Must be a valid line or range of lines, from 1 to "_DDBTL G GTR
31 I XT>0,XT<XF S X(1)="To value must be greater than from value" G GTR
32 D SAVE(XF,$S(XT'>0:XF,1:XT),X["A")
33 K X
34 S X(2)="Text Copied to Buffer"
35 W $$WS(.X)
36 R X:3
37 G OUT
38 ;
39SAVE(FR,TO,APN) ; Save From To (lines) APN=append to end of current list
40 K:'APN ^TMP("DDWB",$J)
41 N I,II
42 S II=$O(^TMP("DDWB",$J,""),-1)+1
43 I DDBZN D Q
44 .F I=FR:1:TO S ^TMP("DDWB",$J,II)=@DDBSA@(I,0),II=II+1
45 .Q
46 F I=FR:1:TO S ^TMP("DDWB",$J,II)=@DDBSA@(I),II=II+1
47 Q
48VIEW I DDBSA=$NA(^TMP("DDWB",$J)) S DDBL=0 D SDLR^DDBR0(1),RLPIR^DDBR0 Q
49 I $E(DDBSA,1,11)="^DI(.84,920" D G PS^DDBR2
50 .N X
51 .S X(1)="",X(2)=$$CTXT^DDBR("<< RESTRICTED Must Exit HELP To View Buffer >>","",IOM)
52 .W $$WS^DDBR1(.X),$C(7)
53 .R X:5
54 .Q
55 N DDBHA,DDBHAT S DDBHA=$NA(^TMP("DDWB",$J)),DDBHAT=0
56 I $D(^TMP("DDWB",$J))'>9 S ^TMP("DDWB",$J,1)="< No Text >",DDBHAT=1
57 D BROWSE^DDBR(DDBHA,"PNH","View Paste Buffer",$G(DDBHELPS),"",IOTM-1,IOBM+1)
58 K:DDBHAT ^TMP("DDWB",$J)
59 W @IOSTBM
60 D PSR^DDBR0(1)
61 Q
62 ;
63SWITCH ; Switching Restricted while in View
64 N X
65 S X(1)="",X(2)=$$CTXT^DDBR("<< RESTRICTED Must Exit View Buffer to SWITCH >>","",IOM)
66 W $$WS^DDBR1(.X),$C(7)
67 R X:5
68 G PS^DDBR2
69 ;
70OUT D PSR^DDBR0()
71 Q
72 ;
73WS(X) S DX=0,DY=$P(DDBSY,";",3)-3 X IOXY
74 W $P(DDGLGRA,DDGLDEL)
75 W $TR($J("",IOM)," ",$P(DDGLGRA,DDGLDEL,3))
76 W $P(DDGLGRA,DDGLDEL,2)
77 W !,$P(DDGLCLR,DDGLDEL),$G(X(1))
78 W !,$P(DDGLCLR,DDGLDEL),$G(X(2))
79 W !,$P(DDGLCLR,DDGLDEL),$G(X(3))
80 S DY=$P(DDBSY,";",3),DX=$L($G(X(2)))+2 X IOXY
81 Q ""
Note: See TracBrowser for help on using the repository browser.