User bio
404 bio not found
Member since Aug 19, 2020
Posts:
Replies:
I am using the %File class.
This approach indeed works on a small sample file. Not sure what matters here but I have a 50 MB file created with ^%RO and while FindAt does return position, not sure if a correct one, MoveTo fails to move to it. RO files seem not to have any control characters that might have disrupted FindAt somehow.
Certifications & Credly badges:
Anna has no Certifications & Credly badges yet.
Global Masters badges:
Anna has no Global Masters badges yet.
Followers:
Anna has no followers yet.
Following:
Anna has not followed anybody yet.
I wrote a simple function to find non-printable characters in a routine:
s stream = ##class(%FileCharacterStream).%New()
s stream.Filename="C:\TestAGbackup_2024-04-15_AG.txt"
f {
q:stream.AtEnd
s line = stream.ReadLine()
; Strip all control characters, including non-processable by XML export, except for tabs and newlines
s l2=$ZSTRIP(line,"*C","",$C(9)_$C(10)_$C(13))
w:l2'=line line,!,l2,!
}
q