![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Good afternoon, My company recently upgraded our 3rd party software to a Windows 2003 server running D3 PICK. We have about 60 users so we are not the biggest PICK users in the universe. Here is my issue: Most everything updated on our system logs a note in our accounts. The routine that adds these notes uses the following code to use a sequential key to add the records: 040 RETRY.READ: 041 READU MSTITEM FROM MASTR1, "NOTEKEY" LOCKED 042 LOCK.CNT += 1 043 SLEEP 1 044 GOTO RETRY.READ 045 END ELSE 046 MSTITEM = '' 047 END 048 MSTITEM<2>=MSTITEM<2>+1 049 WRITE MSTITEM ON MASTR1, "NOTEKEY" 050 RELEASE MASTR1, "NOTEKEY" The problem is simple-we end up with records being overwritten when usage gets the least bit heavy. I put some tracing steps in the routine and found the same key is being used by seperate processes when updating. All I can figure is that both processes are trying to lock the record at the same time and both end up with access to the record creating duplicate keys. Any ideas/suggestions/discussion on this would be greatly appreciated! Thanks, Walt |
#3
| |||
| |||
|
|
Good afternoon, My company recently upgraded our 3rd party software to a Windows 2003 server running D3 PICK. We have about 60 users so we are not the biggest PICK users in the universe. Here is my issue: Most everything updated on our system logs a note in our accounts. The routine that adds these notes uses the following code to use a sequential key to add the records: 040 RETRY.READ: 041 READU MSTITEM FROM MASTR1, "NOTEKEY" LOCKED 042 LOCK.CNT += 1 043 SLEEP 1 044 GOTO RETRY.READ 045 END ELSE 046 MSTITEM = '' 047 END 048 MSTITEM<2>=MSTITEM<2>+1 049 WRITE MSTITEM ON MASTR1, "NOTEKEY" 050 RELEASE MASTR1, "NOTEKEY" The problem is simple-we end up with records being overwritten when usage gets the least bit heavy. I put some tracing steps in the routine and found the same key is being used by seperate processes when updating. All I can figure is that both processes are trying to lock the record at the same time and both end up with access to the record creating duplicate keys. Any ideas/suggestions/discussion on this would be greatly appreciated! |
#4
| |||
| |||
|
|
opus... (AT) comcast (DOT) net ha scritto: Good afternoon, My company recently upgraded our 3rd party software to a Windows 2003 server running D3 PICK. We have about 60 users so we are not the biggest PICK users in the universe. Here is my issue: Most everything updated on our system logs a note in our accounts. The routine that adds these notes uses the following code to use a sequential key to add the records: 040 RETRY.READ: 041 READU MSTITEM FROM MASTR1, "NOTEKEY" LOCKED 042 LOCK.CNT += 1 043 SLEEP 1 044 GOTO RETRY.READ 045 END ELSE 046 MSTITEM = '' 047 END 048 MSTITEM<2>=MSTITEM<2>+1 049 WRITE MSTITEM ON MASTR1, "NOTEKEY" 050 RELEASE MASTR1, "NOTEKEY" The problem is simple-we end up with records being overwritten when usage gets the least bit heavy. I put some tracing steps in the routine and found the same key is being used by seperate processes when updating. All I can figure is that both processes are trying to lock the record at the same time and both end up with access to the record creating duplicate keys. Any ideas/suggestions/discussion on this would be greatly appreciated! Thanks, Walt the code seems ok to me... line 050 is not necessary... Regards, Stefano |
#5
| |||
| |||
|
|
On Apr 17, 12:10 pm, stefano <stef... (AT) friuldata (DOT) it> wrote: opus... (AT) comcast (DOT) net ha scritto: Good afternoon, My company recently upgraded our 3rd party software to a Windows 2003 server running D3 PICK. We have about 60 users so we are not the biggest PICK users in the universe. Here is my issue: Most everything updated on our system logs a note in our accounts. The routine that adds these notes uses the following code to use a sequential key to add the records: 040 RETRY.READ: 041 READU MSTITEM FROM MASTR1, "NOTEKEY" LOCKED 042 LOCK.CNT += 1 043 SLEEP 1 044 GOTO RETRY.READ 045 END ELSE 046 MSTITEM = '' 047 END 048 MSTITEM<2>=MSTITEM<2>+1 049 WRITE MSTITEM ON MASTR1, "NOTEKEY" 050 RELEASE MASTR1, "NOTEKEY" The problem is simple-we end up with records being overwritten when usage gets the least bit heavy. I put some tracing steps in the routine and found the same key is being used by seperate processes when updating. All I can figure is that both processes are trying to lock the record at the same time and both end up with access to the record creating duplicate keys. Any ideas/suggestions/discussion on this would be greatly appreciated! Thanks, Walt the code seems ok to me... line 050 is not necessary... Regards, Stefano I don't know about D3/Windows but my version of D3/Linux the code could be pared down to: 040 RETRY.READ: 041 READU MSTITEM FROM MASTR1, "NOTEKEY" 042 MSTITEM<2>=MSTITEM<2>+1 043 WRITE MSTITEM ON MASTR1, "NOTEKEY" On D3/linux, if the item is not read (on file), and there is no clause, a null item is created. And why sleep for a second? Let the record locking system handle things. Processes will wait their turn until they are able to read and assert their own lock. And as long as the variable 'LOCK.CNT' is not required else where in the code then don't increment it. Regards, Dale- Hide quoted text - - Show quoted text - |
#6
| |||
| |||
|
|
I will check the integrity of the file, but we did a full restore of the system about 2 weeks ago and nothing changed. The problem was there before and after the save/restore. |
#7
| |||
| |||
|
|
Good afternoon, My company recently upgraded our 3rd party software to a Windows 2003 server running D3 PICK. We have about 60 users so we are not the biggest PICK users in the universe. Here is my issue: Most everything updated on our system logs a note in our accounts. The routine that adds these notes uses the following code to use a sequential key to add the records: 040 RETRY.READ: 041 READU MSTITEM FROM MASTR1, "NOTEKEY" LOCKED 042 LOCK.CNT += 1 043 SLEEP 1 044 GOTO RETRY.READ 045 END ELSE 046 MSTITEM = '' 047 END 048 MSTITEM<2>=MSTITEM<2>+1 049 WRITE MSTITEM ON MASTR1, "NOTEKEY" 050 RELEASE MASTR1, "NOTEKEY" The problem is simple-we end up with records being overwritten when usage gets the least bit heavy. I put some tracing steps in the routine and found the same key is being used by seperate processes when updating. All I can figure is that both processes are trying to lock the record at the same time and both end up with access to the record creating duplicate keys. Any ideas/suggestions/discussion on this would be greatly appreciated! Thanks, Walt |
#8
| |||
| |||
|
|
Good afternoon, My company recently upgraded our 3rd party software to a Windows 2003 server running D3 PICK. We have about 60 users so we are not the biggest PICK users in the universe. Here is my issue: Most everything updated on our system logs a note in our accounts. The routine that adds these notes uses the following code to use a sequential key to add the records: 040 RETRY.READ: 041 READU MSTITEM FROM MASTR1, "NOTEKEY" LOCKED 042 LOCK.CNT += 1 043 SLEEP 1 044 GOTO RETRY.READ 045 END ELSE 046 MSTITEM = '' 047 END 048 MSTITEM<2>=MSTITEM<2>+1 049 WRITE MSTITEM ON MASTR1, "NOTEKEY" 050 RELEASE MASTR1, "NOTEKEY" The problem is simple-we end up with records being overwritten when usage gets the least bit heavy. I put some tracing steps in the routine and found the same key is being used by seperate processes when updating. All I can figure is that both processes are trying to lock the record at the same time and both end up with access to the record creating duplicate keys. Any ideas/suggestions/discussion on this would be greatly appreciated! Thanks, Walt |
#9
| |||
| |||
|
|
Good afternoon, My company recently upgraded our 3rd party software to a Windows 2003 server running D3 PICK. We have about 60 users so we are not the biggest PICK users in the universe. Here is my issue: Most everything updated on our system logs a note in our accounts. The routine that adds these notes uses the following code to use a sequential key to add the records: 040 RETRY.READ: 041 READU MSTITEM FROM MASTR1, "NOTEKEY" LOCKED 042 LOCK.CNT += 1 043 SLEEP 1 044 GOTO RETRY.READ 045 END ELSE 046 MSTITEM = '' 047 END 048 MSTITEM<2>=MSTITEM<2>+1 049 WRITE MSTITEM ON MASTR1, "NOTEKEY" 050 RELEASE MASTR1, "NOTEKEY" The problem is simple-we end up with records being overwritten when usage gets the least bit heavy. I put some tracing steps in the routine and found the same key is being used by seperate processes when updating. All I can figure is that both processes are trying to lock the record at the same time and both end up with access to the record creating duplicate keys. Any ideas/suggestions/discussion on this would be greatly appreciated! Thanks, Walt |
#10
| |||
| |||
|
|
opus600 (AT) comcast (DOT) net wrote: Good afternoon, My company recently upgraded our 3rd party software to a Windows 2003 server running D3 PICK. We have about 60 users so we are not the biggest PICK users in the universe. Here is my issue: Most everything updated on our system logs a note in our accounts. The routine that adds these notes uses the following code to use a sequential key to add the records: 040 RETRY.READ: 041 READU MSTITEM FROM MASTR1, "NOTEKEY" LOCKED 042 LOCK.CNT += 1 043 SLEEP 1 044 GOTO RETRY.READ 045 END ELSE 046 MSTITEM = '' 047 END 048 MSTITEM<2>=MSTITEM<2>+1 049 WRITE MSTITEM ON MASTR1, "NOTEKEY" 050 RELEASE MASTR1, "NOTEKEY" The problem is simple-we end up with records being overwritten when usage gets the least bit heavy. I put some tracing steps in the routine and found the same key is being used by seperate processes when updating. All I can figure is that both processes are trying to lock the record at the same time and both end up with access to the record creating duplicate keys. Any ideas/suggestions/discussion on this would be greatly appreciated! Thanks, Walt |
![]() |
| Thread Tools | |
| Display Modes | |
| |