The two encoders should show up in MAME as two separate gamepads.
MAME should consider one Joy 1 and the other Joy 2.
If the encoders are plugged and unplugged (i.e. pedestal doesn't house the computer, just controls) you may want to look into Drventure's Controller Remap utility. (linked in his sig)
If the encoders will be connected at all times, Wire up one button on one encoder, launch MAME, launch a game, press tab (menu), go to the "Input (this Game)" menu, and try to map that button to P1 Button1.
If it comes up Joy2 Button _, you can reset the input to default (enter, esc -- shows "none", enter, esc -- input is back to defaults), shutdown, and wire that encoder as Player 2, otherwise you can wire it as Player 1.
Once you've wired the controller, configure your software/map your controls as desired.

Scott