THERE IS A MESSAGE for the senior members of Congress in the vote by which the House sustained President Carter's veto of the public works bill. It is that they may be falling out of touch with public sentiment about the old pork barrel. Their newest colleagues, especially those with the least secure seats, provided the votes the president needed to win. For that group, at least, it seems to be more important now to be on the side of reducing government spending than to play the game in which everyone gets some new project for the folks back home.

The pattern is clear. Members of the House who were elected after Watergate provided 109 of the 138 votes the president needed to win; they voted with him by a margin of about 5 to 4. Of the senior members of the House - those first elected 16 or more years ago - 61 percent voted to override the veto; among them, of course, were most of the big congressional leaders.

Even with the recent reforms, it still takes a little courage for junior congressmen to turn so sharply on the leadership, from which the goodies do flow. That courage, it seems to us, comes from a judgement that the public is less interested right now in a new dam or water project than it is in being convinced that its tax money is being spent wisely. This shift in the public mood may be more easily grasped by a new congressman than by the old hands. They may need to unlearn the old lesson that a dam or a post office or a highway in the district back home is worth more votes than a record of opposing such projects elsewhere.

Whether this pattern will hold when other parts of the pork barrel roll across Capitol Hill this week remains to be seen. Some observers have suggested that while the senior congressmen are interested in traditional pork - dams and water projects - the junior members are after the bacon - parks and recreational projects. There is plenty of the latter in the park bill, which still has not cleared Congress, just as there is more traditional pork in the highway bill. If the message of the president's veto and the public reaction to it does not persuade the leadership to curb the congressional appetite before those bill are sent to the White House, Mr. Carter may well want to try his luck with the veto power again. We note, incidentally, that the president is prevailing in this matter and has scored an extraordinary victory and on a matter of principle. The show of strength should gain him strength.