Nael,
I think you need to use 4th argument of $zconvert:
Set file=##class(%File).%New(..LocalFileName)
Do file.Open("R")
Set handle=""
While 'file.AtEnd {
Set Line=$ZCVT(file.Read() , "I", "UTF8", handle)
// do something with Line
}
Do file.Close()
Handle "contains the remaining portion of string that could not be converted at the end of $ZCONVERT, and supplies this remaining portion to the next invocation of $ZCONVERT."
Please see reference for $zconvert
- Log in to post comments