Published on InterSystems Developer Community (https://community.intersystems.com)

Home > Reading a CSV file into a Variable

Question
Wesley West · Jun 2, 2022

Reading a CSV file into a Variable

Hello!  I need help reading a file and putting the contents into variables.

File path would be, c:\temp\zipcitystate.csv or txt

Data looks like this

00501,Holtsville,NY
00544,Holtsville,NY
00601,Adjuntas,PR
00602,Aguada,PR

I need to add the first area to variable ZIP, Second to CITY and third to STATE. they are separated by a comma.

 

Any help would be appreciated 

#Caché
Product version: Caché 2017.1
$ZV: 2017.1.0.792.0

Source URL:https://community.intersystems.com/post/reading-csv-file-variable