I think you are asking for trouble using triggers for this, they are generally not meant for duplicating data so much as gathering stats, or triggering other processes and things like that. Especially useful for message queues and so on.
If you simply must start using a new file layout before you are ready, then the thing to do is to write a jEDI driver in jBC. This will let you intercept all the read, open, write, etc. and do what you want, including write to a shadow file at the same time. You will know why format because of the file name that is opened. Look for the demo in the jBASE install directories. This will be slower than a normal write though because you will double the writes and they will be to disparate areas of your disk. However, if the file layout had not been hardcoded, you would not have this problem, but I am sure the people responsible have long ago been hanged ;-). I would highly recommend not doing this though but rather making a branch in your source code control system <cough>, then slogging your way through the work (this time taking out any hard coded references). Jim > -----Original Message----- > From: [email protected] [mailto:[email protected]] On > Behalf Of LWhite > Sent: Friday, July 30, 2010 7:55 AM > To: jBASE > Subject: Trying to avoid trigger recursion in a jBASE system > > Hello, > > We will be implementing a new file structure. Due to time constraints the > decision was made to set up parallel files and then make code changes as we > can make human procedural changes. The files need to be kept in sync and > the first idea was to use post write triggers. I am concerned about recursion > and was hoping someone here could shed some light on the issue. > > So let me offer an example. > OLD.PRODUCT.FILE > NEW.PRODUCT.FILE > > Attributes will not be in the same location. Therefore, attribute 2 through 10 > on the old file will be scattered from 11 to 80 in the new one. > > Every time one of the shared attributes in OLD.PRODUCT.FILE is changed the > matching attribute in NEW.PRODUCT.FILE needs to be updated. The same > thing needs to happen from NEW.PRODUCT.FILE to OLD.PRODUCT.FILE. > > Can we write the trigger to ignore file changes made by the other trigger? If > so, how? > > Is there a better way to do this that will keep nearly real time synchronization > at a lower system over head cost? > > The only system information that I thought was important to this question > was: > RELEASE Information : Major 3.4 , Minor 10 , Patch 0373 > > Thank you > > -- > Please read the posting guidelines at: > http://groups.google.com/group/jBASE/web/Posting%20Guidelines > > IMPORTANT: Type T24: at the start of the subject line for questions specific > to Globus/T24 > > To post, send email to [email protected] To unsubscribe, send email > to [email protected] > For more options, visit this group at > http://groups.google.com/group/jBASE?hl=en -- Please read the posting guidelines at: http://groups.google.com/group/jBASE/web/Posting%20Guidelines IMPORTANT: Type T24: at the start of the subject line for questions specific to Globus/T24 To post, send email to [email protected] To unsubscribe, send email to [email protected] For more options, visit this group at http://groups.google.com/group/jBASE?hl=en
