Posts:
Iain has not published any posts yet.
Replies:

You'll need to do the ReadLine() just once in each iteration of the loop so that you don't get the P1 from one line pairing with the P2 from the next line, something like this:

set file=##class(%Stream.FileCharacter).%New()

do file.LinkToFile("c:\location of csv")

for  quit:file.AtEnd  set line=file.ReadLine() set ^GLOBAL($piece(line,",",1),$piece(line,",",*))=""
 

Or

USER>k temp  set $LIST(temp,31)="",myVar=$LISTTOSTRING(temp,"=?",1)
USER>w myVar
=?=?=?=?=?=?=?=?=?=?=?=?=?=?=?=?=?=?=?=?=?=?=?=?=?=?=?=?=?=?
 
Followers:
Following:
Global Masters badges: