|
At 17:13 02/03/2000 , Loyd Goodbar wrote: >I'm using the program from Pete Hall's web site >(http://www.execpc.com/~pbhall/?trigger.html) as a basis for making a >trigger program over a test file. I'm copying the buffer from the physical >file, plus some job information, to a capture file. All the fields in the >capture file reference the original file. > >The problem is, both the original file and the capture file use packed >fields, and I am receiving a data decimal error when I try to write to the >capture file. Since this is a before insert trigger, the original record >buffer should be NULL fields. I have added AWLNULL to the packed fields in >the capture file, set ALWNULL(*USRCTL) in my program, and "eval >%nullind(o_co) = *on" (the first packed field in the input buffer). > >I was expecting to output NULLs to the original record buffer in the capture >file. Is there something I'm missing in regard to NULLs and packed fields? I can only make a guess, since I have not tried to do this, but apparently the data must be valid based on its data type, even if the null indicator is on. You can't reset the new record image, since it is external to the program, but you could declare a third copy of the input record as yet one more data structure and specify INZ. If the current operation is an insert, you could move the initialized record to the new record area. That should be pretty efficient and would still externally describe everything. Pete Hall pbhall@execpc.com http://www.execpc.com/~pbhall +--- | This is the Midrange System Mailing List! | To submit a new message, send your mail to MIDRANGE-L@midrange.com. | To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com. | To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: david@midrange.com +---
As an Amazon Associate we earn from qualifying purchases.
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.