One thing you can do is use QAUDJRN to monitor for a JS entry sent by
your interactive program. You will have to have *JOBDTA set for system
value QAUDLVL or QAUDLVL2 to have JS journal entries generated.
You can then determine what the submitted job identifier is
(number/user/name). Once you have this information you can use Work
Management API QUSRJOBI and/or QWCRJBST to obtain the job's status.
Gary Monnier
The PowerTech Group, Inc.
www.powertech.com
253.872.7788
-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of
Paul.Thieme@xxxxxxxxxxxxxxxxx
Sent: Friday, May 23, 2008 11:27 AM
To: midrange-l@xxxxxxxxxxxx
Subject: Verify Submitted Job Completion
I know this is a simple problem, but after reading through dozens of
posts in the archive, I didn't see the answer.
I have an interactive job stream that is trying to display an image file
that is archived on the IFS.
The user doesn't have authority to the file's directory. The
interactive job submits a job using profile with higher authority. The
submitted job
copies the files from the archive directory to a working directory.
After
the sbmjob cmd, the interactive job issues strpco and strpccmd to
display
the image (now available to the user) on the user's PC. Obviously, we
don't want the strpccmd to start until we know the copy has been
completed. Currently we are using a DlyJob(3) to "pause" the interactive
job long enough for the batch job to complete. Since the copy function
is taking place in it's own jobq and machine use is low, this usually
works.
Occasionally, the strpccmd executes too soon. This simply means the
user has to try again to see the image (a minor annoyance). We've
increased the delay to 5 and 7 seconds, but that just makes the process
"seem" to take longer to the user. Most of the time, the copy function
is a sub-second run.
Does anyone have an example of a better way to delay an interactive job
stream until a batch job it submitted is complete?
Thanks,
Paul Thieme
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.