After waiting 40 minutes for the familiar blue and white Amtrack train to roll into Brunswick, Md., from the hills of West Virginia, John Brady gave up.

He started the 50-mile drive through the rain to his job in downtown Washington.

More than 1,000 of his fellow commuters from Western Maryland were forced to find alternate modes of travel yesterday -- and most of them probably drove their cars -- because a nationwide strike by 26,000 train engineers shut down the popular rail commuter line that serves an area including fast-growing portions of western Frederick County, Md., Loudoun County, Va., and Jefferson County, W. Va.

Another 600 commuters on lines operated by the Chessie System between Baltimore and Washington were also forced to seek alternate transportation.

The Reagan administration yesterday asked Congress to enact legislation to force the engineers back to their jobs. Hearings are set for today. In the meantime, the Maryland Department of Transportation is helping to provide bus service as an alternative to automobile commuting.

Delivering the opinion that unions are ruining the country, Brady, an engineer from Harpers Ferry, W. Va., who works for the Congress, declared: "Too bad there isn't a Japanese railroad we could take."

Jim Carpenter, a mathemetician for the Bureau of Labor Statistics and a regional vice president of the "Friends of the Railroad" train group, called commuting by car "crazy."

"Terrible traffic jams," said Judy Coakley, a statistician from Point of Rocks, Md.

"Everyone out here is dependent on the train. I wouldn't have moved out here if it weren't for the availability," said Brady before he gave up and trudged off to his car.

Chessie operates 10 trains daily between Martinsburg W. Va., 74 miles up the Potomac River from Washington, and Union Station with stops in Montgomery County. A large portion of the trips begin and end in Brunswick, a railroad town that still boasts one of the largest freight yards in the state. Commuters' cars usually fill the wide spaces between the tracks, but there were only about 100 parked there yesterday.

Brady was among the less fortunate commuters. There were no buses and there seemed no alternative but the automobile for the two dozen commuters who expected the 7:25 Amtrack train to arrive amid confusion about which lines were affected by the strike.

Commuters who came to the station in the mistaken hope that earlier Chessie System trains would be running were luckier. That railroad had arranged for eight buses that left between 5:25 and 6:55 a.m., and the bus drivers weren't taking tickets.

"It's emergency service," said Gold Line bus driver Richard Johnson. "They didn't tell us to take tickets, they just told us to roll," he told one surprised passenger.

"Most of us didn't know until we got down here -- there wasn't enough over the radio to let us know if there would be any alternatives," said Bambi Prigel, who lives in Brunswick and works at Intelsat in L'Enfant Plaza.

"It would be a difficult drive, and I'm sure it wouldn't be worth it," said Prigel, as fellow commuters sipped their usual coffee. "You become used to sitting in the train, establishing friendships. We're a small community here," she said before the 6:30 bus pulled out for Union Station.

Outside, half a dozen picketing engineers hooted at locomotives moving in the railroad yard and at a long empty coal train that rattled past. The equipment apparently was being operated by nonstriking supervisors.

For at least one commuter, the problems of the strike were compounded. "My car has problems," said Callie Gray of Brunswick, a 23-year-old legal secretary. "Besides, it would cost me $10 for gas alone, not to mention parking," she said, resolving to head back home.