THE COMMISSION set up to sort out immigration and refugee issues for Congress wrapped up its principal work in a flurry of confusion. On successive days it seemed to oppose and then to accept a requirement that workers carry identification cards so that illegal immigrants can be weeded out. Actually, it wasn't so bad. All that the two votes (9-7 and 8-7-1) really indicated was that the Select Commission on Immigration and Refugee Policy could not get together on how workers should be identified -- by traditional documents like birth certificates or by "new secure" means like an identification card or call-in data bank.

The real news was that the commission overwhelmingly agreed, 14-2, that employers should be punished for hiring illegals. Thanks to former senator James Eastland, an employer of illegals, the current law bans employer sanctions. This is the breakthrough. What kind of worker identification system there should be to enforce employer sanctions is a detail, though a crucial one. As controversial as civil liberties and Hispanic concerns make it, it can be worked out later.

The good thing about the work of the commission is that it took up all three parts of the immigration problem. The first is adjustment of the status of the millions of illegals already here. Jimmy Carter tried that, but only that, and not too smoothly, and got nowhere. The commission voted 16-0 to recommend a blanket amnesty.

The second element is enforcement, ensuring that only legal aliens henceforth come in. It obviously makes no sense to give amnesty to old illegals if they are promptly replaced by new ones. A sanction-identification program is a key part of any effective enforcement package.

The third element is the need to rewrite the whole jerry-built ramshackle immigration law so that the numbers and kinds of people admitted are those the American public wants. The quota recommended by the commission was 450,000 (up from the current 270,000). That does not count close relatives of citizens (175,000 in 1980) or refugees (230,000, mostly Indochinese) or people given asylum (perhaps 135,000, Cubans and Haitians).

These numbers and categories are the stuff of much argument. Given the range of interests and emotions that play over immigration and refugee issues, it could not be otherwise. President-elect Reagan's favor for a guest-worker program, for example, goes down poorly with American labor.

But more than just the comprehensiveness of the commission's approach offers a good sign for legislative action. The country's poll-proven determination to do something about illegal immigration suggests further that the time for a remedy may be really at hand.