Zen is shared between all characters when withdrawn, no matter what. For your situation, you just need careful management:
You bought 5000 Zen, and now you have 5000 for both characters. If you withdraw it, you can sell part of it on Character A, AND sell part of it on Character B. You just gotta make sure you withdraw the Dil balance for Character A BEFORE you do the same for Character B.
This way, you get Dilithilum for both characters, but without accidently sending all of it to only one character.
Hope that helps.
Was named Trek17, but still an author.
Been playing STO since Open Beta, and have never regarded anything as worse than 'meh'. I have nothing against the game/devs, nor any particular wish to talk bad about either, or praise most decisions. Still, it's better to be positive than cynical.
i figured it out, after doing it, you get a withdraw all check box just uncheck it..
also if you do send all zen or dilithium to one char, just put up a bunch at a ridiculous price and then cancel it.. then it will go back in the shared account.