ca.portal.admin

Re:Re: [IDMSVENDOR-L] Access to Lock Data Used in PMRM?

Discussion created by ca.portal.admin on Mar 10, 2010
OK to jump back in...

Yes they have CAS, yes they have modified the code so I cannot tell what is
just older CAS code and what is modified.

Since I don't know yet which particular programs are holding the
records/locks, I was looking around at some potential candidates and
searched through ALL of the dialogs looking
for EXCLUSIVE. I found that a bunch of programs are using TSTLCK95 - and
some are using a varient of it.
From what I've seen this is called in most cases only in the RESPONSE when
preparing to UPDATE.
TSTLCK does a TEST RETURN NOTIFICATION and KEEP LONGTERM 'A' UPGRADE
EXCLUSIVE.
**I do see that most of the programs I have looked at do a KEEP LONGTERM ALL
RELEASE before EXEC NEXT FUNCTION, but since I don't know which program(s)
to concentrate on, I do not know that all of the programs are doing a
release before continuing on (in every case).
**Actually I am pretty sure that some programs are NOT releasing locks- even
when no processing is going on if I look in LOCKMON or OPER I see a bunch of
users with dozens of Notify locks.

However, the STALL victim that I am looking into seems to be hanging up in
the premap (which is also readied as UPDATE)
(I see that the premap does do a KEEP LONGTERM ALL RELEASE - but I have
never been totally clear on longterm locks - I assume that release only
applies to LT locks set within the same program?)

Don - I believe that you wrote that LONGTERM locks do not lock the records
(contributing to stalls)? Would that still apply if there is an upgade to
exclusive?


FROM TSTLCK95:

KEEP LONGTERM 'A' TEST
RETURN NOTIFICATION INTO CSR-RETURN-LOCATION.
IF ERROR-STATUS EQ 5121
THEN NEXT COMMAND.
ELSE
IF DB-ANY-ERROR CALL DBERR99.
ELSE
IF CSR-RETURN-LOCATION = 2 OR
CSR-RETURN-LOCATION = 3 OR
CSR-RETURN-LOCATION > 5 DO
PROTECT ALL EXCEPT
(AGR-MODE
,AGR-MAP-RESPONSE
,AGR-PASSED-DATA).
MODIFY MAP CURSOR AT FIELD AGR-MAP-RESPONSE.
KEEP LONGTERM ALL RELEASE.
ROLLBACK.
DISPLAY MESSAGE CODE IS 799998. !*REC IN USE-TRY LATER
END.
KEEP LONGTERM 'A' UPGRADE EXCLUSIVE.

Outcomes