On Error 3145, wait interval before RETRY

Hi friends,

Some times i have the 3145 error, and the code bollow are used to RETRY at least 100 times

ON ERROR
IF *ERROR-NR EQ 3145
ADD 1 TO #CONT-RETRY
IF #CONT-RETRY LE 100
RETRY
END-IF
END-IF

But, spending some times of search ive found a new code like ‘CMROLL’.

The ask is: can i use the code bellow with my programs to RETRY after 1 second?

ON ERROR
IF *ERROR-NR EQ 3145 AND #CONT-RETRY LE 5
ADD 1 TO #CONT-RETRY
CALL ‘CMROLL’ 1
RETRY
ELSE
ESCAPE ROUTINE
END-IF
END-ERROR

Its all right with this? This can degrade performance on other applications?

Tanks a lot and best regards.

The use of CMROLL is fine.

You are reseting #CONT-RETRY somewhere, right?

Basically CMROLL takes the object out of the thread; so it does not hurt other programs

steve

Which is a no-brainer on OpenSystems as there are no Natural threads.

But SAG generally frowns upon our use of its CM modules (entry points into the nuke). User exits are recommended instead. In this case, USR2027N.

USR2027N + RETRY is OK.

As an alternative you can use the parameter WH=ON. Especially if we’re talking about batch programs here…

http://techcommunity.softwareag.com/ecosystem/documentation/natural/nat6311win/parms/wh.htm

Right, but that’s just a yes/no switch which doesn’t let you decide on how
long you want to wait, it’s infinite (more or less, depending on timeout
settings).

You’re right. This could be a disadvantage.

An advantage is (from my point of view): with adaopr di=cq you can see the user’s waiting for a record to be released… BTW: Is this a new behaviour of adabas 6?

Nope, checked the documentation back as far as v3 of Adabas,
and the “Waiting for Isn ” status is already documented
there :wink:

Thanks!

But IIRC in Adabas 3.3@Solaris WH=ON resulted in an new adabas call every second…