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 Retrieve Identity of Last Spooled File Created (QSPRILSP) API.
But you might want to clarify the contradiction in your question. You started with “I have a GUI program” and immediately contradicted it with “which HAS to run interactively”. 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.