Dim aaa As String
Dim RAF As RandomAccessFile
Dim b() As Byte
Dim x() As Byte
TXRec = Rec ' record number
RAF.Initialize(File.DirInternalCache, fName, True)
RAF.CurrentPosition = Rec
If RAF.Size - (RAF.CurrentPosition + 4096) => 4096 Then ' <------ this line throws syntax error in logs window
x = RAF.ReadBytes(b, 0, 4096, TXRec)
TXRec = TXRec + 4096
aaa = BytesToString(x, 0, x.Length, CharSet)
SendIt(18550, Pad(fName,20,0) & aaa) 'this handles the encryption, checksums etc and sends the data
End If ' <------ this line throws syntax error in logs window
If RAF.Size - (RAF.CurrentPosition + 2048) => 2048 Then
x = RAF.ReadBytes(b, 0, 2048, TXRec)
TXRec = TXRec + 2048
aaa = BytesToString(x,0,x.Length,CharSet)
SendIt(18550, Pad(fName,20,0) & aaa)
End If
' '''''''
' '''''''
If RAF.Size - (RAF.CurrentPosition + 1) => 1 Then
x = RAF.ReadBytes(b, 0, 1, TXRec)
TXRec = TXRec + 1
aaa = BytesToString(x,0,x.Length,CharSet)
SendIt(18550, Pad(fName,20,0) & aaa)
End If
If RAF.Size - (RAF.CurrentPosition + 1) > RAF.Size Then
SendIt(18551, Pad(fName,20,0))
End If
'End If
RAF.Close