BOSTON — When Tzu-Wei Lin got the news, he was in shock. Excited and nervous, he couldn’t sleep.

That was before the baseball season, when Lin found out his wife Kai-Li was expecting.

That was his biggest day of 2017 so far; the due date is in September.

The next-biggest shock to Lin’s system came June 23. He received a phone call telling him to report to Fenway Park the next day. Lin was jumping from the Portland Sea Dogs to the Boston Red Sox.

“The same feeling,” Lin said. “I couldn’t go back to sleep. It caught me by surprise.”

Surprise is a good word. Many use it to describe Lin. Thought to be called up as an emergency fielder and pinch runner, he has played 18 games, solidifying the defense and getting on base. He has platooned with Deven Marrero at third and has filled in at short and second base – where he played Sunday afternoon to give Dustin Pedroia a breather.

“He’s been a very good surprise, offensively. He’s everything we could have hoped for,” Red Sox Manager John Farrell said.

After going 0 for 2 Sunday afternoon, Lin is batting .298 with a .783 OPS.

It’s possible Lin will head back to the minors – to Triple-A Pawtucket – now that Brock Holt is back from his health issues. Both are utility players who bat left-handed. But Lin seems to have a place at Fenway, whether he stays or comes back soon.

After two weeks on the team, the Red Sox changed his uniform number from 73 to 5. On Sunday, Lin’s locker was moved from a row featuring transitional players to the front wall, between Mookie Betts and Chris Young.

Lin smiles about all this but is hardly complacent. “I just want to keep doing my job,” he has said a few times.

That job looked in jeopardy before this season. Signed as an 18-year-old out of his native Taiwan, Lin received a $2 million signing bonus. But he’d been almost all glove and little bat in his first five minor-league seasons, with a .235 career average before 2017. He hit .223 last year in Portland and saw his playing time reduced as prospects Yoan Moncada and Mauricio Dubon were promoted to Portland.

“He was frustrated a lot last year,” said Sea Dogs outfielder Cole Sturgeon, who has been Lin’s teammate for several years as they progressed through the Red Sox system. “He put in a lot of extra work and never really saw the results.”

How would Lin handle it? He admits to difficulty with failure early in his career. Lin said he mellowed by turning to his Christian faith and daily spiritual reading.

“I could not calm down after a bad game. I started reading and that helped,” Lin said.

Lin also tried something else, especially this season – engaging his teammates.

“He was very shy, very stay-to-himself,” Sturgeon said. “He’s learned more English and seems more a part of the team than ever before.”

Lin is uncomfortable with English, although he can get by (the interviews for this story were done both 1-on-1 and with interpreter Mickey Jiang, a Sea Dogs coach who was called up to the Red Sox with Lin.

Jiang recalled a Sea Dogs road trip last August. He and Lin got away to talk.

“We were watching the sunset by Lake Erie,” Jiang said. “I said, ‘you know, maybe you should change things around. Change your routine, in which you feel comfortable. Catch up with your teammates. Maybe play cards. You can still have your private time. Just change a little bit. Because this isn’t working.’ ”

BREAKING OUT OF A SHELL

Lin came out of his shell. He also kept working, getting stronger in the offseason and reporting early to spring training.

“He showed up with a chip on his shoulder,” Sea Dogs Manager Carlos Febles said.

Lin was soon impressing.

“He didn’t get a big league invite, although he probably should have been because we brought him over as an extra player every single day, it seems like,” Red Sox President Dave Dombrowski said.

“He always caught our eye. He can play different spots. He drove the ball, which we never saw him do before.”

Lin batted .308 in 13 major league exhibitions, with an .855 OPS.

“And he continued to do that in Portland (.302 average, .870 OPS). And he continues to do it here. He looks like a really good player here. He doesn’t seem intimidated. He can play a lot of different positions. We’re encouraged by what we’ve seen.

“Can I predict that it will continue to happen? I don’t know. But he has a nice swing.”

Lin’s play, along with Marrero, made it easier for the Red Sox to part ways with underperforming third baseman Pablo Sandoval.

Lin has attracted the Taiwanese press. Ten reporters gathered around his locker after Sunday afternoon’s game. Lin is the only active Taiwanese player in the majors (with Marlins pitcher Wei-Yin Chen on the disabled list, and Rays pitcher Chih-Wei Hu in Triple-A).

WELL-LIKED TEAMMATE

And Lin attracts his teammates’ attention. When pitcher Austin Maddox, a former Sea Dogs teammate just called up, walked into the clubhouse Sunday after his promotion from Pawtucket, he walked straight to Lin and gave him a hug.

“He’s a good guy, genuine,” Maddox said. “There’s a lot to respect about him.”

When Lin learned he was coming to Boston, he went to Hadlock Field to clean out his locker. He remembered that teammate Nick Longhi liked using his bats, so he left three bats in Longhi’s locker.

“He got called up but he still thought enough to leave me three bats. Amazing,” said Longhi, who recently left Portland himself, traded to the Reds.

When Longhi was traded, he reached out to Lin. Lin’s other teammates in Portland have said they are thrilled for him.

“I was trying to get more interaction with my teammates, and with the coaching staff,” Lin said, through Jiang. “They treated me well. They picked me up.”

Lin did not need an interpreter to answer the last question, concerning the big event in September.

“It’s a girl,” he said, another smile appearing.

Kevin Thomas can be reached at 791-6411 or:

[email protected]

Twitter: ClearTheBases