first, I assume you ask about QPJOBLOG job spool, I don’t know qpjoblog as system file.
If true, you have to send a message to the caller with the api QMHSNDPM. it is documented on ibm infocenter. I have samples, but in RPG.
If interested, look at http://jplamontre.free.fr/AS400/JP4INC-RPGLE.TXT and search DIE, it’s a procedure that send to caller a message for aborted current program