Assume:
- There has not been a switch to an alternate user profile.
- The spooled file owner *CURUSRPRF value on the printer file has not been overridden.
- The user's output queue (OUTQ) is OUTQ1 and the printer device (PRTDEV) is PRT1.
- The Submit Job (SBMJOB) command is used to submit the job to batch.
- The output queue parameter on the SBMJOB command is specified as *USRPRF.
- The user profile has *WRKSTN as the value for the output queue parameter.
- The printer device parameter on the SBMJOB command is specified as PRT99.
When the job runs in batch, the resulting spooled file is sent to the output queue named PRT99 and the spooled file prints on PRT99. The *WRKSTN value for output queue is interpreted as *DEV and an output queue having the same name as the printer device is selected.
If no spooling was used when printing, the output would go to printer device PRT99.