NEW YORK (TheStreet) -- Stocks closed with gains on Thursday, but just barely as markets turned jittery ahead of Friday's U.S. jobs report for February.

The S&P 500 was up 0.12%, and the Dow Jones Industrial Average added 0.21%. The Nasdaq gained 0.32%.

Initial jobless claims for the week ended Feb. 27 came in higher than expected, prompting fears Friday's official jobs report would show similar weakness. Markets were spooked on Wednesday after a sub-par employment report foreshadowed potential labor market softness in February.

"The big question is going to be whether we see disruptions from weather that make it hard to tell whether we continue to see the strength in hiring that we've seen for the last three months," said Kate Warne, investment strategist at Edward Jones, in a call. "There's a little bit more cloudiness around this jobs report."

Expectations are for 235,000 jobs to have been added to nonfarm payrolls in February compared to 257,000 a month earlier. The unemployment rate is forecast to tick down 100 basis points to 5.6%. Hourly earnings are expected to increase 0.2%, adding to the previous month's 0.5% gain.

"While one month's data is unlikely to derail the [Federal Reserve's] exit plans, we believe that a notably weaker report could throw the market's expectations for a removal of the 'patient' language at the March meeting into doubt," said TD Securities U.S. strategist Gennadiy Goldberg. "This could in turn help investors push the anticipated timing for rate hikes further into the horizon."

Fourth-quarter productivity and costs were revised down to a decline of 2.2% from a previous 1.8% drop. However, that came in slightly narrower than an expected 2.3% decline. January factory orders were also sluggish, falling 0.2% to $470 billion compared to an expected 0.2% increase. The measure was far better than December's 3.5% decline.

Apple (AAPL) pressured markets after reportedly delaying production of its 12.9-inch iPad to September due to supply issues with its display panels, according to Bloomberg. The company had previously expected to begin production in the first quarter. Shares dropped 1.6%.

Costco (COST) jumped 2.8% after earning $1.35 a share in its second quarter, 17 cents better than forecast. Comparable-store sales rose 4% in the U.S., while international comps increased 8%, excluding gas and foreign exchange pressures.

AbbVie (ABBV) won a bidding war for Pharmacyclics (PCYC), a cancer biotech company it will purchase for $21 billion in cash and stock. Johnson & Johnson (JNJ) was previously reported to have expressed interest. AbbVie shares sank 5.7%, while Pharmacyclics added 10.4%.

Casino stocks were under pressure after Nomura Securities said it expects a 25% decline in gaming revenue out of China's Macau gambling district over 2015, a key location for the company. Las Vegas Sands (LVS), Wynn Resorts (WYNN) and Melco Crown Entertainment (MPEL) were lower.

Global markets were given a boost earlier after the European Central Bank left rates unchanged at 0.5% and President Mario Draghi said the group now expects eurozone GDP to rise 1.5% over 2015 -- up from previous expectations of 1% -- and as high as 2.1% by 2017. Draghi also said the ECB will begin purchasing eurozone government bonds on March 9 under its $66 billion-a-month debt repurchase program.

After the markets close on Thursday, the Fed will post initial results of its annual stress tests on major banks, including Bank of America (BAC), Citigroup (C), JPMorgan Chase (JPM), and Goldman Sachs (GS).

More from Markets

Inside Carnival's Mind Blowing New Horizon Cruise Ship (Video)

Inside Carnival's Mind Blowing New Horizon Cruise Ship (Video)

Jim Cramer: The 10-Year Yield Could Go to 2.75%

Jim Cramer: The 10-Year Yield Could Go to 2.75%

Oil Slumps, Gas Spikes Ahead of Holiday Weekend; Assessing the Chipmakers--ICYMI

Oil Slumps, Gas Spikes Ahead of Holiday Weekend; Assessing the Chipmakers--ICYMI

Week Ahead: Wall Street Looks to Jobs Report as North Korea Meeting Less Certain

Week Ahead: Wall Street Looks to Jobs Report as North Korea Meeting Less Certain

Dow and S&P 500 Decline, Energy Shares Fall as U.S. Crude Oil Slides 4%

Dow and S&P 500 Decline, Energy Shares Fall as U.S. Crude Oil Slides 4%