There is no user interface for setting PAN Id. How do I get around that?

The controller/router has an LED display that offers a Reset command. The Channel and Pan result of the reset are displayed on the LED and are not predictable. The only other set mechanism is over Xigbee wireless. To set the channel and pan over the network API, it already has to have a channel and pan and be joined. What’s the sequence of commands to send new channel, new pan, and rejoin. And is there a setup for the gateway that can find any channel/pan during a join phase and then switch the channel/pan to a setting?

I’m not sure about third party devices.
For digi devices, when you press reset button 4 times on the routers and end devices, the devices will join nearby Coordinator like X4, X2. Once the end devices and routers are joined, they will having PAN ID - 0000, so from the web interface of the gateway, you can change PAN ID of those routers and end devices.

Just make sure you change it starting at the farthest unit and working your way back in.

You should also read over the manual for the corresponding XBee module you are using. The reason for that is that the functions you are referring to lie within the XBee module and its related firmware.