James Michener tells a story of the real Texas.

He was in Houston, interviewing a roomful of real estate brokers for his forthcoming Texas novel. It was 1983. Houston, hottest of the red-hot boom towns of the 1970s, had just taken a spectacular fall in the oil glut, a fall that it still is struggling to overcome.

The city had enough unleased office space to house all of downtown Denver. Million-dollar penthouse apartments were being offered rent-free for two years -- and still they went begging. High-flying executives who once zipped to cross-town appointments in helicopters were both bankrupt and, alas, grounded.

Against this bleak tableau, Michener posed a question to his broker guests. He planned to have one of the characters in his novel move from Detroit to Houston and make it big in real estate.

Question: Which year should the character come to town?

The brokers batted the problem around. Someone suggested 1973 -- the year of the first oil shock. Silence.

Another proposed 1979 -- the year of a second OPEC increase and domestic oil decontrol. Land prices were doubling, then doubling again, in a matter of months.

There were nods of agreement and wan smiles of fond remembrance all around the room, but they were offered without enthusiasm.

Finally a broker, heretofore silent, pierced the indifference.

"I have it," she said. "Next Tuesday!"

The room erupted into rebel yells and whoops of delight. "Hot damn! Next Tuesday."

Michener tells the story with unadorned wonder.

"If you want a two-word definition of Texas," he said, " 'next Tuesday' gets you about as close as you'll ever get. This is a state where you play hard, you take your licks, you get up off your behind, you adjust to the market, and you get ready for the next big strike."

Texas is risk, and Texas is indomitable. Texas is to this country what this country, through most of its history, has been to the rest of the world. It's the cocky kid who hasn't yet discovered that life is out there, brother, to rough you up -- not the other way around.

The Houston of 1985 is not much better off than the Houston of 1983. If oil prices continue to slip -- and most analysts predict they will -- the worst is yet to come.

"Oil isn't quite to us what automobiles are to Detroit, but it's not far behind," said J.L. Taylor of the Houston Chamber of Commerce. More business will go bust, some banks will go belly up, more oil rigs will be stacked and rust out.

But the energy slide, however painful, is merely a cyclical shakeout. Houston has more far-reaching problems. So does the whole state.

Texas is running out of oil. Geologists say the proven reserves will be removed from the ground here within 15 to 30 years. The state also is running out of its second -- some would say its first -- most precious natural resource, water.

One state study projects an 8.5 million acre-foot water shortage by the year 2000 -- much of it in West Texas, where the Ogallala Aquifer, source of irrigation for the cotton, corn and grain farmers of the High Plains, is drying up.

Texas is not shrinking from these challenges. In the past two years, it has wakened to them -- with a jolt. It is going about the business of readying itself for the next century. It is doing so by forging new collaborative arrangements between universities, entrepreneurs, venture capitalists and political leadership.

The intended output of these partnerships is "high tech," but that catchall description obscures the breadth of Texas' designs. Yes, Texas wants to build up a high-tech industry. But it also wants the technologies honed by these research ventures to prolong the life of its oil fields and aquifers, to commercialize its medical research, to keep its petrochemical plants and aerospace factories competitive.

"The most important function of the new technologies will be to rehabilitate the old technologies," said economic historian Walt W. Rostow, a professor at the University of Texas at Austin.

It will be years, perhaps decades, before these research ventures bear fruit. But what already is notable about them, and augurs well for the state's continued economic preeminence, are the academic-business-political partnerships that brought them into being. Joining Forces to Diversify

Texas, a state whose lore is shot through with the rugged individualism of the cowboy and the wildcatter, is at the moment fervently communitarian about the way it is diversifying its economic base. The Japanese, one suspects, would feel right at home here.

"You don't do things in a garage anymore," said Raymond Smilor, associate director of the Institute for Constructive Capitalism, a think tank affiliated with the University of Texas, that has helped put together some of the new ventures. "That's part of the reason for the group approach. But in a sense, the new arrangements require every bit the risk-taking and the daring that the old individualism did."

In Texas, it is possible to pinpoint a moment on the calendar when the state, in a kind of whoosh of recognition, came to see the need for new arrangements.

