Measure the height of the new fence and determine what part of it will be attached to the concrete wall. Mark this location on the concrete wall. Transfer this measurement to a 2-by-4 board and cut the board along the marking with a saw.
Set the cut 2-by-4 board on a work bench or across two sawhorses face-up. Drill holes through the center of the top surface spaced every 12 inches along the board. Drill the holes all the way through the board.
Position the board over the concrete wall within the original markings and mark the location of each drilled hole on the concrete wall.
Set a hammer drill on its highest power setting and use the hammer function. Drill out each of the marked holes with the hammer drill equipped with a masonry drill bit that is smaller in diameter than the masonry screws so that the screw threads will have a tight grip on the concrete.
Position the board back in place and line up the holes. Insert 4-inch galvanized masonry screws through galvanized washers and into the pre-drilled holes. Tighten the screws in place to securely fasten the board to the concrete wall.
Mount the fence against the vertical board. Drill holes through the fence and into the vertical board every 12 inches. Set 3-inch galvanized wood screws into the drilled holes and tighten them down to attach the fence in place.