× 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.



Hi, Mike:

While this technique works if the program is actually "active" (in the call stack of some job), it does not work when a program has been "activated" but then it has returned with *INLR=*OFF -- in that case, the program has returned to its caller, so it is no longer on the active call stack, but it is still 'activated' -- it has local storage allocated for its variables, etc.

The IBM API QWVOLACT (available since V4R2) lets you do this. See this post for a sample program (in RPGLE, even though it's in the MI400 mailing list):

http://archive.midrange.com/mi400/200211/msg00008.html

Regards,

Mark S. Waterbury

> Mike Krebs wrote:
Steve,
If you haven't figured this out yet, Carsten Flensburg wrote something that will get you there with minor changes. This program retrieves the list of jobs and then interrogates certain jobs (you would interrogate all) to find the first program in the stack (you would read the entire stack looking for your program).
http://www.think400.dk/apier_4.htm#eks0002
If you want something "thinner", start with this program from Scott Klement. Then add the code from another Scott posting:
http://www.as400pro.com/tipView/category/API/key/696
http://forums.systeminetwork.com/isnetforums/showthread.php?t=50170&page=2

Mike
----- Original Message ---- From: Steve Roper <ste.roper@xxxxxxxxxxxxxxxx> To: rpg400-l@xxxxxxxxxxxx Sent: Wednesday, February 20, 2008 12:32:22 PM Subject: check for active program
I am trying to use the user space API's to check if a particular program is running and what its status is as on WRKACTJOB screen. All instances of using API's of the web have all returned JOBNAME and USERNAME not the program name can any one help please

Steve Roper


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

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.