Just to be 100% clear - it's not just indexes on subroutines that will get out 
of sync.  Even indexing a simple TRANS statements will cause problems.

This is because the index is updated whenever the primary file (the one with 
the index) is updated.  If the data is in the 2nd file (the TRANS or where the 
subroutine gets its data), the primary file has no clue that the data was 
changed in the secondary file, thus the index will not be updated.

The only time indexing something like this is (relatively) safe is if you know 
the data in the 2nd file will never change, and even those can burn you.

John Israel
Sr. Programmer/Analyst
Dayton Superior Corporation
721 Richard St.
Dayton, OH  45342
937-866-0711 x44380
-----Original Message-----
From: owner-u2-us...@listserver.u2ug.org 
[mailto:owner-u2-us...@listserver.u2ug.org] On Behalf Of Womack, Adrian
Sent: Sunday, May 17, 2009 11:57 PM
To: u2-users@listserver.u2ug.org
Subject: RE: [U2] Auto-updating of secondary indices.

Use "LIST.INDEX filename" and check under the  "Build" column, indexes
usually say "Not Reqd" if they are updated automatically.

The DISABLE.INDEX & ENABLE.INDEX commands can be used to turn off/on
automatic updating of the indexes.

But, as Henry mentioned, if the subroutines are accessing data in other
files, then automatic updating is not really a good idea because as soon
as the other file changes your AK will be out of date (even with
automatic updates on).

IMO Aks should only ever reference @ID & @RECORD. 

-----Original Message-----
From: owner-u2-us...@listserver.u2ug.org
[mailto:owner-u2-us...@listserver.u2ug.org] On Behalf Of Ken Ford
Sent: Monday, 18 May 2009 10:15 AM
To: u2-users@listserver.u2ug.org
Subject: [U2] Auto-updating of secondary indices.

>From my reading of the Universe documentation, secondary indices should
be automatically updated.  I have a case where a file has about 8
secondary indices, some of which are updated automatically, and some
seem not to be.  A complete rebuild is done on all these indices each
night.  There does not seem to be anything significantly different about
the ones that don't update automatically.  They are I-descriptors that
call a subroutine, but others like these update automatically.  Any
suggestions?  I am thinking I should delete the indices in question,
recreate them, and rebuild them.

Regards,
Ken Ford

Universe Software Engineer


DISCLAIMER:
Disclaimer.  This e-mail is private and confidential. If you are not the 
intended recipient, please advise us by return e-mail immediately, and delete 
the e-mail and any attachments without using or disclosing the contents in any 
way. The views expressed in this e-mail are those of the author, and do not 
represent those of this company unless this is clearly indicated. You should 
scan this e-mail and any attachments for viruses. This company accepts no 
liability for any direct or indirect damage or loss resulting from the use of 
any attachments to this e-mail.
-------
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/
-------
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/

Reply via email to