Page 1 of 1

*ETID SYSTEM VARIABLE

PostPosted: Tue Nov 23, 2010 5:29 pm
by diptisaini
What is the use of *ETID ? Please explain me with example.

Re: *ETID SYSTEM VARIABLE

PostPosted: Wed Nov 24, 2010 10:24 pm
by RGZbrog
ETID is used by Adabas to track logical transactions. Essentially, it identifies your ISNs in the Hold Queue. (The Hold Queue is used by Adabas' record locking mechanism.) The ETID must be unique, so, for simplicity, within your job stream you can set the ETID to the job name.

You'll be concerned with the ETID value only for restart logic. When you execute
END TRANSACTION field list ...
the restart data (field list) is stored in Adabas' Checkpoint file and identified by the ETID value. To retrieve that restart data, you need to provide Adabas with the ETID under which the data was stored.

For on-line updates, you don't usually need restart data, but you still need an ETID. It can get tricky if you're issuing updates from multiple on-line sessions. For example, you can't use your user ID for the ETID. Here Natural Security is handy, because it can generate a unique ETID for you. You probably don't care what the ETID is, as long as it's unique.