|
The only problem with this approach is that you cannot save the library
while the program is running, even if you use save while active, because you
can't get a lock on it.
I prefer to lock a data area in a separate library with the same name as the
program, or with a more descriptive name such as FILEMAINT. You can then put
information in the data area, such as the last time the job ran and the job
name.
Albert York
-----Original Message-----
From: Lance Gillespie [SMTP:lgillespie@xxxxxxxx]
Sent: Thursday, October 23, 2003 11:30 AM
To: rpg400-l@xxxxxxxxxxxx
Subject: RE: Best way to check if a program is running
> The program I'm trying to find running is a file maintenance
program.
In that case you can change the CL to obtain an exclusive lock on
itself first thing. If the lock fails, someone else is running the
program
so quit.
_______________________________________________
This is the RPG programming on the AS400 / iSeries (RPG400-L)
mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.