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

DDWK.m

Go to the documentation of this file.
  1. DDWK ;SFISC/MKO-SCREEN EDITOR MAIN ROUTINE ;11:32 AM 25 Aug 2000 [ 04/02/2003 8:25 AM ]
  1. ;;22.0;VA FileMan;**1001**;APR 1, 2003
  1. ;;22.0;VA FileMan;**18**;Mar 30, 1999
  1. ;Per VHA Directive 10-93-142, this routine should not be modified.
  1. ;
  1. GETKEY ;Get key sequences and defaults
  1. N AU,AD,AR,AL,F1,F2,F3,F4
  1. N FIND,SELECT,INSERT,REMOVE,PREVSC,NEXTSC
  1. N A1,A2,A3,I,K,N,T
  1. S AU=$P(DDGLKEY,U,2)
  1. S AD=$P(DDGLKEY,U,3)
  1. S AR=$P(DDGLKEY,U,4)
  1. S AL=$P(DDGLKEY,U,5)
  1. S F1=$P(DDGLKEY,U,6)
  1. S F2=$P(DDGLKEY,U,7)
  1. S F3=$P(DDGLKEY,U,8)
  1. S F4=$P(DDGLKEY,U,9)
  1. S FIND=$P(DDGLKEY,U,10)
  1. S SELECT=$P(DDGLKEY,U,11)
  1. S INSERT=$P(DDGLKEY,U,12)
  1. S REMOVE=$P(DDGLKEY,U,13)
  1. S PREVSC=$P(DDGLKEY,U,14)
  1. S NEXTSC=$P(DDGLKEY,U,15)
  1. ;
  1. S A1="DDW(""IN"")",A2="DDW(""OT"")",A3=0
  1. S (DDW("IN"),DDW("OT"))=""
  1. F I=1:1 S T=$P($T(MAP+I),";;",2,999) Q:T="" D
  1. . S @("K="_$P(T,";",2)),T=$P(T,";")
  1. . I K]"",@A1'[(U_K) D
  1. .. I $L(@A1)+$L(K)+2>255!($L(@A2)+$L(T)+1>255) D
  1. ... S @A1=@A1_U,$E(@A2,$L(@A2))=""
  1. ... S A3=A3+1,A1=$NA(@A1@(A3)),A2=$NA(@A2@(A3))
  1. ... S (@A1,@A2)=""
  1. .. S @A1=@A1_U_K
  1. .. S @A2=@A2_T_U
  1. S @A1=@A1_U,$E(@A2,$L(@A2))=""
  1. Q
  1. ;
  1. MAP ;Keys for main screen
  1. ;;UP;AU
  1. ;;DN;AD
  1. ;;RT;AR
  1. ;;LT;AL
  1. ;;TAB;$C(9)
  1. ;;PUP;F1_AU
  1. ;;PUP;PREVSC
  1. ;;PDN;F1_AD
  1. ;;PDN;NEXTSC
  1. ;;JLT;F1_AL
  1. ;;JRT;F1_AR
  1. ;;LB;FIND
  1. ;;LB;F1_F1_AL
  1. ;;LE;SELECT
  1. ;;LE;F1_F1_AR
  1. ;;TOP;F1_"T"
  1. ;;BOT;F1_"B"
  1. ;;WRT;F1_" "
  1. ;;WRT;$C(12)
  1. ;;WLT;$C(10)
  1. ;;RUB;$C(127)
  1. ;;RUB;$C(8)
  1. ;;DEL;REMOVE
  1. ;;DEL;F4
  1. ;;DEOL;F1_F2
  1. ;;BRK;$C(13)
  1. ;;JN;F1_"J"
  1. ;;RFT;F1_"R"
  1. ;;ST;F1_"?"
  1. ;;XLN;F1_"D"
  1. ;;TST;F1_$C(9)
  1. ;;TSALL;F1_F1_$C(9)
  1. ;;LST;F1_","
  1. ;;RST;F1_"."
  1. ;;WRM;F2
  1. ;;RPM;INSERT
  1. ;;RPM;F3
  1. ;;SV;F1_"S"
  1. ;;SW;F1_"A"
  1. ;;EX;F1_"E"
  1. ;;QT;F1_"Q"
  1. ;;QT;$C(5)
  1. ;;HLP;F1_"H"
  1. ;;DLW;$C(23)
  1. ;;MRK;F1_"M"
  1. ;;UMK;F1_F1_"M"
  1. ;;CUT;F1_"X"
  1. ;;CPY;F1_"C"
  1. ;;PST;F1_"V"
  1. ;;FND;F1_"F"
  1. ;;NXT;F1_"N"
  1. ;;GTO;F1_"G"
  1. ;;CHG;F1_"P"
  1. ;;AUT;F1_F1_"S"
  1. ;;';$C(27)_"Q"
  1. ;;';$C(27)_"R"
  1. ;;";$C(27)_"S"
  1. ;;";$C(27)_"T"
  1. ;;