In happened in 1983, when Austin outgunned 56 other cities to become the home of the Microelectronics Computer and Technology Corp. (MCC), a newly formed research consortium of 20 high-tech companies that hope, among other projects, to beat the Japanese in the race to build fifth-generation supercomputers.

When Austin won the competition, some other cities cried foul. Texas, they said, "bought" MCC. They were right.

The business community ponied up $23 million to attract the consortium to the state -- most of it to build an MCC research facility that will be tied to the University of Texas at Austin, but some to provide a Learjet for MCC executives and below-market home financing for MCC researchers.

The group that developed the deal includes a who's who of Texas power -- Gov. Mark White; San Antonio Mayor Henry Cisneros, who threw in behind Austin's bid after his own city didn't make the final cut; computer management mogul H. Ross Perot; Perry Bass, scion of the Sid Richardson oil fortune and head of a family that owns much of Fort Worth; Ben Love, chairman of the board of the Houston-based Texas Commerce Bancshares; Dallas oilman H.R. (Bum) Bright, chairman of the Texas A&M Board of Regents, Republican fund-raiser, and owner of the Dallas Cowboys; plus a host of academics and scientists.

"The group that came together for MCC had never been in the same room before," said Rostow. "And once they got it, I think they understood that they had to stay together. From now on, this partnership between the politician, the scientist, the engineer and the entrepreneur is going to be a key ingredient to making the economy tick."

MCC has been a genuine galvanizing event in Texas. Its example already has spawned a host of look-alike research institutes in the state. Most are going to break ground this year. Among them:

* The Houston Area Research Council (HARC). Created with $10 million and 100 acres in grants from George Mitchell, chairman of the Mitchell Energy and Development Corp, HARC is a research consortium of scientists from the University of Texas, Texas A&M, Rice and the University of Houston.

It will compete for the federally sponsored $5 billion Superconducting Super Collider (SSC), a giant atom-smasher to be housed in a 100-mile radius underground tunnel.

"If Texas could get the SSC on top of already having MCC, we'd become the nation's premier research state overnight," said Harden Weidemann, director of the Texas Economic Development Commission. The project would attract research talent from around the world. It also would be an enormous boost to the local economy, including a $200 million annual electric bill.

Colorado and Illinois also are competing for the atom-smasher. The Department of Energy already has awarded HARC a $5 million grant to design magnets for the SSC. The full project will not be awarded until later in the decade.

"We couldn't have gone for this as four separate institutions," said W. Arthur Porter, president of HARC. "We needed to pool resources."

HARC, which hopes to have a $50 million private endowment within five years to support its campus-like facility in the Woodlands, 25 miles north of Houston, also has received a $1.6 million Defense Department grant to study laser applications in space, and plans to work with Houston-area research hospitals to study laser uses in cancer treatment.

* Advanced Robotics Research Institute of the University of Texas at Arlington. With $5 million in seed money from a Fort Worth developer, ARRI will break ground this fall on a research institute that will look for ways to apply existing robotics technology to plants and factories.

The institute expects to have researchers from nearby General Motors, Bell Helicopters, General Dynamics, Texas Instruments and Rockwell plants participate as members of a governing board.

"They won't get any propriety claim to the fruits of the research, but they'll be involved in the process, and they'll be able to shape the direction of research," said Ted Sparr, assistant dean of engineering at UT-Arlington.

ARRI expects to attract other high-tech companies to the Dallas-Fort Worth area, which already is the high-tech capital of Texas.

On that front, it's just had its first score. FARED Robot Systems of Denver has announced plans to relocate next to the institute later this year. "Perhaps they'll do research for us, and we'll have their graduate students to draw from," said Harold D. Spidle, president of FARED. "It's a synergistic relationship."

* In San Antonio, Cisneros has spearheaded the creation of an Institute of Biotechnology at the University of Texas Health Sciences Center and a Texas Research Park on a 1,500-acre tract.

Cisneros hopes to fashion the university and military medical facilities in San Antionio into a world-renowned medical research center. The public school system already has created a high-tech magnet high school and will follow soon with a health-careers magnet high school.

