Welding anything to the flange of a frame rail is a really bad idea. If you want to secure a bed block to the frame, either bolt it without welding, or add a tab that can be welded to the side, not the top of the frame. Weld beads cause stress risers on frame flanges and you'll end up with a crack across the flange beside the weld.
Jerry