Submitting Jobs to Batch on Windows
Posted: Wed Aug 09, 2017 1:37 am
How do I submit a Function to batch?
I have a Process/Function defined that is invoked from a ServerModule to produce a PDF report.
I am trying to "batch" the report so that the user does not wait on its creation and under certain parameters it can take quite some time to finish and exceed the time out of the Server Module.
I can "call" the function just fine, but when I "submit" I loose all track of it, no tracing output appears and I have no indication that it actually ran.
This is on my local dev box so its Windows 10. I'll worry about doing the same thing for the iSeries later.
I am submitting as such:
I get the trace output for the server module as noted in the above code block but none of the trace output for the function is logged. So I don't know if it worked, failed or just disappeared into the ether.
The docs mention the IBM i Queue Emulation
I have a Process/Function defined that is invoked from a ServerModule to produce a PDF report.
I am trying to "batch" the report so that the user does not wait on its creation and under certain parameters it can take quite some time to finish and exceed the time out of the Server Module.
I can "call" the function just fine, but when I "submit" I loose all track of it, no tracing output appears and I have no indication that it actually ran.
This is on my local dev box so its Windows 10. I'll worry about doing the same thing for the iSeries later.
I am submitting as such:
Code: Select all
#SYS_APPLN.TraceMessageData( "Submitting the CMGSAN Report" )
submit process(CMGSANReportProcess) function(CMGSANEmailReport) exchange(#OFOFID #OFOTY #CWJTYP #wk_StartDate #wk_EndDate #wk_PreviousStartDate #wk_PreviousEndDate #wk_CountryCode #wk_Email)
#SYS_APPLN.TraceMessageData( "CMGSAN Report has been submitted" )
The docs mention the IBM i Queue Emulation
But I am not trying to queue them or to defer execution, just submit them to run. Do I still need to emulate the queues?In this default environment the SUBMIT command works, but there is no inherent ability to queue the submitted jobs for deferred or serial execution.