The nation's 10th largest city -- but also one of its poorest -- San Antonio suffers from having a small manufacturing base. Cisneros said he has no illusions that these institutes will solve persistent unemployment problems, but he believes that the economic activity they generate will produce service jobs for both unskilled and skilled workers.

As Texas moves from the sunset of the oil era to the sunrise of high tech, it has a lot of catching up to do.

"If you're fat and happy, other people will get out in front of you, and quite frankly that's what happened to us in this state," said Porter of HARC.

Despite ranking third in the nation -- behind California and New York -- in 1982 in the number of employes engaged in what the Bureau of Labor Statistics defines as high-tech industries, Texas lags far behind in attracting research-and-development grants. In 1982, it received 3.7 percent of all federal R&D funds, compared with 23.6 percent that went to California. Learning to Compete

"We have been playing amateur hour against people who are more professional," Al Meitz, a Dallas-based consultant and chairman of a panel advising the state senate on high technology, testified to a Senate committee last year.

Although the number of high-tech jobs in Texas grew by 73.5 percent from 1975 to 1980 -- compared with an increase nationwide during that period of 26.8 percent -- many Texas-based companies continue to send dollars out of state to fund their research needs.

Much of the problem lay with the universities. "Research dollars go to where the best brains are," Mitchell said. "Our universities haven't been able to compete with those on the East Coast and in California because for years our legislature was dominated by rural interests. But that is changing now."

In the past two decades, much of the oil-generated wealth of the university endowments has gone into mortar and bricks. Texas A&M, for example, grew fourfold in 18 years -- and needed a crash building program to accommodate the expansion. But from now on, the focus will be on "brains over bricks," said Jon Newton, departing chairman of the board of regents of the UT system.

The state legislature recently has passed laws freeing endowment funds for research programs, and UT-Austin, the state's flagship school, is exploring ways to reduce the teaching load on research scientists, and to enable them to share in the profits of the commercialization of their work. 'Rocks in the Road'

"There are still some rocks in the road, but I think the universities are committed to getting them out of the way," Meitz said.

A bigger problem lies in elementary and secondary education. "What our state is lacking isn't engineers -- you can always import engineers," said economist Bernard Weinstein of the John Gray Institute in Beaumont. "We're just not up there with the big boys in turning out a skilled work force that can read and write and think."

Weinstein noted that after New England lost its manufacturing base a generation ago, it was able to endure a difficult transition and come bounding back on the strength of a well-schooled work force.

"We need to change the collective mentality in this state that says you can get away with a low-tax/low-service approach to government," he said. "It's beginning to happen. But we've got 10 years of hard slog."

If Texas has plenty of ground to make up, it has plenty of advantages, too. Chief among them is the spirit of risk.

"This state was settled by high rollers," said Victor Arnold, chairman of the graduate school of business at UT-Austin. "If you're a rancher or a wildcatter, you put your stake out on the line every day. You take a big risk; you get a big profit. We're comfortable with that."

Now, along with the idea of risk, comes the idea of partnership. "There is nothing new in this," said Hans Mark, recruited last fall from the National Aeronautics and Space Administration to become chancellor of the UT system. "Ever since the Homestead Act created the land-grant college in 1862, this country has understood that the way you get more productive crops is to let the farmers tell the scientists their problems. It's taken the rest of the world 100 years to cotton to the idea."

Thrown in is some Texas chauvinism. "The UT system has the potential to be the best public system in the world. The main difference between it and the California system," said Mark, who has worked in both, "is that Texans will send their elite to UT. Californians will send theirs East."

Add some critical mass. Texas will overtake New York later this decade as the second most populous state in the union. And, although its population boom of the 1970s has slowed, the state did lead the country, from 1980 to 1983, in population growth from migration. Nearly a million newcomers moved into Texas during that period, accounting for 62 percent of its population growth.

Add an essential truth about the differences between an economy based on oil and one based on knowledge.

"Once you produce oil, it's gone," Smilor said. "Once you produce knowledge, it keeps on working for you.