View previous topic :: View next topic
|
Author |
Message |
monasu1998
Active User
Joined: 23 Dec 2005 Posts: 176 Location: India
|
|
|
|
Hi,
The L1 command reads a single record from Data Storage.
The L4 command is the same as the L1 command except that the record is placed in hold status.
My confusion is that, how can we know about
We do not write anything to put the record on hold. But internally how Adabas decides which record has to be put on hod?
Based on what, I can decide that my statement refers to L1 or L4 command?
similarly how can I decide about S1 and S4 command???
Thanks, |
|
Back to top |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
It is up to you to decide if you want to hold the record while reading it.This is why ADABAS give you the flexibility of using L1 or L4. There are other methods of putting a record in HOLD within ADABAS, but L4 is the fastest.
O. |
|
Back to top |
|
|
monasu1998
Active User
Joined: 23 Dec 2005 Posts: 176 Location: India
|
|
|
|
Thank you Ofer for your response. But I still wonder on How to put the record on HOLD while accessing adabas.
Can you please give a small example?
Thanks in Advance |
|
Back to top |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
Simply use L4. ADABAS will do the job for you.
O. |
|
Back to top |
|
|
monasu1998
Active User
Joined: 23 Dec 2005 Posts: 176 Location: India
|
|
|
|
Hello Ofer7,
I m still in confusion about the L4 command.
In general we use the READ command to read the adabas file.
How can I determine if my READ command is L1 or L4?
Is there something like I have to use any other command with READ to make it L4?
Thanks in Advance. |
|
Back to top |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
L1 & L4 are direct ADABAS command. Natural interprets each of your data access statements to one ADABAS direct command or more.
Natural is smart enough to take care of your HOLD logic without you knowing about it. For example, if an UPDATE statement is coded within a READ loop, the record might be read with HOLD status.
To read more, please refer to the fine manual (Programming Guide --> Database Access --> Record Hold Logic).
O. |
|
Back to top |
|
|
monasu1998
Active User
Joined: 23 Dec 2005 Posts: 176 Location: India
|
|
|
|
Thank you Ofer. I am clear now.... :-) |
|
Back to top |
|
|
|