Hello,
How can I get each one of these print in a separate tab? The data contain a lot of rows and ods excel is not possible.
ods _all_ close;
ods csv file="C:/users/Mauri.Esfandiari/Documents/missing_ipac_odn_acc_tas.csv";
proc print data = work.missing_ipac_may18 noobs;
run;
title "Cases with missing ALCs";
proc print data = work.missing_odn_may18 noobs;
run;
title "Cases with missing Obligating Document Numbers";
proc print data = work.PSEUDO_ALCS_may18 noobs;
run;
title "Cases with Pseudo ALCs";
ods csvall close;
title;
When I run the code the title don't show up and the print statements are concatenated in one csv file.
CSV files do not have any concept of "tab". If you mean to open them in a spreadsheet that may not be a good idea if you mean by "lot of rows and ods excel is not possible" that there are too many rows to fit in Excel. Opening a CSV file with more rows than Excel wants to use the overage are discarded.
CSV files are intended for data interchange and as such "Titles" are not actually part of the content. A row of column headers and then the body of the data is the basic structure of a CSV file. Also a single CSV file basically assumes you know what you are doing when combining proc output as the result will be the output concatenated into a single file as you have found.
I think that you need to very clearly define what you want for output and possibly indicate how many records are in each of your data sets.
ods csvall file="
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.