ET command required??

Do we require an “ET” after a series of updates to a Database File even no Transaction is started?(NO BT is being used in this case)

I assume you are talking about direct commands again ?

Yes, updates are not committed without an ET.

I assume you are talking about direct commands again ?

Yes, updates are not committed without an ET.

I assume you are talking about direct commands again ?

Yes, updates are not committed without an ET.

I think “CL” command is required in this case(when no BT is used). See the description of “CL Command: Close User Session”

Yes, a CL command will also commit an open transaction. I assume you run as an ET-logic user. There is no explicit “open transaction” command. A transaction is started when the first record is put into hold.

Right, but relying on CL implicitely ETing comes with some risks, e.g.:

  • hold-queue overflow when many records are updated
  • timeouts resulting in lost updates

Sure, my message was not not to use ET commands but to tell what happens to open transactions if you issue a CL command. :slight_smile:

ok, that means before DB update BT and after update ET commands needs to be used to ensure that transaction is closed properly. right?

It’s unclear to me what you mean. BT is not necessary unless you do not want to commit updates you have done. A BT will undo updates to the last previous ET (or BT) point.

In case the erreneous program got terminated without properly issuing ET in previous invocation, a BT before update would be helpful?

Now I see your point. This is correct but if it is a new session you will very likely be a new user to Adabas w/o reference to the previous session (Adabas sees the old session and the new session as coming from two different users). But in case you get in as the same user you will hopefully start your sessions with an OPen command. If there is an open transaction when doing an OP command, Adabas will issue a BT and return rsp-9 to the OP command.

I would not headless issue a BT command before starting a transaction. This could be a meaningless overhead unless you run Natural which filters out ET/BTs if there is no open transaction.

ok
For a user program that update/delte records following would be necessary.

  1. OP Command: Open User Session(recommended by Software AG)
  2. Update/Delete
  3. ET Command to commit the changes
  4. CL command close user transaction(recommended by Software AG)

I hope this is Ok.

Or:

  1. OP Command: Open User Session(recommended by Software AG)
  2. Update/Delete
  3. ET Command to commit the changes
    3b.

For each update ET command needs to be used or after N nr. of updates ET command should be used to commit the changes?

It is your decision. Normally you will not do an ET for each update. Block your update(s) into a logical unit of work (updates that be updated all together or not at all) and then issue ET.

A better picture could be:

  1. OP Command: Open User Session(recommended by Software AG)
  2. Update/Delete
    2b. “go to 2” but when you have finished a logical unit of updates “go to 3”
  3. ET Command to commit the changes
    3b.

if there is single logical unit of updates, but still the nr. of operations are large then would it be required to commit it after N updates? Is there any restriction imposed by the system?

Yes, there are limits (hold queue and protection area) decided and set by the DBA and/or system programmer.

If these areas are exhausted you will receive a response code and you have to reduce your logical transaction (no of updates between ETs).

what if ET is issued without actually updating the the DB? would it cause any issues?

only issue might be a modest amount of CPU resources.

If you are putting records on hold but not updating or releasing (RI) them, then you need to issue the ET to release the records from hold, even if they haven’t been updated.