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



rpg400-l-request@xxxxxxxxxxxx wrote:

>   7. Monitoring a submitted job from RPG (Malchow, Grizzly)
>
>Is there a way to monitor a submitted job from an RPG program? I'd like
>to check the status of the job until it is finished running. 

Grizzly:

I suppose I'd do it the way IBM set it up to be done. Use RCVMSG (or 
appropriate API) to get the name of the submitted job from your program's 
message queue. Then, monitor the message queue from the SBMJOB MSGQ() parameter 
to get the job-ended message.

When the SBMJOB is done, make sure you specify a message queue that's available 
for monitoring. Perhaps create a dedicated one in QGPL or some application 
library just before you SBMJOB; and then name that queue for MSGQ(). When the 
monitor detects job-ended, it creates whatever kind of notification you want 
and ends.

Nearly all of this can be done in RPG via APIs. About the only thing that would 
be non-RPG would be the CHGMSGQ command that sets the monitor. Other things 
would be easier in CL, but RPG can use APIs for everything I can think of.

Tom Liotta

-- 
Tom Liotta
The PowerTech Group, Inc.
19426 68th Avenue South
Kent, WA 98032
Phone  253-872-7788 x313
Fax    253-872-7904
http://www.powertech.com


__________________________________________________________________
New! Unlimited Access from the Netscape Internet Service.
Beta test the new Netscape Internet Service for only $1.00 per month until 
3/1/04.
Sign up today at http://isp.netscape.com/register
Act now to get a personalized email address!

Netscape. Just the Net You Need.

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.