BookmarkSubscribeRSS Feed
Petersi
Calcite | Level 5

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?

7 REPLIES 7
ballardw
Super User

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

snoopy369
Barite | Level 11

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

Petersi
Calcite | Level 5

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

snoopy369
Barite | Level 11

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?

Petersi
Calcite | Level 5

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.

snoopy369
Barite | Level 11

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?

Cynthia_sas
SAS Super FREQ

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-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 7 replies
  • 1831 views
  • 1 like
  • 4 in conversation