Nothing must be more troubling to Alan Greenspan -- President Reagan's nominee to succeed Paul A. Volcker as chairman of the Federal Reserve Board -- than the recent runup of inflation. For the first half of 1987, the consumer price index increased at an annual rate of 5.4 percent. By contrast, it rose only 1.1 percent in 1986. Greenspan's immediate prospects depend heavily on whether this jump is a temporary hiccup or something more.

At his Senate confirmation hearing, Greenspan made the customary pledges to fight inflation. These declarations are virtually worthless. Chairmen of the Federal Reserve promise to fight inflation, just as baseball managers promise to win the World Series. The only true test is whether Greenspan is willing to tolerate a recession to combat rising inflation. If inflation has increased to 5 percent, that's probably what it would take.

Three decades of struggling against inflation have not revealed subtle or gentle ways of treating it. The traditional medicine is the only one that ultimately works. Higher unemployment and weak spending dampen price and wage increases. Businesses compete more ferociously for sales by discounting prices. Workers become more fearful of unemployment and accept lower wage or salary increases.

Greenspan surely knows this, just as he knows that a recession would complicate his job enormously. He would become instantly unpopular. Moreover, any recession that checked inflation would have nasty side effects. The federal budget deficit would widen as taxes fell and government spending on unemployment and welfare benefits rose. The Third World debt crisis would probably worsen as a major export market for developing countries shrank. And failures of banks and savings and loan associations might increase as bad loans multiplied.

The inflation outlook, then, holds Greenspan hostage. For the moment, the odds favor the hiccup theory: just as oil price declines temporarily depressed inflation last year, so oil price increases in 1987 have temporarily raised it. Higher food prices have made matters worse. These increases (so the argument goes) won't continue, and inflation will settle back to about 4 percent. Not great, but in line with recent experience. Between l982 and l985, the CPI increased an average of 3.9 percent annually.

The best inflation news is that underlying cost pressures remain mild. Wage and fringe benefit costs -- the biggest expenses for most businesses -- are increasing 3.4 percent annually. In 1980, the increase was 10.4 percent. Companies typically pass along higher labor costs in higher prices unless they can offset the increases with better efficiency. These productivity gains amounted to 0.7 percent in 1986. Thus, labor cost inflation is now running about 2.7 percent (the 3.4 percent increase in wage and fringe benefits minus the 0.7 percent productivity gain).

Paradoxically, rising oil and food prices earlier this year are now a favorable sign. Together, these increases have accounted for more than a third of the inflation so far in 1987. If these increases slow down or stop -- and nothing else changes -- inflation would automatically subside. Consider the possibilities:

Food: Tight meat supplies increased food prices at a 4.4 percent annual rate in the first half of 1987. That's higher than any increase in food prices since 1981. But lower feed grain prices are now promoting the expansion of poultry, hog and cattle production. Larger meat supplies should reduce meat prices beginning in the second half of 1987, moderating food inflation.

Oil: The Organization of Petroleum Exporting Countries raised crude oil prices by about $4 a barrel, or 29 percent, in early 1987. Few analysts expect similar increases for the rest of 1987 or in 1988. Stable prices would tend to reduce inflation, and some analysts -- such as Philip K. Verleger Jr. of the Institute for International Economics in Washington -- think OPEC may have trouble holding its current prices.

Of course, forecasting inflation is a fool's game. Almost no one gets it right. The possibilities for lower and higher inflation coexist. It's hard to know which will prevail. The U.S. economy is in its fifth year of recovery from the 1981-82 recession. Unemployment (6.1 percent in June) is at its lowest point since late 1979. Wage gains could accelerate. High demand may permit companies to raise prices and profit margins. Further depreciation of the dollar, which tends to raise import prices, would also worsen inflation.

No one asked Greenspan at his confirmation hearing what he considers acceptable inflation. Perhaps anything below a 1 percent to 2 percent level is impractical because our price statistics are imperfect. The trickiest problem is measuring quality improvements: A better product often costs more, but the higher price isn't true inflation. A small amount of reported inflation may reflect technical problems of this sort. Getting average inflation to zero would then require small price declines for most products and services.

But a 5 percent inflation is not a statistical fluke. To tolerate it would risk repeating the disastrous experience of the 1960s and 1970s. Small rises in inflation were rationalized as relatively harmless. One increase led to another, ending in a stubborn wage-price spiral and double-digit inflation. Only the massive 1981-1982 recession then sufficed to break the spiral. A few months' statistics don't make a trend, but should the 5 percent rate persist into the fall, Greenspan would know he faces a serious problem. The proper policy would then be tighter money.

It's hard to envy Greenspan's prospects. When Volcker arrived at the Federal Reserve in 1979, the economy was a shambles. If he hadn't improved it, the worst that might have been said was that he inherited a mess. Taming inflation made him a legend. Greenspan is left with the more tedious job of preserving this gain. There is more opportunity for error and less for great achievement. Volcker's glory could be Greenspan's grief.