The federal government told the Supreme Court Wednesday that a drug testing program that requires urine and blood samples of train workers involved in accidents is necessary to protect the traveling public.

The government, in the first of two cases involving the constitutionality of drug testing, tried to frame the debate in terms of workplace safety.The second case, involving Customs Service workers, poses the question of whether the government may test new employees and those seeking promotions to jobs that involve the carrying of a weapon, fighting drugs or dealing with classified material.

A decision in either case is not expected before next year.

Attorney General Dick Thornburgh opened his half-hour of argument by telling the court "this is a case about railroad safety."

However, the arguments quickly deteriorated into a question-and-answer session that showed the frustration of the justices with arguments from both sides that barely touched on the underlying constitutional concerns of privacy of those tested and whether the tests violated the Fourth Amendment, which bars unreasonable and warrantless searches.

Thornburgh, whose appearance before the court was rare for attorneys general who generally leave such tasks to other lawyers, fared poorly under questioning and was forced to admit a number of times he was unsure how the drug testing program actually worked.

Lawrence Mann, arguing against the program, said the tests only show drug use and not the level of impairment. "The concern should not be what one does in the privacy of the home but what one does on the job," he said.

He was immediately fired upon by justices who wondered if those who use drugs at home might not be more likely to use them on the job.

In the second case, Solicitor General Charles Fried defended the Customs Service testing program as a symbol of the nation's commitment to the war on drugs.

But Lois Williams, representing the Customs workers, said it is wrong to impose drug tests on a work force with no history of drug use. "Large numbers of innocent people are subject to what they regard as demeaning, embarrassing searches of their urine," she said.