There is something better than that.
Download this and unpack "memory.bat" into the root of what is your C mount in DosBox (or you can just as well integrate it's contents into the [autoexec] section of your config file - it's your call).
When you run it, it will give you a simple control menu where you can change EMS/XMS/UMB settings -
without leaving DosBox.