(For a Reuters live blog on U.S., UK and European stock markets, click or type LIVE/ in a news window.)

NEW YORK, July 1 (Reuters) - Wall Street rallied to close higher on Friday in light trading, with investors heading into the long holiday weekend and embarking on the second half of year looking for the next market-moving catalyst.

All three major U.S. stock indexes reversed early losses to end in positive territory in the wake of the stock market's worst first half in decades.

Still, all three indexes posted losses for the week.

"We're headed into the holiday weekend and having a late-day relief rally," said Joseph Sroka, chief investment officer at NovaPoint in Atlanta. "But we’ll likely have to wait until investors return from the holiday weekend to see if it’s sustainable at the start of the new quarter."

Market participants now look to the second-quarter earnings season, the Labor Department's June employment report, and the Federal Reserve's monetary policy meeting expected later in July.

The microchip sector dropped sharply after Micron Technology Inc warned of cooling demand, its shares pulling the broader semiconductor sector lower.

Worries over waning demand in the face of decades-high inflation were reflected in the Institute for Supply Management's (ISM) purchasing managers' index, which showed a deceleration in both new orders input prices.

ISM's report seemed to back the view that the economy is cooling and inflation appears to be past its peak. This has raised the possibility that the Fed might have wiggle room for a dovish pivot after its second straight 75 basis point interest rate hike expected in July.

"The Fed is going to need to see a lot more evidence to change its mind about further continued interest rate hikes," said Tim Ghriskey, senior portfolio strategist Ingalls & Snyder in New York. "There’s still a lot of uncertainty about the economy and inflation despite early signs that inflation may have peaked."

According to preliminary data, the S&P 500 gained 41.01 points, or 1.08%, to end at 3,825.39 points, while the Nasdaq Composite gained 101.49 points, or 0.92%, to 11,130.23. The Dow Jones Industrial Average rose 320.77 points, or 1.04%, to 31,096.20.

Second-quarter reporting season begins in several weeks, and 130 of the companies in the S&P 500 have pre-announced. Of those, 45 have been positive and 77 have been negative, a weaker negative/positive ratio than a year ago, according to Refinitiv data.

The prospect of profit margins taking a hit from bruising inflation and waning consumer demand will have market participants listening closely to forward guidance.

Analysts now expect aggregate second-quarter S&P 500 earnings growth of 5.6%, down from the 6.8% projected at the beginning of the quarter, per Refinitiv.

Meta Platforms Inc fell after the Facebook parent's CEO Mark Zuckerberg warned employees to brace for a deep economic downturn.

Department store chain Kohl's Corp shares tumbled following its decision to halt talks of a possible sale to Franchise Group.

(Reporting by Stephen Culp; Additional reporting by Amruta Khandekar and Sruthi Shankar in Bengaluru; Editing by David Gregorio)