President Carter proved yesterday that a pork barrel need not come between political friends.

Take the case of Sen. Jennings Randolph (D.W. VA.). As the chairman of the Senate Public Works Committee, he is generally regarded as one of the leading pork-barrelers on Capitol Hill.

When the president Thursday vetoed the $10 billion public works appropriation bill, describing it as bloated with wasteful and unneccessary water projects, Randolph said he regretted the decision, which he blamed on "some extremely bad advice" that had been given to Carter.

But Randolph is also a Democrat facing a tough battle for a fourth full Senate term against former Republican governor Arch Moore.

So it was yesterday that differences over what constitues pork-barrel appropriations were swept aside as Randolph and other West Virginia Democrats stood on the 50-yard line of the Elkins High School football field watching the president's helicopter approaching ove the mountains from the east.

Carter flew here from Camp David, Md., to participate, as four presidents before him had, in the 42nd annual Mountain State Forest Festival Parade in Elkins, which is Randolph's home town. That was the event, but the underlying purpose was clearly to help the struggling campaign of the 76-year-old Democratic senator.

At the high school, coatless despite a cold drizzle, the president told the crowd that "no state has a more strong, vigorous, able or dedicated spokesman" than West Virginia has in Jennings Randolph.

Moore has been making Randolph's age an issue in the campaign. When Carter vetoed the public works bill. Moore noted Randolph's position as chairman of the Public Works Committee, and said that never before had seniority and a Senate chairmanship meant so little to a state.

The president also brought with him to Elkins an announcement of two federal grants for West Virginia-one of $14 million for a civic center in the state capital of Charleston, and the other a $4.7 million loan to a faucet company in Morgantown, where a large number of job layoffs have been threatened.

And from the high school, Carter, Randolph by his side at all times, assumed an honoured position in the parade,at all times, assumed an honored position in the parade,he two-mile route as tens of thousands of enthusiastic spectators cheered and waved.

White House officials insisted that the president's apearance here yesterday was nonpolitical, and therefore would be paidfor by the government. "It is not a campaign trip," White House press secretary Jody Powell said last week.

Randolph also characterized the event as a non-political, although he conceded that there could be some benefit in the president's appearance here for him. Asked why Moore, who is, after all, a former West Virginia governor, had not been invited to ride in the parade, one of the largest annual events in the state, Randolph replied with a laugh.

"Why, we don't have candidates in the parade, we just have public officials," he said.

The president's appearance here was his second in the last six months to help Randolph. West Virginia is among about 15 states the White House has targeted for personal appearances by Carter this fall to help Democrats involved in close races.

Carter has already been to North Carolina. South Carolina and Pennsylvania to help Democratic Senate candidates, and to Ohio to raise money for the state party, which this year is given a chance to defeat incumbent Republican Gov. James A. Rhodes.

In the next several weeks, the president plans to campaign for Harry Hughes, the Democratic gubernatorial candidate in Maryland, Gov. Ella T. Grasso in Connecticut and Sen. William D. Hathaway in Maine. He also has campaign appearances scheduled in Minnesota and Kansas.

White House officials say no final decisions have been made on which states Carter will appear in during the last week of the fall campaign, when the president is expected to be on the road for three or four days.