Do you mean a black line or a not-working-pixels line??? If it is a not working pixels line:
Have you dropped it lately? Opened it up? Left it in the sun? If you have, sorry, those pixels will never work again. 2 of my Tamagotchis are like that, everything else works fine (except the top icons don't light up, you have to count how many times you pressed A). Sometimes it goes away after a few hours, if it has been like that for a long time, chances are it is permanent.
If it is a black line:
This has never happened to me for "a long time" before, possibly the battery is going, maybe you dropped, bumped, overheated or opened it up. If everything else is working fine, there may be nothing you can do. I've heard of someone else having this problem, and theirs worked fine for everything else.
Hope I helped. Really, do I. I know what it's like to have malfunctioning Tamagotchis!
StarTama