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



The program I have written grabs the job, user, job number, program,
program library of the job that has the lock as well as the job, user,
job number, program, program library and statement number of the job
trying to get the lock and write it to a file so I can find these jobs
and fix them. Most of the time the programs lock when no one is in the
data center so they just 'X' out of the session and I loose any
information that would have helped. This way at least I do have some
bread crumbs.

Bruce "Hoss" Collins
IBM Certified Specialist - eServer i5 iSeries System Administrator V5R3
Cisco Certified Network Associate
AAA Cooper Transportation
Dothan, AL 36303
(334)793-2284 x2434

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx]
On Behalf Of Mike Cunningham
Sent: Wednesday, June 07, 2006 3:09 PM
To: Michael_Schutte@xxxxxxxxxxxx; RPG programming on the AS400 /
iSeries
Subject: RE: Getting Information from a Job that has locked a record.

we got tired of dealing with this issue and wrote a generic RPG that
we
call whenever we get a record lock passing it the message data from
the
SDS data structure. The called RPG utility does a sndbrkmsg to the
person
holding the lock asking them to get out and displays a screen to the
person asking for the lock showing them the person who has the lock
and
their office phone number. It also sends an email to the person
holding
the lock in case they are not in the 5250 screen at the time. If the
same
person gets sent the same lock message more than 5 times we also end
the
job to release the lock. Helps a lot with automated night processes
when
users go home and keep records locked.

Michael_Schutte@xxxxxxxxxxxx 6/7/2006 3:42:11 PM >>>
I don't know about getting the statement number that you want where
pgm A
has the lock, but I know that you can get the JOB/USER/JOB#

Do you think displaying this information to the user would help with
them
from clicking out of the session?  Maybe even pop up a message to them
to
contact you immediately...

Michael Schutte




             "Bruce Collins"
             <bruce.collins@aa
             acooper.com>
To
             Sent by:                  "RPG programming on the AS400 /
             rpg400-l-bounces@         iSeries"
<rpg400-l@xxxxxxxxxxxx>
             midrange.com
cc


Subject
             06/07/2006 03:35          RE: Getting Information from a
Job
             PM                        that has locked a record.


             Please respond to
              RPG programming
              on the AS400 /
                  iSeries
             <rpg400-l@midrang
                  e.com>






Thanks Jerry but I am trying to do a discovery on what is locking a
particular program. I have tried to have the users call us if they
encounter one but they just click out of the session and I loose my
traceability.

Bruce "Hoss" Collins
IBM Certified Specialist - eServer i5 iSeries System Administrator
V5R3
Cisco Certified Network Associate
AAA Cooper Transportation
Dothan, AL 36303
(334)793-2284 x2434

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx]
On Behalf Of Jerry Adams
Sent: Wednesday, June 07, 2006 1:43 PM
To: RPG programming on the AS400 / iSeries
Subject: Re: Getting Information from a Job that has locked a
record.

Bruce Collins wrote:

1) Program A has a record Lock on record 1 of filea.
2) Program B tries to get a lock on Record 1 of filea but fails.

Since Program B failed I want to retrieve what statement number in
Program A that caused the Lock Condition so I can track down where
I
need fix the code to handle locked conditions.

Does this make sense?

Thanks





Bruce,


This sounds like an on-line maintenance program that has the lock.
I
surmise that because normally a batch program will vacate the lock
long
before the time-out occurs (though not always).  I have users bring
up
Customer Master records all the time under the maintenance program -
and
then go to lunch (both literally and figuratively).


The best solution for that kind of scenario is to:

    * Retrieve the record without a lock
    * Store the current ("Before") image of the record
          o Or just the fields if you update by fields rather than
the
            whole format or record
    * When the user enters their changes, retrieve the record for
update
    * Test to see if the record image (or fields) still matches the
      original image
    * If so, update the record / fields
    * If not, send them a message ("You took too bloody long") and
go
      back to step #1.


I had to modify about a dozen major file maintenance programs to
accomplish this but, once I did, support calls dropped
significantly.


           * Jerry C. Adams
*IBM System i Programmer/Analyst
B&W Wholesale Distributors, Inc.* *
voice
           615.995.7024
fax
           615.995.1201
email
           jerry@xxxxxxxxxxxxxxx <mailto:jerry@xxxxxxxxxxxxxxx>



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


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



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



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