%importStatCan(tableNum=18100004, dset=want) ĭata set has 1,039,302 rows and 15 columns (141MB text file) and worked successfully. Here's a macro I wrote a few years back to download StatCan data.ĮDIT: Successfully tested for your request: Lrecl=256 recfm=F length=length eof=eof unbuf %macro importStatCan(tableNum =, dset= ) įilename out "%sysfunc(getoption(work))/&" įilename ext "%sysfunc(getoption(work))/&tableNum.csv" įilename inzip ZIP "%sysfunc(getoption(work))/&" To extract the csv file from there, I will have to define another file ref ZIP, right? but how do I transfer the reference from REFFILE temp to a ZIP? how do i know if it was a successful download?Ģ. NOTE: DATA statement used (Total process time):ġ. NOTE: 0 records were written to the file REFFILE. NOTE: PROCEDURE HTTP used (Total process time):įilename=/var/sastmp/SAS_work939E00018EF3_rhlsvp01/#LN00223, FILENAME REFFILE temp Īnd the output is 1 %studio_hide_wrapper I found some sample codes online and tried it out. I am using Viya and would need to download a zip file and extract the csv file for data.
0 Comments
Leave a Reply. |