I suggest that you use rtvjoba OR qusrjobi, not both in the same time.
Try with WRKUSRJOB command, read help for this command, and it will work.
(Some similar things work for me with WRKUSRJOB)
You probably want to use the <a href=”http://publib.boulder.ibm.com/infocenter/iseries/v5r4/index.jsp?topic=/apis/QSPRILSP.htm”>Retrieve Identity of Last Spooled File Created (QSPRILSP) API</a>.
But you might want to clarify the contradiction in your question. You started with <i>”I have a GUI program”</i> and immediately contradicted it with <i>”which HAS to run interactively”</i>. If it’s GUI, it won’t also be interactive. At least, it won’t be interactive from the iSeries perspective.
So, if it “has” to be, well, it won’t be.