On 1/7/26 1:40 PM, Dan Bale via RPG400-L wrote:

Can you answer Charles' question?

I did. "First" and "last" are by key, so no, there's nothing keyed before D'2017-02-04'.

The first record in the PF (which is the last one in the descending
LF) is keyed D'2017-02-04.' The last record in the PF (which is the
first in the LF) is keyed 2028-12-30.

And this being a test program for a bizarre problem, the source code is constantly being changed. For example, I just now tried adding an H-spec with an explicit DATFMT(*ISO). No change in behavior.

Now THIS is somewhat interesting. I took your suggestion and added DUMP(A) statements. Here's what I got:

For the first READ (after SETGT on JAN31), it shows (taking out the hex):

Key Value:
*2017-02-04 *

Input Buffer:
*2017-02-042017-02-05022017Y00000*
*0000000001 *

but still (squeezing out spaces and hex):
SM_ID PACKED(15,0) 000000000000000.
SM_OK CHAR(1) ' '
SMCARRYOVR DATE(10) '0001-01-01'
SMLASTDATE DATE(10) '0001-01-01'
SMMONTH PACKED(2,0) 00.
SMYEAR PACKED(4,0) 0000.

The dump after the second READ (with SETGT on FEB04), and the third read (with SETGT on FEB05), it gets:

Key Value:
*2017-03-04 *

Input Buffer:
*2017-03-042017-03-05032017Y00000*
*0000000002 *

But the fields are still as before.

And the last READ (with SETGT on APR25), it gets:

Key Value:
*2017-05-06 *

Input Buffer:
*2017-05-062017-05-07052017Y00000*
*0000000004 *


So it's reading the records, and given that it's currently doing SETGTs, it's getting the right records, but for some reason, scatter-gather isn't working!

--
JHHL
(Over 30 years and I've never put a DUMP statement into a program. Didn't even notice it was available.)

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2026 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.