‎2010 Oct 25 12:12 PM
Hi folkss,
I am trying to call SUBMIT zrepid via job jobname number jobnumber and return from another executable program. The control transfers to main prog immediately after triggering job. I want the control to return back after the job executes completely in FINISHED status, so that i can export the LIST from memory and import into the calling program. I dont want to use the spool list.
Also, whenever SUBMIT is being used , does the execution happens in background all the time irrespective of JOB or REPORT calling???
thanks.
‎2010 Oct 25 12:27 PM
SUBMIT via Job is always an asynchronous call, processing in the calling program will continue immediately. If you want to retrieve the list from memory, then drop the "via Job" option. You can still schedule the calling program in background if required.
Please study F1 help for SUBMIT for further information.
Thomas
‎2010 Oct 26 4:43 AM
Hello Thomas,
Thanks for responding. I am working on performance issue, and user wants list output in foreground only. If i see the timestamp of program having SUBMIT...EXPORTING LIST...RETURN with that of program having SUBMIT..VIA JOB..RETURN,
the spool list is obtained very quicker than foreground list output.
I tried with
SUBMIT...VIA JOB..RETURN
COMMIT WORK AND WAIT.
WAIT UP TO 60 SECONDS. "waiting for job to get finished
But listoutput is lost!!!!!
If there is a way to bring to spool list back to memory in calling program, it will solve my problem. I am working in RETAIL, the user executes this report across all sites at the sametime, so timeouts occurs frequently!
‎2010 Oct 25 1:12 PM
Hi,
Just use 'SUBMIT zrepid AND RETURN' without FM 'JOB_OPEN', after the zrepid executed, it will return to your calling program.
Jimmy