145 response code

We use Biblos to write Adabas programs.
Recently we started to get 145 response code in Cobol CICS applications, when we try to issue HOLD command.
It seems that 2 transactions are running too close to each other(the second transaction starts 0.1 second after the first ends) and try to update the same record. Can it be?
Another question is, should we specify ‘R’ in command option 1 field ? It seems like really dangerous option since it puts transaction in wait till the record is available.

if the second transaction follows the first, then the record should not be on hold, assuming the ET (or BT) has been issued by the first transaction.

While you can use the R option, a better option is probably to simply to re-try the HOLD command if you receive a 145 response code, which allows you to create your own pause interval before retrying and to log the attempts to see when they are occurring and possibly track if another application is actually holding the record (helpful to have “audit” fields on every record to stamp last-program-update, last-userid-update, last-time-update values on every store/update).

Thanks Douglas,

What if first transaction doesn’t issues ET. Does normally end of transaction release the record imidiatelly?

The record(s) will stay in hold until the transaction timeout (which can be hours) expires.

Normally yes, there are options to keep a record in hold even over an ET, but ‘normally’ noone uses that one.

if you are referring to a CICS transaction in your “end of transaction”, then no, the end of a CICS transaction does not release anything: Adabas and CICS do not “automatically” communicate about the status of what each views as a “transaction”. In the case of the database (ADABAS) transaction, your CICS program must explicitly tell ADABAS when the transaction is complete either with an ET command (end of transaction) or a BT (backout transaction) to ADABAS (a CL (close) command will also terminate a transaction).