South Carolina's state-supported colleges and agencies are struggling with a new law that forbids state participation at private clubs or organizations that discriminate in any way. The law apparently includes Rotary and Jaycee clubs that exclude women.

The University of South Carolina golf team withdrew this week from a tournament held at a private country club that bars blacks from the playing course, and a USC athletic booster club meeting moved from a segregated club to a nearby high school.

"This whole issue goes to the heart of discrimination in South Carolina," said Rep. Earl Middleton, one of 13 black members in the state House of Representatives.

Middleton and seven other members of the Legislative Black Caucus inserted into the state's budget bill in April 1978 a paragraph saying that no state agency can spend tax money where discrimination is practiced. The little-noticed amendment was approved by voice vote with no debate.

The law was overlooked until this week, when USC president James B. Holderman ased for a ruling from the state attorney general after Middleton and other black caucus members accused USC of wrongdoing by allowing its golf team to participate in a tournament at the segregated Orangeburg Country Club.

State Attorney General Daniel Mc-Leod ruled orally on March 9 that the university probably was violating the law by allowing the team to play in the tournament. A written opinion is expected to be issued shortly.

Earlier this week, Holderman advised faculty and staff members to avoid activities and speaking engagements at private clubs that are discriminatory. A university spokesman, Chip Gray, said the school was interpreting the attorney general's opinion strictly.

"Rotary clubs exclude women, and unless we hear otherwise we're interpreting the opinion to mean we can't sponsor someone to go there and speak," Gray said. "The implications are widespread. To be absolutely sure, we don't participate in anything that has any discrimination in i at all."

Holderman may order the USC golf team to leave its headquarters at the Spring Valley Country Club, a suburban Columbia club that has no black members.

The long-term implications of the law are not clear. Other state colleges and universities may withdraw their golf teams from upcoming tournaments at segregated country clubs, but are awaiting a written legal opinion. State Auditor Edgar A. Vaughn said his office will give the comptroller general any employe expense account items that relate to a club that discriminates.

South Carolina was segregated by law until the 1960s when civil rights acts were passed and enforced. The state's public schools were integrated in 1971.