Sen. Edward M. Kennedy (D-Mass.), who spent his first full day in South Africa today touring this sprawling ghetto of 1.5 million blacks, described a visit to one of its hostels for migrant laborers as "one of the most distressing and despairing visits to any facility that I have made in my lifetime."

Small crowds of only a few hundred people greeted the senator. His brother Robert drew crowds of thousands during a similar walking tour of the Johannesburg suburb 18 years ago.

Blacks have become increasingly radicalized under South Africa's segregationist system called apartheid, frequently identifying capitalism with racial oppression and interpreting the Reagan administration's policy of "quiet diplomacy" with Pretoria as indicating tacit U.S. support.

Those who met Kennedy as he attended mass at the township's St. Pius X Catholic Church this morning and then visited several families living nearby were enthusiastic, however.

A truck driver who spoke to him said afterward: "I have shaken the hand of a man I think can help us."

The visit to the hostel was Kennedy's first sight of one of the most heavily criticized aspects of the apartheid system, which compels millions of black workers to leave their families in distant tribal "homelands" for 11 months of the year for work in the industrial cities on renewable, one-year contracts.

Some of the hostels in Soweto are huge new barrack-like blocks with hygienic though impersonal living quarters.

But the Nancefield hostel that Kennedy visited is one of the oldest and most run-down, a squalid complex of low sheds where 6,000 men live in gloomy cubicles.

The senator and six members of the Kennedy family who are traveling with him, including his sister Jean Smith, son Edward Jr. and daughter Kara, were taken through the sparse kitchens and foul toilets of the compound.

Kennedy expressed his shock directly afterward in his first comments on his visit.

"Here, individuals are caught up between trying to provide for their families or living with their families, and I don't really know of any other place in the world where that kind of cruel, harsh, difficult choice has to be made by people who believe in family life."

To be forced to make such a choice, Kennedy added, was "alien to every kind of tradition in the Judeo-Christian ethic, and I find it appalling here today."

Asked about his more general impressions after visiting several Soweto families, Kennedy said: "The overwhelming sentiment in the homes that we visited was the desire of the mothers for a quality education for their children."

Many expressed frustration because they could not afford high school fees, and they feared that their inadequately educated children would be unable to find employment and so be liable for arrest under the influx control regulations that make it illegal for many workless people to remain in the cities.

This is an aspect of the complex South African situation that the senator will need to evaluate before deciding his standpoint on the issue of divestment -- or pullback of American companies -- which critics point out would increase black unemployment.

Kennedy, who is a guest of Nobel laureate Desmond Tutu, also was taken through a $2 million adult education and teachers' training center built by an organization of local and multinational companies called the Urban Foundation, partly in an effort to counter the divestment campaign.