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 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")  
 STOP

END

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.LEN
 CRLF.IX=INDEX(DOS.REC,CRLF,1)
 IF NOT(CRLF.IX) OR NOT(DOS.REC) THEN EOF=1

UNTIL EOF

 DOS.REC=DOS.REC1,CRLF.IX-1
 BYTE.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 CRLF
 DO SOMETHING WITH DOS.REC

REPEAT

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 vFileName
 EoF=0
 OsWrite "" On 'TEMP.TXT'
 OsOpen 'TEMP.TXT' To DestVar
 OffSet=0
 Loop
    ReadNext Id Else EoF=1
 Until EoF
    Read Row From vFileName, Id Then
       Convert @Fm To \09\ In Row
       Row := \0D0A\
       OsBWrite Row On DestVat At OffSet
       OffSet += Len(Row)
    End
 Repeat
 OsClose DestVar

End

amcauley@sprezzatura.com onmouseover=window.status=why not click here to send me email?;return(true)"

Sprezzatura Ltd

World Leaders in all things RevSoft

View this thread on the forum...

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