you are trying use assoc:
(cdr(assoc s2 lstx))
on list:
(("WT*A" . "48") ("WT*B" . "36") ("WT*C" . "27") ("WT*D" . "18") ("WT*E" . "9") ("WT*F" . "0"))
but your s2 is WD*X
this will always fail.
change all text to WT or all data in sj2.dat to WD. after that all seems to be ok.
sample
(cdr (assoc "WD*A" '(("WT*A" . "48") ("WT*B" . "36") ("WT*C" . "27") ("WT*D" . "18") ("WT*E" . "9") ("WT*F" . "0")))) -> always nil
(cdr (assoc "WT*A" '(("WT*A" . "48") ("WT*B" . "36") ("WT*C" . "27") ("WT*D" . "18") ("WT*E" . "9") ("WT*F" . "0")))) -> "48"
kruuger
Kruuger, thank you very much, main program I have set breakpoint check no problem, so I made a very serious problem, data file editing problems, resulting in the program have been wrong, I'll pay attention, thank you for your kind help.
CAB, thank you very much for your advice, I will consider to add some fault-tolerant processing, previous tests are set breakpoints for inspection, and you in processing program is used when there error check?Thank you for you advise!