Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

SUBMIT...JOB..RETURN

Former Member
0 Likes
2,377

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.

3 REPLIES 3
Read only

ThomasZloch
Active Contributor
0 Likes
1,375

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

Read only

0 Likes
1,375

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!

Read only

Former Member
1,375

Hi,

Just use 'SUBMIT zrepid AND RETURN' without FM 'JOB_OPEN', after the zrepid executed, it will return to your calling program.

Jimmy