检索数据库函数,使参数赋值

CAD程序设计,怎么在主函数里面调用数据库函数,和数据库检索函数,使输入1-7,D D1 H都有对应的值?

(defun data1a ()
  (setq data1 '((D D1 H) ((1 (50 64 20))
              (2 (55 72 20))
              (3 (60 78 20))
              (4 (65 82 20))
              (5 (70 98 23))
              (6 (75 105 26))
              (7 (85 118 28))
             )
        )
  )
)
(defun fget1 (fa lname / lh lst j nn)
  (setq lh (car (eval (read lname)))
    lst (cadr (eval (read lname)))
    j -1)
  (setq lst (cadr (assoc fa lst)))
  (repeat (length lh)
  (setq j (1+ j) nn (nth j lh))
  (setq nn (nth j lst))
  lst)
)
(defun c:tusan ()
  (initget "1 2 3 4 5 6 7")
  (setq n (getkword "请输入代号:(1/2/3/4/5/6/7)"))
  (data1a)
  (fget1 n "data1")
  (princ "\n--------------- 查表结果 ---------------")
  (princ "\n         n= ") (princ n)
  (princ "           D= ") (princ D)
  (princ "\n         D1= ") (princ D1)
  (princ "           H= ") (princ H)
  (princ "\n----------------------------------------")
)