I am using the TCP/IP for remote printing in AS400. I have to capture
the spool(single page per spool) file status and thus abort the
function from updating a file.

I wrote CL program to retrieve the status. When the printer runs out
of paper, it puts the spool in MSGW after few seconds. But in the mean
time a copy of the spool file is flushed to printer buffer and the
status is returned OK.

Nothing should be sent to the printer or buffer when the file turns to

Any help, looking out for your great suggestion.

Thank you,