Six mornings a week at 8:15, television sets all over Japan are tuned in to the hard times of the nation's past as viewers become absorbed for 15 minutes in the life of a woman named Oshin.

Her hard times and triumphs--mostly the former--have made the morning melodrama Japan's most watched program and have touched off a wide-ranging discussion of lost values and modern materialism that is rare in this prosperous, pragmatic country.

Her travails have become synonomous with the virtue of enduring despite hardship; almost everyone seeks identification with the way she has survived and triumphed. When former prime minister Kakuei Tanaka was convicted in October of bribery in the Lockheed scandal, he compared himself to Oshin. So, frequently, does the current prime minister, Yasuhiro Nakasone.

Even President Reagan bowed into the act during his state visit last month, citing the ways Oshin portrayed "endurance, tenacity and sheer hard work" as an explanation for Japan's economic success.

"Oshin" is replayed at noon for those who missed the morning episode. The average rating share has been 57 percent; one day in November it reached 63 percent, the highest mark ever for television drama in Japan.

The theme, triumph after endurance of hardships, was not accidental. "I dedicated the drama to my mother, or more accurately to the generation of my mother," said Sugako Hashida, who wrote the scenario. "I felt that if I didn't write it now, people would forget how hard their lives were and how they had endured--getting up early in the morning, no time to go to bed until late at night, taking care of families, working in the fields.

"More than anything else, I wanted the Japanese of the present day to know that less than a hundred years ago there were those who endured a hard life. I want people to be aware that because of their efforts, our prosperous life nowadays can exist."

The program is engrossing, says television critic Mitsuo Sanuka, because it forces Japanese to think about the moral values of the beginning of this century, when most people's main concern was scratching out a living. "It shocked people in some deep part of their minds, asking them whether they had not forgotten something important from their past experiences," he said.

The show began last April with the year 1907, when Oshin is the 7-year-old daughter of an impoverished family in northern Japan. The family is so poor it can afford rice only at special festival meals.

In an early installment, Oshin is shipped down the river by raft to become a baby-sitter in a rich timber merchant's home. In the parting scene, the day is cold, the mountains and fields white with snow, and as the raft draws away from shore the girl cries into the wind, "Mom . . . Dad . . . Mom . . . Dad."

Cruelty and stern discipline await her at the timber merchant's family. She is at first denied schooling until a friendly teacher intervenes. But she is then denied the right to eat lunch.

Tenderness alternates with pain, but life is always a struggle. Oshin is taught writing and the ways of business by a grandmotherly woman. Then she marries in Tokyo and becomes the hapless slave of a scheming, heartless mother-in-law. In one scene, her hand is injured in an attempt to run away; the mother-in-law denies her medicine because she says it costs too much.

A business is launched but the Great Kanto Earthquake of 1923 destroys the factory. She cuts fish in the family shop and then comes the devastation of World War II. Finally, there is success. Oshin becomes the owner of a chain of supermarkets and takes her place in the glittering prosperity of postwar Japan.

But memories of the past grip her at age 83 when she takes her grandchild on a journey to her old scenes and she says, "Somewhere along the way, I feel I've lost something."

The show was produced by Yukiko Okamoto, a senior producer for Japan Broadcasting Co. and one of the country's few women executives. She says she hoped to convey that women's liberation came through struggle.

"One of its purposes was to appeal to young women of today with the theme that the liberation of women is not something to wait for but something to fight and get, like Oshin did in her life," she says. Unfortunately, she says, not many of them seem to have got the message.

"Oshin" itself is fiction, but is based on fact and the personal experiences of many people. Its genesis, five years ago, was a letter from an elderly woman to Hashida, the series' writer, detailing her experiences in northern Japan as a child sold into prostitution by her hard-pressed family. Hashida began collecting similar stories by interviewing old women and inviting others to write of their experiences.

Oshin's life is portrayed by three actresses, but the one who has most caught the viewers' emotions is Ayako Kobayashi, a fifth-grade student who played Oshin as the young waif sent away from home. Souvenirs carry Oshin's name and a statue to her has been erected at the railway station in the village of Sakata, where the early episodes of the drama take place. Several schools serve lunchtime menus based on the details of Oshin's childhood.

"Oshin" is scheduled to be televised next year in New York, Los Angeles, San Francisco and Honolulu by UTB, a Japanese-American network, with subtitles in English.