Sign up on the Revelation Software website to have access to the most current content, and to be able to ask questions and get answers from the Revelation community

At 16 MAY 2002 01:22:28PM bobyerkes wrote:

There is a bad record in one of our tables and when we try to list the file we get:

'RTP51' LINE 1. B703 Variable exceeds maximum length.

We think the key has some funky char's in it.

We have tried all of the normal methods that have worked in the past but have been unable to delete it.

We cannot list, select it, copy the table, resize the table.

Bob Yerkes


At 16 MAY 2002 02:05PM RWilson wrote:

can you do

OPEN ,'file' TO FILE… EOF=0 SELECT FILE LOOP READNEXT ID ELSE EOF=1 UNTIL EOF DO IF key is not strange THEN WRITE … END REPEAT … </QUOTE> —- === At 16 MAY 2002 02:15PM bobyerkes wrote: === <QUOTE>The problem is as soon as I do a SELECT it kicks me out with the same error message. 'RTP51' LINE 1. B703 Variable exceeds maximum length. </QUOTE> —- === At 16 MAY 2002 03:29PM RWilson wrote: === <QUOTE>Are we talking the same SELECT internal basic SELECT not PERFORM "SELECT …" </QUOTE> —- === At 16 MAY 2002 04:21PM bobyerkes wrote: === <QUOTE>I was wrong about the key having a bad record, I think it's actually because the file hasn't been resized in a very long time. They have to many over flows. I Found This Article that describes a similar problem but no solution. When I deleted some of the excess overflows the table started working. My only problem now is finding out how to get the data out of the overflows. I was able to get %60 of the Data out. Does any body know if there is a utility to fix this? </QUOTE> —- === At 16 MAY 2002 10:29PM The Sprezzatura Group wrote: === <QUOTE>No - your problem does not sound like "overflow" - we have seen hundreds of thousands of payroll records in onem LNK file. Your problem is that there may be an "index" on the file which has now surpassed the 64kB record limit (ie. the keylist is ] 64kB). The Sprezzatura Group [i]Celebrate CeBIT with Sprezz Local![/i] </QUOTE> —- === At 17 MAY 2002 06:10AM Pat McNerthney wrote: === <QUOTE>Actually, I think this could be the problem. You could still read and write that many records in one group, but you could not select it. Pat </QUOTE> —- === At 17 MAY 2002 01:30PM Victor Engel wrote: === <QUOTE>I have a utility to fix this problem, but it's at home. I may have posted the source here as well, probably in 1994 or so. I'll hunt it down and post it here when I find it. Basically, the way the program works is to bypass the REVG file system and use OSBREAD to get to the data. It then uses WRITE to put the data back onto a separate file. </QUOTE> —- === At 17 MAY 2002 10:48PM Tom Savell wrote: === <QUOTE>Why don't you resize the file using RECREATE-FILE ? </QUOTE> —- === At 27 MAY 2002 01:43AM Victor Engel wrote: === <QUOTE>Sorry for the delay. I hope that late is better than never. I will post the parts as followups to this post. Note that the Subject line will indicate the file name listed in the documentation. </QUOTE> —- === At 27 MAY 2002 01:44AM Victor Engel wrote: === <QUOTE>RTP59.ZIP contains 3 files: RTP59.TXT is the document you are reading. RTP59.1 is the source code to a function that must be called RTP59_READ RTP59.2 is the source code to an example driver that can also be used as a filecopy utility. It should transfer data MUCH faster than a recordcopy if the LINK file has significant overflow. Instructions: From TCL type: COPY DOS path\RTP59.1 path\RTP59.2 TO: (BP RTP59_READ RTP59_READ_TEST BASIC BP RTP59_READ RTP59_READ_TEST CATALOG BP RTP59_READ RTP59_READ_TEST Usage: RTP59_READ_TEST file1 file2 This copies records from file1 to file2, where file1 is a LINK file. There is NO CHECKING FOR GFEs, etc., so use at your own risk. </QUOTE> —- === At 27 MAY 2002 01:47AM Victor Engel wrote: === <QUOTE>FUNCTION RTP59_READ(DOS_HANDLE, FRAME_POINTER, REC_POINTER) * THIS FUNCTION READS THE NEXT RECORD FROM DOS_HANDLE. * THE RECORD IS KNOWN TO HAVE A POINTER THAT STARTS IN FRAME FRAME_POINTER * AND IN LOCATION REC_POINTER WITHIN THE FRAME break on OSBREAD CHUNK FROM DOS_HANDLE AT FRAME_POINTER LENGTH 1024 LAST_FRAME=CHUNK NEXT_FRAME_POINTER=FRAME_POINTER GOSUB GET_REC_SIZE IF RECLEN1,1=\FF\ THEN RETURN \FF\ GOSUB GET_RECORD RETURN RECORD GET_RECORD: LOOP UNTIL REC_POINTER + 5 + RECLEN LE LEN(CHUNK) GOSUB GET_NEXT_FRAME CHUNK := LAST_FRAME25,1000 REPEAT RECORD=CHUNKREC_POINTER + 5, RECLEN FRAME_POINTER=NEXT_FRAME_POINTER *REC_POINTER=MOD(REC_POINTER+5+RECLEN,1024) + 1 REC_POINTER=MOD(REC_POINTER + 5 + RECLEN + 1 - 25,1000) + 25 IF REC_POINTER=25 THEN GOSUB GET_NEXT_FRAME FRAME_POINTER=NEXT_FRAME_POINTER REC_POINTER=25 END RETURN GET_FIRST_POS: NFP=LAST_FRAME25,3 NEXT_FRAME_POINTER=SEQ(NFP1,1) + 256 * SEQ(NFP2,1) + 65536 * SEQ(NFP3,1) NEXT_FRAME_POINTER=1024 * NEXT_FRAME_POINTER FRAME_POINTER=NEXT_FRAME_POINTER REC_POINTER=25 OSBREAD CHUNK FROM DOS_HANDLE AT FRAME_POINTER LENGTH 1024 LAST_FRAME=CHUNK GOSUB GET_REC_SIZE RETURN GET_REC_SIZE: IF (FRAME_POINTER=0) AND (REC_POINTER=0) THEN GOSUB GET_FIRST_POS END ELSE RECLEN=CHUNKREC_POINTER,5 IF RECLEN1,1=\FF\ THEN RETURN IF LEN(RECLEN) LT 5 THEN GOSUB GET_NEXT_FRAME CHUNK := LAST_FRAME25,1000 RECLEN=CHUNKREC_POINTER,5 END IF NUM(RECLEN) ELSE PRINT PRINT PRINT PRINT RECLEN PRINT CHUNKREC_POINTER,20 END END RETURN GET_NEXT_FRAME: NFP=LAST_FRAME19,3 NEXT_FRAME_POINTER=SEQ(NFP1,1) + 256 * SEQ(NFP2,1) + 65536 * SEQ(NFP3,1) NEXT_FRAME_POINTER=1024 * NEXT_FRAME_POINTER OSBREAD LAST_FRAME FROM DOS_HANDLE AT NEXT_FRAME_POINTER LENGTH 1024 RETURN </QUOTE> —- === At 27 MAY 2002 01:48AM Victor Engel wrote: === <QUOTE>DECLARE FUNCTION RTP59_READ SENTENCE=TRIM(@SENTENCE) FILE1=FIELD(SENTENCE,' ',2) FILE2=FIELD(SENTENCE,' ',3) OPEN ,FILE1 TO F1 ELSE CALL MSG( FILE1:' NOT ATTACHED');STOP

