In response to a question from Representative Barney Frank, Democrat of Massachusetts, Mr. Greenspan said he could not say whether he would have voted to create Social Security if he had been a member of Congress in 1935, when the retirement system was established.