× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.


  • Subject: Finding Subsystem of an active job
  • From: bvining@xxxxxxxxxxxx
  • Date: Wed, 9 Sep 98 09:01:48 CDT

Robert,

For Q1 (getting the subsystem given a job identifier) you can use the
Retrieve Job Information (QUSRJOBI) API format JOBI0200.  At decimal
offset 62 is the active subsystem for any given *ACTIVE job.

You could also eliminate the WRKOBJLCK OUTPUT(*PRINT), which exposes you
to possible release to release problems and National Language Version
problems as report formats can change, by using the List Object Locks
(QWCLOBJL) API.  This API provides information similar to that found in
WRKOBJLCK but is designed as an upward compatible programming interface.
Printed reports are not considered to be upward compatible programming
interfaces.

Both APIs (QUSRJOBI and QWCLOBJL) can be found in the Work Management
APIs chapter of the System API Reference.

Not to suggest this is a better approach, but if the offending jobs
are running in a dedicated subsystem why not just schedule an ENDSBS of
the appropriate subsystem at a time of day that all real work is done?
You would then, of course, also schedule a STRSBS prior to the next days
work resumption.

Bruce Vining

>
>Hi all!
>We have an upload job which requires an exclusive lock on a number of files to
>refresh data from NT to the AS/400 nightly.  (Please don't give me a hard time
>about this part!  We are rewriting the application to run C/S on DB2/400.) We
>are using a tool called Easycom, a Delphi to AS/400 connectivity tool running
>in
>its own subsystem.  This is all well and good, except when a user does not
>properly close out of the application (or if they leave their PC on all night),
>the Easycom sessions do not time out (since they are batch jobs).  This causes
>the upload job to bomb off, which makes the end users unhappy the next day.
>In CL, we are using WRKOBJLCK OUTPUT(*PRINT) and turning the spool file into a
>physical file to find which jobs have the required files locked.  We would like
>this job to then cancel any Easycom jobs with a lock on the file.  (We do not
>want it to cancel other batch jobs, like backup or our hawkeye rebuild.)  We do
>not know how to get which subsystem a job is running in given a job
>number/user/job name.
>
>Question 1 - Is there a way to get a subsystem from a job number/user/job name
>in batch?
>Question 2 - Is there instead a way to change the Easycom subsystem batch jobs
>to time out, as interactive jobs do?
>Question 3 - Are we going about this all wrong?  What would you do to insure a
>nightly upload job has exclusive rights to the files it needs without
>indiscriminately deleting ALL jobs that are using those files?
>
>Thanks again for input of your collective brains!!!
>rwm
>
>Robert Meade
>Worldwide Church of God
>

+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---


As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.