Error Message about DETACHTABLE (AREV Specific)
At 26 AUG 2002 11:21:23AM Leon Shaffer wrote:
Hi All,
I have a program running to update indexes on the volumes
as follows -
SUBROUTINE IUCOMPRUN
DECLARE SUBROUTINE MSG,INDEX.FLUSH
EQU PAUSE.TIME$ TO '07:00PM'
EQU START.TIME$ TO '07:00AM'
TIMED.UPDATE=ICONV(PAUSE.TIME$,'MT')
INDEX.AGAIN =ICONV(START.TIME$,'MT')
CLEARSELECT
VIDS=ACCOUNTS_RECEIVABLE DATAVOL MGC MITSUI MTPI_CHAMPIONS PELINFO STATISTICS SUPPORT MCOMMON DATAVOLN'
VIDSC=COUNT(VIDS,@VM) + 1
LOOP
CURR.TIME=TIME()IF CURR.TIME ] TIMED.UPDATE OR CURR.TIMEMSG('Updating Indexes for Volume|%1%|Please be patient...','UB',IMAGE,VIDS)INDEX.FLUSH("", "")CLEARSELECTPERFORM 'DETACHTABLE ':VIDSMSG('','DB',IMAGE,'')I=0FOR Z=20000 TO 1 STEP -1MSG('Delay before next index|Will start in|%1%','UB',IMAGE,Z)NEXT ZNEXT XREPEAT
RETURN
!
INDEX.PAUSE:
MSG('Indexing has been suspended while the timed update runs|Suspend time was %1%|Restart time is %2%','UB',IMAGE,PAUSE.TIME$:@VM:START.TIME$)
LOOP UNTIL CURR.TIME INDEX.AGAIN
FOR I=1 TO 10000; NEXT ICURR.TIME=TIME()REPEAT
MSG(
,'DB',IMAGE,
)RETURN
but I am getting an error about every 6 - 10 times through the
routine, and it stops the program until a key is pressed, then
continues on - see error below –
+———————————————–+_
¦ -W509————————————– ¦_
¦ ¦_
¦ The "DETACHTABLE" command ¦_
¦ cannot be executed ¦_
¦ using the system table "VOC". ¦_
¦ ¦_
¦ -W509————————————– ¦_
¦ ¦_
¦ The "DETACHTABLE" command ¦_
¦ cannot be executed ¦_
¦ using the system table "DICT.VOC". ¦_
¦ ¦_
¦ « OK » ¦_
+———————————————–+_
__
I have searched the associated volumes that I am attaching to ensure there is not a table called VOC in those volumes.
So the VOC table is contained in the volume called MCOMMON.
Any help is appreciated…
At 26 AUG 2002 01:15PM Matt Sorrell wrote:
Leon,
The 9th element in your update list is 'MCOMMON', and you said that is the name of the volume that contains your VOC table.
I have a feeling that what is happening is that after MCOMMON has its indexes updated, and then you detach it, that is when you get your error, on the 10th time through the loop (because VOC is unloaded on the 9th).
Before you do the DETACH, check to see if the volume you are currently processing is 'MCOMMON'. If it is, don't do the DETACH. This should clear up your problem.
msorrel@greyhound.com
At 26 AUG 2002 04:54PM ps wing wrote:
Should'nt a dedicated index server be used for this purpose?
This machine would login using a WAITUNTL loop and attach the required volumes in VOC INDEXER, have a shell as CPUPLUSINIT;@SYSWINODWS@TCL and a program as the post index check to check for logout time.
At 26 AUG 2002 06:27PM Warren wrote:
Just a few comments:
1) Attaching Volumes can be a rather lengthy process, no doubt requiring a great deal of disk access (network traffic).
2)When running INDEX.FLUSH the process doesn't not 'interrupt' on keyboard activity as does the normal background indexing process.
Why is it necessary to attach/detach/reattach the volumes? This would really only be necessary when files or indexes are added to a system, which should not occur all that often in a live/production environment.
The time delays introduced by the above points could lead to some very frustrated users.
I guess I'm not sure of the purpose of this routine. It appears to replace the background indexing process and 'deactivates' indexing between certain times. I'm assuming a batch process is run at these time periods, either importing records or some other nightly posting process?
Why not use the BATCH.INDEXING system subroutine in your update process?
At 28 AUG 2002 08:59AM Leon Shaffer wrote:
Matt hit the nail on the head with the 9th array being the
MCOMMON area….after I had posted this question, I re-examined
the routine, and removed the MCOMMON in the array and made sure
it was attached all the time and this cleared up the problem.
We run this NEP to be able to run it on any workstation in case
a machine goes down or gets locked up. We can see/monitor the
index updates going on all the time and ensure that the indexes
are being performed.