THE PRISONER EXCHANGE that took place Friday in Mexico City is a happy example of international cooperation. Sixty-one Americans who have been serving sentences in Mexican jails were traded for 36 Mexicans who have been serving sentences here. More exchanges will follow until all the eligible prisoners in both countries who want to go home to complete their sentences have been returned.

The program, worked out in a treaty that the Senate ratified earlier this year, solves substantial problems for both governments, as well as for the prisoners. The Mexicans have not enjoyed having more than 500 Americans, most of them young and many of them drug-law violators, in their jails. The prisoners have been neither docile nor quiet, organizing hunger strikes and protesting vociferously about the harshness of Mexican law and the conditions in some Mexican jails. These protests, amplified by their families and friends, had begun to strain relations between Mexico City and Washington.

Under the treaty, each government is reviewing the cases of prisoners it holds in its federal jails. Those eligible for exchange - the treaty exempts those guilty of political and immigration offenses - are then asked whether they wish to complete their sentences in the other country. So far, fewer than 100 of the 1,200 Mexican nationals in the federal prisons here have qualified for the program and asked to be exchanged. But about half of the 585 Americans believed to be in Mexican jails are on the list to be sent home. Some Americans have chosen to stay where they are, apparently because life in some Mexican jails is not so bad if you have money to buy extra food and services. Some Mexicans have chosen to stay here, presumably because of the American parole system. Indeed, about 60 of the first 215 returning Americans will be eligible for immediate parole hearings.

One additional step needs to be taken to make this program fully effective. Prisoners in state and local jails can also be exchanged, but only after state legislatures pass the necessary legislation. Only Texas has done that, and 11 of prisoners returned to Mexico yesterday came from its prison system. Federal officials believe that there are several hundred Mexican nationals, some of whom may well want to go home, scattered through the prison systems of other states. They should be given the same opportunity that is now available to federal prisoners - to pay their debt to society in a prison at least close enough to their homes to permit occasional visits from their familes and friends.