I am using sas enterprise guide 8.3 to import a csv file into SAS.
I try to use import data wizard to do that; then copy the log of it to reuse it later(e.g. next week). the log looks like the following:
/*-------------------------------------------------
code generated by a SAS task
generated on Thursday, August 5,2021 at 9:59:13 PM
By task: import data wizard
Source File:
d:\test\test.csv
Server: Local File System
Output data: Work.temptable
Server: [servername]
-------------------------------------------------------------------*/
Data: Work.temptable;
Length:
col1
col2
Format:
col1
col2
Informat:
col
col2
Infile 'H:\Saswork\TD13012_[Server_name]\#LN_00032'
Input
col1
col2;
run;
My scenario is: I want to save the code above and rerun the code each week because there will be a new csv file each week, I need to import the new csv file each week. in the comment part, the source file is correct; but in the code part, it seems that infile points to a temp file 'H:\Saswork\TD13012_[Server_name]#LN_00032'. I wonder if this temp file always exists because I need to run the code each week. I try to replace the infile value with the correct location in the comment part(local folder, d:\test\test.csv ), there is an error message.
so how can I handle this infile? thanks!