|
I think it's a matter of personal style. Passing a list requires
maintaining that list every time a new job is ended or a job name
changes. Locking a data area works pretty well for me.
Perhaps. Updating a list within the controlling program seems to
me much less work and less error-prone than the maintenance required
to ensure that the [first] called program in each additional submitted
job is properly implemented to get the lock.
I would prefer to be able to
add a new submitted job without having to code actions in external
entities; to instead take advantage of what is already provided by the
OS. Plus if one of the jobs [added] is just a CL command versus a
program, I would not even need to have a CLP to effect any locking, I
would need effectively only to update the list of jobs being submitted.
Besides, I would probably implement a solution that used a CPC1221
"job submitted" message sent to the same message queue coded on each
SBMJOB request. The final job would, for each job named as submitted
in one message, find the corresponding "job completed" message on that
same queue, with continued polling until every "job submitted" message
has a pairing of "job completed"; reacting in some way to any failure
versus successful completion code perhaps as an early exit from polling.
Something like the pseudo-code:
jnq=sbmrqs('call pgmx') /* sbmjob cmd('...') msgq(l/mq) */
sndmsg msgid(cpc1221) msgdta(jnq) tomsgq(l/mq)
/* above two stmts repeat for each [added] request, then: */
jnq=sbmrqs('call wrapup') /* pgm wrapup awaits cpc1221\cpf1241
pairs for above repeated paired requests, before continuing */
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.