Hi - I am creating a CSV file with Proc Report. There are over 200 columns and no matter what LRECL I specify the report keeps wrapping around. Can you tell me if there is a setting on maximum record lenght within the procdure itself?
Post how you are creating your CSV file so we can help diagnose the problem.
What are you viewing the report in when you say it is 'wrapping around'?
Hi - I am using ODS CSV to output on mainframe. Even before I download the file to view in Excel I can browse it to see that the title row has wrapped around
Browse it in what? Is there an actual linefeed, or is it just your viewer is wrapping it? If it is in excel, is it still wrapping there?
On Z/OS I can browse the file and I can see that it has wrapped. When I download the file and open it in Excel it wraps as well. When I shorten the list of columns it does not wrap. That is why I am wondering if there is a record lenght parameter with PROC Report, or maybe a restriction with CSV files.
I don't have any wrapping when I run the following, which generates almost 600 columns:
ods csv file="c:\temp\test.csv"; PROC REPORT data=sashelp.prdsale nowd; columns actual predict country,region,division,prodtype,year,month,(actual predict); define actual/analysis sum; define predict/analysis sum; define country/across; define region/across; define division/across; define prodtype/across; define year/across; define month/across; run; ods csv close;
Do you?
Hi:
When you create your CSV file on the mainframe, you may need to explicitly use an LRECL in the DCB of the JCL procedure or use the LRECL option on the FILENAME statement. I would recommend that you work with SAS Tech Support on this question. You might (but I'm not sure about this) need to specify RS=NONE -- usually you use this option with HTML, to prevent unwanted line breaks, but you might need it with CSV destination too. That would be another question for Tech Support.
cynthia
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.