|
|
Hi,
I would like to get from an application (for now it is Natural) 2 different variables:
1 . timestamp of fnr, when the last time it was modified (insert/update/delete)
2. timestamp of each key (Desc/Super & etc) for each fnr, when it was modified (even when an update was performed & not just insert or delete)
Shalom, hello Hezi!
If we understood you correctly, then our solution would be the following:
Enhance the file's FDT with a so-called "System Generated Field" containing each record's "modification time stamp".
Define it as a (non-unique) descriptor (so it is a search field / key field)
Then you can read it from a NATURAL command like the following:Link
READ (1) [<your-ddm_view>] DESCENDING BY [<your-timestamp_descriptor_field>]
With this you have the latest change and can get the value of each individual fields - including any descriptor values.
Then you can compare it to your "caching arrays".
Cheers, Jürgen
Shalom Hezi, shalom Anat!
We re-visited this topic in a common discussion with Product Management and RnD for NAT / ADA Linux & Cloud.
ADA-Linux allows so-called system-generated fields for time stamps of record creation and record changes.
Record changes can even be written to an MU field, so a history of change-timestamps can be maintained.
These fields can be retrieved by normal NAT dartabase calls, e.g, a READ statement.
Docu link to ADA-Linux: https://documentation.softwareag.com/adaos/7.3.0/en/webhelp/adaos-webhelp/basics/fdtrec.htm#fdtrecdo
There is no other means to retrieve timestamps from Natural code.
I hope this will be supportive for you.
Thanks and cheers,
Jürgen
Boker tov, Anat! Shalom!
Sorry, but our answer came a bit too fast.
As Heiko said, we implemented Question/Part 1 of the request in ADA-Linux.
We will not implement Question/Part2 due to
effort reasons
additional performance impact
Heiko and I can only talk for ADA-Linux and we still have the talk to NAT-Linux on our todo list.
However, we cannot promise anything for NAT-Linux, w/o discussing with NAT first.
But we understand you want to access the information from a NAT variable.
Correct?
Pls. be a bit patient.
Toda!
Cheers,
Jürgen
(The customer gets an error when adding a comment, therefore I do it for him)
From the customer:
It is very nice to have that variable.
Please pay attention, to my request, to be able to get it from an application.
Furthermore, I asked to get on each fnr & key its own timestamp
With the ADABAS Version 7.4 (release in Oct 2025) we store in the FCB a timestamp of the last (insert/update/delete). You can see this timestamp with adarep file=xxx. But before this must be activated with the ADANUC OPTION=FILE_UPDATE, only a nucleus started with this option stores the timestamp in the FCB.
Question 2.: This is as well not possible on ADABAS for z/OS.