Beginning with A-Shell 1209 of March 2011, it is possible to select a custom paper size by its name, rather than just its number, assuming that the paper shows up in the trace list of available paper sizes. This saves the step of running a test print with TRACE LP to see what number the custom paper was assigned, and also provides a degree of printer independence, since it isn't clear that the same number would be assigned to the custom paper by each printer.
Warning: custom paper sizes is an area in which there is considerable variation between printer drivers. In some cases the driver properties dialog will allow you to define a custom paper size. In others, you may need to use the common Devices and Printers > Print Server Properties dialog to define a custom "form" (which may, or may not show up in the list of available paper sizes for a particular printer. But if it does show up, then you should be able to select it via PAPERSIZE=<name>.
For more and related information, see PAPERLENGTH, PAPERWIDTH and the A-Shell forum discussion "Custom paper sizes (case study)."
History
2011 March, A-Shell 5.11209: Added capability to A-Shell