We are trying to add a subroutine call from an existing trigger. The subroutines are definitely being called and acting appropriately, except when they attempt to write to a log file.
Using "ED" to make a simple change in order to force the trigger, we are getting this error:
Program "ED": pc = 748C, Program "XXX": LINE 409, FATAL: The locks necessary for database operations at the current isolation level (0) are not held by this process.
The subroutine is trying to write to a type 19 log file which works fine from other programs. Commenting out the log file write avoids the error.
Because of this error, the write to the CUST file (which is the one with the trigger) also fails.
I assume this is something unique to the trigger function. The trigger subroutine is cataloged globally as expected, so I am wondering if that is making file access in the account unavailable some how?
This is running in UniVerse 11.3.1
Any ideas would be gratefully appreciated.
Nelson
Page 1 / 1
We are trying to add a subroutine call from an existing trigger. The subroutines are definitely being called and acting appropriately, except when they attempt to write to a log file.
Using "ED" to make a simple change in order to force the trigger, we are getting this error:
Program "ED": pc = 748C, Program "XXX": LINE 409, FATAL: The locks necessary for database operations at the current isolation level (0) are not held by this process.
The subroutine is trying to write to a type 19 log file which works fine from other programs. Commenting out the log file write avoids the error.
Because of this error, the write to the CUST file (which is the one with the trigger) also fails.
I assume this is something unique to the trigger function. The trigger subroutine is cataloged globally as expected, so I am wondering if that is making file access in the account unavailable some how?
This is running in UniVerse 11.3.1
Any ideas would be gratefully appreciated.
Nelson
Using "ED" to make a simple change in order to force the trigger, we are getting this error:
Program "ED": pc = 748C, Program "XXX": LINE 409, FATAL: The locks necessary for database operations at the current isolation level (0) are not held by this process.
The subroutine is trying to write to a type 19 log file which works fine from other programs. Commenting out the log file write avoids the error.
Because of this error, the write to the CUST file (which is the one with the trigger) also fails.
I assume this is something unique to the trigger function. The trigger subroutine is cataloged globally as expected, so I am wondering if that is making file access in the account unavailable some how?
This is running in UniVerse 11.3.1
Any ideas would be gratefully appreciated.
Nelson
When you run a trigger you invoke the SQL isolation rules in UniVerse defined by the ISOMODE tuneable in uvconfig. The default setting will expect that the minimum level of locks for a READ is a shared lock (READL) to compile with the ISOMODE. You can change the trigger to program to use shared locks or you can change the ISOMODE to 0 in uvconfig.
The ISOMODE can be set to the following vaules
0 NO.ISOLATION
1 READ.UNCOMMITED
2 READ.COMMITTED
3 REPETABLE READ
4 SERIALIZABLE
Each setting is discussed in Basic Commands Reference. If you weren't aware of shared locks or have never used them, I'd suggest reviewing how they work before doing so. Setting ISOMODE to 0 will mean that you do not have to change in trigger program.
If you want some details on why the Isolation levels are there and what they should be used for, I'm happy to provide more information.
Regards,
Jonathan
We are trying to add a subroutine call from an existing trigger. The subroutines are definitely being called and acting appropriately, except when they attempt to write to a log file.
Using "ED" to make a simple change in order to force the trigger, we are getting this error:
Program "ED": pc = 748C, Program "XXX": LINE 409, FATAL: The locks necessary for database operations at the current isolation level (0) are not held by this process.
The subroutine is trying to write to a type 19 log file which works fine from other programs. Commenting out the log file write avoids the error.
Because of this error, the write to the CUST file (which is the one with the trigger) also fails.
I assume this is something unique to the trigger function. The trigger subroutine is cataloged globally as expected, so I am wondering if that is making file access in the account unavailable some how?
This is running in UniVerse 11.3.1
Any ideas would be gratefully appreciated.
Nelson
Using "ED" to make a simple change in order to force the trigger, we are getting this error:
Program "ED": pc = 748C, Program "XXX": LINE 409, FATAL: The locks necessary for database operations at the current isolation level (0) are not held by this process.
The subroutine is trying to write to a type 19 log file which works fine from other programs. Commenting out the log file write avoids the error.
Because of this error, the write to the CUST file (which is the one with the trigger) also fails.
I assume this is something unique to the trigger function. The trigger subroutine is cataloged globally as expected, so I am wondering if that is making file access in the account unavailable some how?
This is running in UniVerse 11.3.1
Any ideas would be gratefully appreciated.
Nelson
Since this is happening in a trigger, and the docs say you cannot change ISOMODE during a transaction, it this even possible?
Our environment has ISOMODE=1 and I am leery of messing with our production system.
The Trigger is set on the customer file, the trigger subroutine was modified to call a subroutine that evaluates new vs. old to determine if an action is required. If so, it calls another subroutine to take the action and then writes to a log, which is where the error occurs.
would we simply add this logic around the write:
BEGIN TRANSACTION ISOLATION LEVEL NO.ISOLATION
WRITE LOG.REC TO LOG FILE
END TRANSACTION
What impact would this have on other system functions that we may not want to impact?
Nelson
We are trying to add a subroutine call from an existing trigger. The subroutines are definitely being called and acting appropriately, except when they attempt to write to a log file.
Using "ED" to make a simple change in order to force the trigger, we are getting this error:
Program "ED": pc = 748C, Program "XXX": LINE 409, FATAL: The locks necessary for database operations at the current isolation level (0) are not held by this process.
The subroutine is trying to write to a type 19 log file which works fine from other programs. Commenting out the log file write avoids the error.
Because of this error, the write to the CUST file (which is the one with the trigger) also fails.
I assume this is something unique to the trigger function. The trigger subroutine is cataloged globally as expected, so I am wondering if that is making file access in the account unavailable some how?
This is running in UniVerse 11.3.1
Any ideas would be gratefully appreciated.
Nelson
Using "ED" to make a simple change in order to force the trigger, we are getting this error:
Program "ED": pc = 748C, Program "XXX": LINE 409, FATAL: The locks necessary for database operations at the current isolation level (0) are not held by this process.
The subroutine is trying to write to a type 19 log file which works fine from other programs. Commenting out the log file write avoids the error.
Because of this error, the write to the CUST file (which is the one with the trigger) also fails.
I assume this is something unique to the trigger function. The trigger subroutine is cataloged globally as expected, so I am wondering if that is making file access in the account unavailable some how?
This is running in UniVerse 11.3.1
Any ideas would be gratefully appreciated.
Nelson
Setting a record lock on the record before writing the record to the log file should resolve the error posted originally.
Without seeing the actual code, I suspect that a WRITE statement is being done without a prior READU?
Thanks,
Neil
We are trying to add a subroutine call from an existing trigger. The subroutines are definitely being called and acting appropriately, except when they attempt to write to a log file.
Using "ED" to make a simple change in order to force the trigger, we are getting this error:
Program "ED": pc = 748C, Program "XXX": LINE 409, FATAL: The locks necessary for database operations at the current isolation level (0) are not held by this process.
The subroutine is trying to write to a type 19 log file which works fine from other programs. Commenting out the log file write avoids the error.
Because of this error, the write to the CUST file (which is the one with the trigger) also fails.
I assume this is something unique to the trigger function. The trigger subroutine is cataloged globally as expected, so I am wondering if that is making file access in the account unavailable some how?
This is running in UniVerse 11.3.1
Any ideas would be gratefully appreciated.
Nelson
Using "ED" to make a simple change in order to force the trigger, we are getting this error:
Program "ED": pc = 748C, Program "XXX": LINE 409, FATAL: The locks necessary for database operations at the current isolation level (0) are not held by this process.
The subroutine is trying to write to a type 19 log file which works fine from other programs. Commenting out the log file write avoids the error.
Because of this error, the write to the CUST file (which is the one with the trigger) also fails.
I assume this is something unique to the trigger function. The trigger subroutine is cataloged globally as expected, so I am wondering if that is making file access in the account unavailable some how?
This is running in UniVerse 11.3.1
Any ideas would be gratefully appreciated.
Nelson
I should have added if the error occurs on a WRITE it means the record was not locked before the WRITE... I missed it was a WRITE and a not a READ generating the error
Sign up
Already have an account? Login
Welcome to the Rocket Forum!
Please log in or register:
Employee Login | Registration Member Login | RegistrationEnter your E-mail address. We'll send you an e-mail with instructions to reset your password.