01-10-2018 09:16 AM
When I imported the .csv file from my desktop via File-> Import Data from SAS EG I can see the data set created as expected. However when I place the same file in server and I used a Data step to import the file I end up with missing records for all the variables. SAS code which I used here is a copy of the log from the File-> Import Data. Only thing which I changed in the coding part is the file location in Infile statement. There is no error in the log file as well.
Appreciate if someone help me to get rid of this issue.
01-10-2018 09:22 AM
EG converts the input file to a standardized format, copies the result to a file in the WORK location, and then runs a data step to read the converted data. Because of the conversion, this data step code won't fit your original data.
Two possible remedies:
- use proc import on the server, and then copy the data step (created and run by proc import) from the log
- write the data step yourself according to the documentation of the csv file; this option is preferred
01-10-2018 09:46 AM
Enterprise Guide converts the file to some other format and uses a different delimiter "7F"x between the data values.
Please check your code, the DLM= option on the INFILE statement propably looks like DLM='7F'x. Change it to the correct delimiter, something like DLM=",".
Note that you can also import CSV files that are located on the server
One page 4 of the import wizard you can select "Generalize import step to run outside of Enterprise Guide". Using thsi option will not create an intermediate file and just runs.
01-11-2018 01:42 AM
Don't expect that a single change will fix your issue on the first try. Use the tool that sits between your ears.
Read the log.
See if the delimiter fits at all (your text file might have a different one).
See if all column specifications match the data in your infile.
If you still end up puzzled, post code&log, and attach a sample of your file.