B715 Dos File size exceeds 65532 bytes (AREV Specific)
At 21 DEC 1998 10:21:32PM Ralph Burton wrote:
Hi!
I'm downloading some data to a text file and when I do:
OSREAD newrec FROM file.var then....I get the error message b715 Dos file size exceeds 65532 bytes
I'm using AREV 2.10 or 2.12
Any thoughts?
Thanks,
Ralph
At 22 DEC 1998 01:17AM Paul Rule wrote:
OSREAD will read the whole record into your variable which has the usual 64 K limit. Use OSBREAD and read the file in blocks.
Something likeā¦
osbread dosblock from dos.handle at pos length blocksize
stat=status()if stat #0 then call msg("Access denied while trying to read from ":dosfile:"|Status=:stat)pos+=blocksize
At 22 DEC 1998 08:56AM Matt Sorrell wrote:
Ralph,
If your file is in a logical format, such as one record per row, with each row CRLF delimited, you could use the following code to parse the file one line at a time:
FILENAME=C:\MYFILE.TXT" ; * Put whatever your file name is here
OSOPEN FILENAME TO DOS.FILE ELSE
MSG("COULDN'T OPEN INPUT FILE")STOPEND
BYTE.LEN=1500 ; *Set this to a number greater than max chars per line
BYTE.POS=0
EOF=0
CRLF=CHAR(13):CHAR(10)
LOOP
DOS.REC='OSBREAD DOS.REC FROM DOS.FILE AT BYTE.POS LENGTH BYTE.LENCRLF.IX=INDEX(DOS.REC,CRLF,1)IF NOT(CRLF.IX) OR NOT(DOS.REC) THEN EOF=1UNTIL EOF
DOS.REC=DOS.REC1,CRLF.IX-1BYTE.POS+=LEN(DOS.REC)+2
These two line strip the CRLF from the record, and move the
byte pointer to the next char after the CRLFDO SOMETHING WITH DOS.RECREPEAT
OSCLOSE DOS.FILE
If you have any questions or don't understand something, feel free to ask.
Matt Sorrell
msorrell@movgal.com
At 23 DEC 1998 12:02AM Ralph Burton wrote:
Matt,
Thank you for your quick response! I was trying to move records from AREV to a ".txt" file. I guess I should be using OSBREAD and
OSBWRite. Do you have a good example on how to export using the
OSBWrite?
Thanks,
Ralph
At 23 DEC 1998 12:05AM Ralph Burton wrote:
Paul,
Thanks for your example. Do you have any good export examples using OSBWRITE. The example in the manual is pretty poor.
Thanks,
Ralph
At 23 DEC 1998 03:52AM amcauley@sprezzatura.com onmouseover=window.status=why not click here to send me email?;return(true)", [url=http://www.sprezzatura.com" onMouseOver=window.status=Why not click here to visit our web site?';return(true)]Sprezzatura Ltd[/url] wrote:
Open "FILENAME" To vFileName Then
Select vFileNameEoF=0OsWrite "" On 'TEMP.TXT'OsOpen 'TEMP.TXT' To DestVarOffSet=0LoopReadNext Id Else EoF=1Until EoFRead Row From vFileName, Id ThenConvert @Fm To \09\ In RowRow := \0D0A\OsBWrite Row On DestVat At OffSetOffSet += Len(Row)EndRepeatOsClose DestVarEnd
amcauley@sprezzatura.com onmouseover=window.status=why not click here to send me email?;return(true)"
World Leaders in all things RevSoft