In trying to get a clearer understanding of some details about updating index 
fields in a PF, I created the following test PF and test program:

--------------- Begin paste
PF:

     A          R TESTPFF
     A*
     A            PSATFG         1A
     A            PSSTCD         3P 0
     A          K PSSTCD

Program:

FTESTPF    uf   e           k disk

C                   read      TESTPF

C                   dow       not %eof

C                   add       1             PSSTCD

C                   update    TESTPFF             
C                   read      TESTPF

C                   enddo
--------------- Begin paste

Both created with basic defaults on the CRTxxx commands on a fairly stable V5R1 
system. There's nothing fancy about either; they're just pieces of stuff I had. 
In short, the PF itself has a key field that's 3-digits packed. The program 
reads in key sequence, adds 1 to the key field, updates the record and reads 
the next.

I ran it multiple times, watching for differences between *IMMED, *DLY and 
*REBLD access path maintenance and then differences between FRCRATIO() values 
of 1, 2, 10 and *NONE.

The file had three records with the key values 1, 4 and 6.

So far, so good.

The surprise was that _every_ combination gave the same result -- every record 
key had been changed to 0 (zero). I'm pretty sure I understand both the *IMMED 
and *DLY results, but I'm not certain I understand what happened for 
MAINT(*REBLD). I suppose the _good_ news is that the results were consistent.

Should the program have seen the changed index so that reading the next key 
would get the changed record?

Tom Liotta

-- 
Tom Liotta
The PowerTech Group, Inc.
19426 68th Avenue South
Kent, WA 98032
Phone  253-872-7788 x313
Fax    253-872-7904
http://www.powertech.com


__________________________________________________________________
Introducing the New Netscape Internet Service. 
Only $9.95 a month -- Sign up today at http://isp.netscape.com/register

Netscape. Just the Net You Need. 

New! Netscape Toolbar for Internet Explorer
Search from anywhere on the Web and block those annoying pop-ups.
Download now at http://channels.netscape.com/ns/search/install.jsp

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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

This mailing list archive is Copyright 1997-2024 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.