I also considered removing the need for an IF ENDIF statement for each printer and drive, replacing it with a DO WHILE loop containing a counter and using ISDECLARED or somthing like that.

It'd work except that there are some instances where multiple printers would be called with the one group \:\(