The SAS Output Delivery System and reporting techniques

Maximum Record Length for Proc Report and ODS/CSV

Reply
Contributor
Posts: 20

Maximum Record Length for Proc Report and ODS/CSV

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?

Grand Advisor
Posts: 10,210

Re: Maximum Record Length for Proc Report and ODS/CSV

Post how you are creating your CSV file so we can help diagnose the problem.

Regular Contributor
Posts: 244

Re: Maximum Record Length for Proc Report and ODS/CSV

What are you viewing the report in when you say it is 'wrapping around'?

Contributor
Posts: 20

Re: Maximum Record Length for Proc Report and ODS/CSV

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

Regular Contributor
Posts: 244

Re: Maximum Record Length for Proc Report and ODS/CSV

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?

Contributor
Posts: 20

Re: Maximum Record Length for Proc Report and ODS/CSV

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.

Regular Contributor
Posts: 244

Re: Maximum Record Length for Proc Report and ODS/CSV

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?

SAS Super FREQ
Posts: 8,719

Re: Maximum Record Length for Proc Report and ODS/CSV

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

Ask a Question
Discussion stats
  • 7 replies
  • 760 views
  • 1 like
  • 4 in conversation