12-19-2012 03:08 PM
I have this simple data set that I want to create a pipe delimited .txt file but I'm getting 2 added end-of-record/carriage returns in the file. I'll try to supply all the necessary data/code so any help would be appreciated. I'm still fairly new to SAS.
Simple Data Set (no imbedded CR or LF that I can see) output is called CSMOUT1_SUM
CNTR TOT_CHARGE TOT_PAID
150425 53,574,833.43 21,162,557.11
Code to create simple .txt file
DATA CSMOUT1_SUM2 (KEEP=CNTR TOTCHARGES TOTPAID);
ODS LISTING CLOSE;
ODS CSV FILE='TESTOUT.TXT' OPTIONS(DELIMITER='|');
PROC REPORT DATA=CSMOUT1_SUB2 NOHEADER;
ODS CSV CLOSE;
The output I get looks like the following when I look at the file in wordpad: (The CRLF are the added carriage returns that I'm getting)
12-19-2012 03:19 PM
I tried PROC PRINT as well. I dont want the headers and I was aware of the option in PROC REPORT so thats what I used. Anyway, PROC PRINT produces extra carriage returns as well. Could it be a global setting in Options or somthing?
12-19-2012 03:44 PM
That is closer....now I only have 1 extra carriage return at the end instead of 2 so it looks like the following.
There must be a way to not have the headers either I'm sure using PROC EXPORT....I can figure that part out.
I got the headers out via "putnames=no"
I believe this is how the .txt file is to look - Thanks to all for the help