This command writes temporary data (records) in a temporary storage queue in either main or auxiliary storage. If the write is to a recoverable queue, then after issuing DELETEQ TS, no WRITEQ TS can be issued until a syncpoint has occurred. The syntax of the WRITEQ TS command is given below:

The different options of the command are given below:

FROM (dataarea) - Option contains the text data, which is to be written out to the temporary storage queue.

LENGTH (data_value) - Halfword binary (PIC 9(4) COMP) value indicating the length of the user data to be written out to the transient data queue.

MAIN - Main indicates that the TSQ should be written in the main storage and not in the auxiliary storage.