      subroutine KeyPdPackage


      integer*2 NF, NI, NR, NC, NT, NdimT, NdimC
      integer*2 NdimH, IEle, L, I

      parameter ( NF=  1,NI=  1,NR=  1,NC=  1,NT= 35 )
      parameter ( NdimT=  125,NdimC=    1,NdimH=    1 )

      integer*2 Row, Col, StartField, TermKeys(30), LastKey
      integer*2 First, Last
      logical*1 Next, Previous, Exit, Refresh
      character*80 ScrHelpLine
      integer*2 FieldNumber
      logical*1 Valid


      character*1 Text(NdimT)
      character*1 Char(NdimC)
      character*1 Help(NdimH)

      character*7 Formats(NF)

      integer*2 TextTable(5,NT), FldTable(7,NF), IntArray(5,NI)
      integer*2 CharTable(2,NC), HelpTable(4,NF)
      real RealArray(5,NR) 

      data ScrHelpLine(1:40) /
     1   '      Up-Previous Field         Down-Nex'/
      data ScrHelpLine(41:80) /
     1   't Field       Ctrl-Z End                '/

 
      data (TextTable(I,  1),I=1,5) /    1,17, 1, 1, 8/
      data (Text(I),I=    1,   17) /
     1   'l','q','q','q','q','q','q','q','q','q','q','q','q','q','q',
     1   'q',
     1   'k' /
 
      data (TextTable(I,  2),I=1,5) /   18, 1, 2, 1, 8/
      data (Text(I),I=   18,   18) /
     1   'x' /
 
      data (TextTable(I,  3),I=1,5) /   19,14, 2, 2, 2/
      data (Text(I),I=   19,   32) /
     1   'L','i','n','e',' ','M','o','d','e',' ','K','e','y',
     1   's' /
 
      data (TextTable(I,  4),I=1,5) /   33, 1, 2,17, 8/
      data (Text(I),I=   33,   33) /
     1   'x' /
 
      data (TextTable(I,  5),I=1,5) /   34,17, 3, 1, 8/
      data (Text(I),I=   34,   50) /
     1   't','q','q','q','w','q','q','q','w','q','q','q','w','q','q',
     1   'q',
     1   'u' /
 
      data (TextTable(I,  6),I=1,5) /   51, 1, 4, 1, 8/
      data (Text(I),I=   51,   51) /
     1   'x' /
 
      data (TextTable(I,  7),I=1,5) /   52, 2, 4, 2,10/
      data (Text(I),I=   52,   53) /
     1   ' ',
     1   'l' /
 
      data (TextTable(I,  8),I=1,5) /   54, 1, 4, 5, 8/
      data (Text(I),I=   54,   54) /
     1   'x' /
 
      data (TextTable(I,  9),I=1,5) /   55, 1, 4, 7,10/
      data (Text(I),I=   55,   55) /
     1   'w' /
 
      data (TextTable(I, 10),I=1,5) /   56, 1, 4, 9, 8/
      data (Text(I),I=   56,   56) /
     1   'x' /
 
      data (TextTable(I, 11),I=1,5) /   57, 1, 4,11,10/
      data (Text(I),I=   57,   57) /
     1   'k' /
 
      data (TextTable(I, 12),I=1,5) /   58, 1, 4,13, 8/
      data (Text(I),I=   58,   58) /
     1   'x' /
 
      data (TextTable(I, 13),I=1,5) /   59, 1, 4,15,10/
      data (Text(I),I=   59,   59) /
     1   'q' /
 
      data (TextTable(I, 14),I=1,5) /   60, 1, 4,17, 8/
      data (Text(I),I=   60,   60) /
     1   'x' /
 
      data (TextTable(I, 15),I=1,5) /   61,17, 5, 1, 8/
      data (Text(I),I=   61,   77) /
     1   't','q','q','q','n','q','q','q','n','q','q','q','n','q','q',
     1   'q',
     1   'u' /
 
      data (TextTable(I, 16),I=1,5) /   78, 1, 6, 1, 8/
      data (Text(I),I=   78,   78) /
     1   'x' /
 
      data (TextTable(I, 17),I=1,5) /   79, 1, 6, 3,10/
      data (Text(I),I=   79,   79) /
     1   't' /
 
      data (TextTable(I, 18),I=1,5) /   80, 1, 6, 5, 8/
      data (Text(I),I=   80,   80) /
     1   'x' /
 
      data (TextTable(I, 19),I=1,5) /   81, 1, 6, 7,10/
      data (Text(I),I=   81,   81) /
     1   'n' /
 
      data (TextTable(I, 20),I=1,5) /   82, 1, 6, 9, 8/
      data (Text(I),I=   82,   82) /
     1   'x' /
 
      data (TextTable(I, 21),I=1,5) /   83, 1, 6,11,10/
      data (Text(I),I=   83,   83) /
     1   'u' /
 
      data (TextTable(I, 22),I=1,5) /   84, 1, 6,13, 8/
      data (Text(I),I=   84,   84) /
     1   'x' /
 
      data (TextTable(I, 23),I=1,5) /   85, 1, 6,17, 8/
      data (Text(I),I=   85,   85) /
     1   'x' /
 
      data (TextTable(I, 24),I=1,5) /   86,13, 7, 1, 8/
      data (Text(I),I=   86,   98) /
     1   't','q','q','q','n','q','q','q','n','q','q','q',
     1   'u' /
 
      data (TextTable(I, 25),I=1,5) /   99, 1, 7,15,10/
      data (Text(I),I=   99,   99) /
     1   'x' /
 
      data (TextTable(I, 26),I=1,5) /  100, 1, 7,17, 8/
      data (Text(I),I=  100,  100) /
     1   'x' /
 
      data (TextTable(I, 27),I=1,5) /  101, 1, 8, 1, 8/
      data (Text(I),I=  101,  101) /
     1   'x' /
 
      data (TextTable(I, 28),I=1,5) /  102, 1, 8, 3,10/
      data (Text(I),I=  102,  102) /
     1   'm' /
 
      data (TextTable(I, 29),I=1,5) /  103, 1, 8, 5, 8/
      data (Text(I),I=  103,  103) /
     1   'x' /
 
      data (TextTable(I, 30),I=1,5) /  104, 1, 8, 7,10/
      data (Text(I),I=  104,  104) /
     1   'v' /
 
      data (TextTable(I, 31),I=1,5) /  105, 1, 8, 9, 8/
      data (Text(I),I=  105,  105) /
     1   'x' /
 
      data (TextTable(I, 32),I=1,5) /  106, 1, 8,11,10/
      data (Text(I),I=  106,  106) /
     1   'j' /
 
      data (TextTable(I, 33),I=1,5) /  107, 1, 8,13, 8/
      data (Text(I),I=  107,  107) /
     1   'x' /
 
      data (TextTable(I, 34),I=1,5) /  108, 1, 8,17, 8/
      data (Text(I),I=  108,  108) /
     1   'x' /
 
      data (TextTable(I, 35),I=1,5) /  109,17, 9, 1, 8/
      data (Text(I),I=  109,  125) /
     1   'm','q','q','q','v','q','q','q','v','q','q','q','v','q','q',
     1   'q',
     1   'j' /


      entry KeyPdClear( Row, Col )


      call ClearScrn( Row, Col, 17,  9 )

      return



      entry KeyPdTextDsp( Row, Col )

      call DsplyText( Row, Col,
     1   NT, TextTable, NdimT, Text )

      return


      entry KeyPdDataDsp( Row, Col, First, Last
     1   )

      call DsplyData( Row, Col, First, Last,
     1   NF, FldTable,
     1   NI, IntArray, NR, RealArray, NC, CharTable, NdimC, Char,
     1   Formats )

      return


      entry KeyPdValidate( First, Last,
     1  Valid, FieldNumber )

      call VldWholeScreen( First, Last, NF, FldTable,
     1   NI, IntArray, NR, RealArray, NC, CharTable, NdimC, Char,
     1   'KEYPD', Valid, FieldNumber )

      return


      entry KeyPdEdit( Row, Col, First, Last, StartField, TermKeys,
     1   Next, Previous, Exit, Refresh, LastKey )

      call EditScrn( 'KEYPD', Row, Col, First, Last, StartField,
     1   ScrHelpLine, TermKeys, NF, FldTable,
     1   NI, IntArray, NR, RealArray, NC, CharTable, NdimC, Char,
     1   Formats, HelpTable, NdimH, Help, Next, Previous, Exit,
     1   Refresh, LastKey )

      return
      end
