1. Whisk together flour and baking powder in a small bowl.
2. Beat together margarine and sugar in a large bowl with an electric mixer at medium-high speed until pale and fluffy, about three minutes in a standing mixer or six with a handheld. Beat in egg and vanilla. Reduce speed to low, then add flour mixture and mix until just combined.
3. Put oven racks in upper and lower thirds of oven and preheat oven to 375 degrees Fahrenheit (190 degrees Celsius).
4. Form cookie dough into logs. With a heavy knife, cut 1/8- to 1/4-inch-thick slices from the logs and arrange on two large, ungreased baking sheets, placing slices about one inch apart. (Chill the remainder of the log, wrapped in plastic wrap, until ready to be baked.)
5. Bake cookies, switching position of sheets halfway through baking, until edges are golden, 12–15 minutes total. Cool on sheets for three minutes, then transfer with a metal spatula to racks to cool completely.
6. When cookies are cooled. sandwich two cookies together with jam in the middle. Sprinkle top with confectioners’ sugar.
Dough log can be chilled up to five days or frozen, wrapped in a double layer of plastic wrap, one month. If frozen, thaw dough in refrigerator just until it can be sliced. Cookies keep — layered between sheets of wax paper or Gefen Parchment Paper — in an airtight container at room temperature for one week.