S4 L4 read


Will be grateful for any suggestions in order to resolve below mentioned issue

I am using S4 snd L4 commands to read records from ADABAS. By placing field names in the format buffer, I was able to read the field’s contents from the record of the first ISN in the resulting ISN list. The field’s content were read into the record buffer.

Now next I use L4 with ‘read next’ option. problem - But I end up getting the same data as of the first ISN in the L4 record buffer. I need to get data from second ISN onwards.

L4 command options used are R and N. No command options used for S4. I have used ISN-buffer-length of 4 bytes in S4 and L4 (not sure if this is correct). Command-id of S4 is passed correctly to L4 (verified using debugger).

Thanks for any help

Can you post screenshots of the CB for the S4 and first L4 command, from their status AFTER the commands have been issued ?

What happens when you issue a L4 again, will it still retrieve the same ISN ?

Thanks for the reply.

The S4 CB looks like: S4ABCD…R…
The L4 CB looks like: L4ABCD…RN…

In S4 the command option is R.

Also one more detail is that the ISN in the L4 CB changes (increments) on the second L4 call. But the RB does not have data corresponding to the ISN ie.i it holds on to the first ISN’s data.

Currently I ran for only two ISN’s and second ISN did not process.

PS: CB after the execution just has above mentioned values. rest are high values.

I would need a full (screen) dump from the CBs, not just a repetition of parts of the CB we already know …

I am pretty surprised Adabas does not complain when the “rest are high values”,
this is not a valid CB then, are you sure Adabas does not give you a non-zero RSP ?