CSX Corp. officials said todaythat second-quarter earnings will be affected by the current coal miners' strike, but they were optimistic about the year as a whole.

"We felt we were on the way to another great year until the coal strike started," CSX President Hays T. Watkins told shareholders here, reciting the company's record 1980 earnings and a booming first quarter of 1981, when earnings were up 59 percent.

"[The strike] will cause some adjustment in our plans, but we remain optimistic about the year as a whole and after," he said.

After the shareholders' meeting, Watkins said he couldn't be specific about the strike's impact. "It depends on how long the strike is . . . . We will recover, but the longer the strike lasts, the longer it will take to recover, but the longer the strike lasts, the longer it will take to recover."

Today's meeting was the first since Csx was formed last November by the government-blessed merger of the Chessie System and the Seaboard Coast Line Industries. Both operate as separate entities under the CSX umbrella.

In his report to shareholders, Chessie System President John T. Collinson said Chessie during the first quarter saw a modest improvement in merchandise traffic in addition to the peak-level coal traffic it carried. When the strike came, Chessie had over 24,000 carloads of coal on wheels en route to export peirs at Baltimore and Newport News. There was enough coal to keep the piers busy through this week, he said, but in a few days they will run out.

"Before the strike, we were projecting a 10 percent increase in coal, coke and iron carloadings for the full year, all of it created by the demand for stem coal for electric power production here and overseas," Collinson said. "The only thing holding back that market now is the strike."

A. Paul Funkhouse, president of the Family Line Rail System, told shareholders that coal loadings were up 18 percent in the first quarter, much of it due to stockpiling in anticipation of the United Mine Workers' strike, now in its fourth week.

If the strike is resolved in the next couple of weeks, coal loadings are expected to be up 6 percent over last year's record tonnage levels, he said. Overall total carloadings for 1981 will be about 1 percent higher than 1980, he predicted.

Watkins told shareholders that by the end of June the company will have completed all connections and projects, which the combined rail system expected would take much longer.

"I am proud to report that we are either on schedule or ahead of schedule in bringing about the merger benefits we promised," he said. Among the benefits he listed were operations of a new unit coal train from West Virginia to Florida, unit train movements of phosphate rock from Florida to Ontario, Canada, and lower coal rates on shipments from eastern Kentucky to markets in the North and East.