OPEN '',FILE2 TO F2 ELSE CALL MSG( FILE2:' NOT ATTACHED');STOP

IF F1 THEN

 LINK_STUFF=FIELD(F1,\0D\,2)
 DOS_FILE=LINK_STUFF13,9999
 START_FRAME=LINK_STUFF1,6
 MODULO=LINK_STUFF7,6
 START_FRAME=ICONV(START_FRAME,'MX')
 MODULO=ICONV(MODULO,'MX')
 STARTING_POS=1024 * START_FRAME
 ENDING_POS=1024 * (MODULO-1) + STARTING_POS
 OSOPEN DOS_FILE TO DOS_HANDLE THEN
    GROUP=1
    FOR POSITION=STARTING_POS TO ENDING_POS STEP 1024
       CALL STATUP(2,3,'GROUP ':GROUP)
       FRAME_POINTER=POSITION
       REC_POINTER=25
       LOOP
          RECORD=RTP59_READ(DOS_HANDLE, FRAME_POINTER, REC_POINTER)
       UNTIL RECORD=\FF\
          @RECORD=FIELD(RECORD,@FM,2,9999)1,@RM
          @ID=RECORD1,@FM
          PRINT @ID
          WRITE @RECORD ON F2,@ID
       REPEAT
       GROUP += 1
    NEXT
 END ELSE
    PRINT
    PRINT
    PRINT
    STOP 'COULD NOT OPEN FILE ':DOS_FILE
 END

END


At 27 MAY 2002 01:53AM Victor Engel wrote:

I just realized that I wrote the program in Arev. If you intend to use the programs in REVG, simply remove the Arev specific code, such as calls to STATUP. If you prefer, send me an email at [email protected] and I will email you the code directly.

View this thread on the forum...

  • third_party_content/community/commentary/forums_nonworks/5e003679fc40257088256bbb005f7115.txt
  • Last modified: 2023/12/28 07:40
  • by 127.0.0.1