CL Command Reference - EJTEMLOUT

CL Command List > EJTEMLOUT Reference

Description:

The Eject Emulation Output (EJTEMLOUT) command forces the last data received from the host system to the spooled file or printer by closing the printer file. After closing, another printer file is opened if *IMMED was specified on the Start Printer Emulation (STRPRTEML) command, so that more data can be spooled or printed. Printing then starts if *FILEEND was specified on the Spooled output schedule (SCHEDULE) parameter of the Create Printer File (CRTPRTF) command.

Note: When the emulation printer output is ejected, a page eject is also performed.

Additional Considerations

You must use care when running this command. Before entering the command, you should look at the printed output (if SPOOL(*NO) was specified) or use the Display Spooled File (DSPSPLF) command to look at the spooled file (if SPOOL(*YES) was specified), to determine whether the printer data is at a logical breaking point. If this function is requested when printer emulation is in the middle of a group of print data from the host system, the group is split into separate printer files on the system.

The effect of this command on the printer emulation output varies, depending on the values specified for the SPOOL and SCHEDULE parameters on the printer file.

The possible values and their conditions are:

. SPOOL(*NO): All the data received from the host system is printed, and the printer moves to the top of the next page.

. SPOOL(*YES) and SCHEDULE(*IMMED): If a writer is active to the output queue and is printing this file, all the data received from the host system is printed, and the printer moves to the top of the next page. If a writer is not active (printing this file), the effect is the same as if SCHEDULE(*FILEEND) was specified. Another printer file is opened on the output queue.

. SPOOL(*YES) and SCHEDULE(*FILEEND): The status of the printer file on the output queue changes from open to ready to print. If a writer is active, the data can be printed. Another printer file is opened on the output queue.

. SPOOL(*YES) and SCHEDULE(*JOBEND): The status of the printer file on the output queue changes from open to closed. The file is not ready to print until the end of the job is reached. Another printer file is opened on the output queue.


Examples:

EJTEMLOUT EMLDEV(HOSTPRT1)

This command closes the printer file in the printer emulation job using the emulation device HOSTPRT1, forcing the latest data from the host system out to the spooled file or printer.