I’m trying to export a SAS data set on to UNIX folder as a text file with delimiter as ‘~|~’.
Here is the code I'm using....
PROC EXPORT DATA=Exp_TXT
OUTFILE="/fbrms01/dev/projects/tadis003/Export_txt_OF_New.txt"
DBMS=DLM REPLACE;
DELIMITER="~|~";
PUTNAMES=YES;
RUN;
Here is the output I’m getting on UNIX…..Missing part of delimiter in the data but getting whole delimiter in variable names….
Num~|~Name~|~Age
1~A~10
2~B~11
3~C~12
Any idea why I’m getting part of delimiter in the data only????
Thanks,
Sam.
My guess is that
PROC EXPORTdoes not support using multiple character delimiters. Normally, column delimiters are just a single character. So, you will probably need to write your own code to do this.PROC EXPORTfor delimited files generates plain old SAS code that is then executed. You should see the code in the SAS log, from where you can grab it and alter it as needed.Please see my answer to this other question for a SAS macro that might help you. You cannot use it exactly as written, but it should help you create a version that meets your needs.