how does one map a transaction number to a block with just the bitcoind client? I realize this can be done at blockchain.info, but would like to find a way to do this with just the bitcoind client. if all I have is the receiving address and the transaction number, I can't figure out what command or set of commands to use. I can get and decode the raw transaction (bitcoind decoderawtransaction $(bitcoind getrawtransaction 3dd264f603f75871c5a36b61db8e137d8cee6b019a8d5bdfdabd7383ccc47068) | less), but that doesn't give me the block number. 

note that I can't use gettransaction because my local box (netbook) isn't the origin nor the destination of the transaction; I get error: {"code":-5,"message":"Invalid or non-wallet transaction id"}. I also can't use listreceivedbyaddress for the same reason, although I don't get an error in this case because I did once send to the address in question from my netbook.
figured it out after finding my own previous post about how I found out this info with americancoind, coin seems to have gone to a duplicate address, by its error message on attempting to resend the raw transaction. but bitcoind doesn't tell you what block it's in, merely stating error: {"code":-5,"message":"transaction already in block chain"}. however, on searching through the source (rpcrawtransaction.cpp) I noticed that getrawtransaction takes an extra arg, verbose, which if greater than 0 gives the blockhash:

jcomeau@aspire:~/rentacoder/jcomeau/bitcoin/src$ bitcoind getrawtransaction 3dd264f603f75871c5a36b61db8e137d8cee6b019a8d5bdfdabd7383ccc47068 1 | grep block
    "blockhash" : "000000000000000116f3abab7d0f620f620eae189de29ddb06fe8baae566467a",
    "blocktime" : 1393013064


and with the blockhash you can use getblock:

jcomeau@aspire:~/rentacoder/jcomeau/bitcoin/src$ bitcoind getblock 000000000000000116f3abab7d0f620f620eae189de29ddb06fe8baae566467a
{
    "hash" : "000000000000000116f3abab7d0f620f620eae189de29ddb06fe8baae566467a",
    "confirmations" : 255,
    "size" : 341358,
    "height" : 287092,
    "version" : 2,
    "merkleroot" : "d0fd6154ba64682b48c9c15600ee7c8594336cf4c0a2917b5cbcf1f5a74d2096",


so, 287092 is the block number that contains the transaction.