While the cultural commisars in one of the Eastern Europe's more repressive societies fight a rearguard action against what they regard as Western decadence, increasing numbers of young Czechs are marching to the rhythms of Abba and Pink Floyd, the Beach Boys and Chicago.

In a cottage in the rolling countryside north of Prague, amid a tangle of wires, microphones and sophisticated type recorders, a banned underground rock group records its latest album.

In a discotheque in the basement of a smart Prague hotel, a well-dressed disc jockey greets a party of Soviet tourists with smooth, professional patter and spins the old Beatles hit, "Back in the U.S.S.R." Oblivious of the words, the Russians jog up and down to the music.

In a park near the Vitava River one Sunday afternoon, inquisitive young Czechoslovaks gather around makeshift stalls, browsing through collections of second-hand Western pop records. An old Rolling Stones album quietly changes hands for the equivalent of $100.

These are but three instances of how, despite an array of ideological and legal controls, Western pop music of all kinds is thriving in Czechoslovakia.

As in most Eastern European states, Prague's communist rulers believe that the pop music can exercise considerable influence over young people. In attempting to shape this influence for their own political ends, however, they are faced with a common dilemma: At what point do too stringent controls become counter-productive?

The more liberal regimes of Hungary and Poland have largely solved the problem by ignoring it. In both countries, rock music, long hair, and live performances by Western bands are quietly tolerated, even if officially condemned. One result is that the interest of young people in Western trend has lost its connotation of political opposition.

In Czechoslovakia, by contrast, some brands of top culture are still seen as an insidious form of ideological contamination. Party officials constantly talk about the need for "socialist commitment" in pop music - a quality they demand from folk singers, disc jockeys, and rock bands alike.

In practice this directive has had the effect of driving some of the best Czechoslovak music underground and whetting the appetite of young people for the forbidden fruit from the West.

"Where can you hear the best rock music in prague?" ran a Czech joke several years ago following the sentencing of members of the "Plastic People of the Universe" pop group to jail terms of up to 2 1/2 years on charges of breaching the peace. The predictable answer: "In Ruzyne Prison."

The real crime of the Plastic People was that they failed to adapt to the harsh cultural climate imposed after the Soviet-led invasion of Czechoslovakia in August 1968. Along with many other rock groups that flourished during the liberalization period known as the Prague Spring, they lost their professional status because they refused to meet stringent new standards applied to all performers - no long hair, no English lyrics, no unconventional dress, and so on.

But unlike most other groups, they continued to give private concerts at parties and in village halls. Their performances were described by the official Communist Party newspaper as "screeching, banging, and unimaginable howling," while the television ran a propaganda series showing clean-cut workers on scaffolding pouring buckets of whitewash over long-haireds youths passing below.

Today, most of the Plastic People are again out of prison. They came together for a recent recording session at the country cottage of playwright Vaclav Havel, one of the original manifesto Charter 77. Like the government Havel also ascribes considerable socio-political influence to pop music - and is anxious to help groups like the Plastic People as much as possible.

The session was intended to be secret, but the music - a mixture of hard rock and Dylan-style protest lyrics - could be heard several miles away on the other side of the valley. The tapes have since been smuggled out of Czechoslovakia and are to be issued as an album in France.

Different kinds of problems face performers who try to work within the system. One of Prague's most successful young disc jockeys explained the difficulties of entering a profession where salaries are up to five times the national average. There are only about 25 licensed deejays in Czechoslavakia.

"You have to prove that you are politically fit to hold such a potentially influential position," he said to the strains of Boney M singing "Rivers of Babylon."

"First you have to take a musical exam to show you're professionally competent. Then you take an ideological exam. The year I got my license, there were 70 applicants - and only two of us were successful. The other deejay had a brother-in-law on the Central Committee and I was very careful about how I answered the questions.

"I quoted out president, Mr. [Gustav] Husak, who said that we must be very careful about what we take from the West. I said we must only accept those influences which are compatible with our socialist society."

"Well, it got me the job," he added cheerfully, as he placed a cherished Beatles hit onto his homemade turntable.

In fact, Communist Party control over discotheques has eased since the height of the "normalization" campaign in the early 70s. During that period, at least 60 percent of needle time had to be developed to music from socialist countries.

Today such rigid quotas have been dropped, but most discos are required to close by 10 p.m. and admission is carefully controlled by party activists. There is a total ban on hard rock.

"The same phenomenon has happened in the music business as in most other spheres of Czech life," explained another disc jockey. "After '68, control passed to party apparatchiks who knew nothing at all about music. Since, the professionals have again taken over - and they have become party members for the sake of their careers.

"These new bureaucrats aren't stupid. They don't insist on us playing Russian tunes which are impossible to dance to and would only make people cross. In fact, they recognize that discomania, providing it is kept with within certain limits, can act as a kind of safety valve."

On one recent Saturday night in Prague, the first to complain when the deejays attempted to play an old Russian folk song in honor of a group of Sovite tourists were the tourists themselves. They demanded the Beatles or Abba instead.