The SCHEDULE parameter can be specified with one of three values to control when the spooled file is available for a writer to produce the file.
*JOBEND considerations
The SCHEDULE(*JOBEND) spooled files of a job are grouped together on their output queues when the job completes. All SCHEDULE(*JOBEND) spooled files of the same job that are grouped together on a queue are produced together by the writer. Another spooled file can be added to the top of the queue while the writer is producing a SCHEDULE(*JOBEND) spooled file. After a writer produces one file of a job that is SCHEDULE(*JOBEND), it checks the following file on the queue. If this file is from the same job and is also SCHEDULE(*JOBEND), the writer produces it next. However, if the file is from a different job or is not SCHEDULE(*JOBEND), the first file on the queue is produced next.
If you want your SCHEDULE(*JOBEND) spooled files grouped together on a SEQ(*FIFO) output queue, you must be careful not to separate the spooled files. File operations such as HLDSPLF, CHGSPLFA, and RLSSPLF are performed one at a time (even from a Work with Output Queue (WRKOUTQ) display). If operations to other files on the queue are done at the same time, your spooled files can be separated on a SEQ(*FIFO) queue. If your SCHEDULE(*JOBEND) spooled files separate, you can regroup them by changing their output priority with the Change Job (CHGJOB) command.
*IMMED considerations
When a writer is producing a SCHEDULE(*IMMED) spooled file, it might catch up to the program producing the output. When this happens, the writer must wait for the program to produce more output. Because of this, you should be careful using *IMMED for the schedule option. When this happens, the writer cannot process other spooled files. Moreover, the device cannot be used for any other work.
Normally, spooled files that are created with SCHEDULE(*IMMED) specified are assigned a smaller internal buffer than spooled files that are created with SCHEDULE(*JOBEND) or SCHEDULE(*FILEEND) specified. Using SCHEDULE(*IMMED) to assign a smaller internal buffer might allow the spooled data to be produced sooner, but can also adversely affect performance because more disk operations are needed for the same amount of spooled data.
A large internal buffer is always used for spooled print files that use certain special device requirements. Special device requirements include:
Changing the SCHEDULE parameter of a spooled file with the CHGSPLFA command does not affect the internal buffers used for that file.