The SAS Output Delivery System and reporting techniques

rtf output: how to remove blank lines between output

Reply
N/A
Posts: 0

rtf output: how to remove blank lines between output

hello.

i am new to ODS and have spent too many work hours trying to solve this problem. any help would be greatly appreciated....

i am creating a codebook with a sas program with ods rtf. the program is a macro program which loops through macro variables. one data _null_ step is run for each variable in the dataset. in the rtf file, there are blank lines between the output generated from each data step. is there anyway to prevent these blank lines from appearing?

many, many thanks.
christine
Super Contributor
Super Contributor
Posts: 3,174

Re: rtf output: how to remove blank lines between output

You may want to share code to get a more complete response.

Also, since the logic is macro-based, is there any reason for having a separate DATA _NULL_ step for each variable. At a minimum, you will have SAS-generated pagination if outputing to a PRINT-type file.

But if you are controlling a data file, there should be no extraneous lines generated unless data-wrap or possibly some additional PUTs to consider removing.

Lastly, examine the RTF code using a text edit session to validate what is actually being generating, when you mention "..blank lines between the output...".

Scott Barry
SBBWorks, Inc.
N/A
Posts: 0

Re: rtf output: how to remove blank lines between output

sorry for the confusion. i should have stated that there is only one data _null_ step but, for 99 variables, it is executed 99 separate times, utilizing different files for each execution.

i looked at the rtf file - and used the show/hide button. there is a new line indicator followed by another line with the text "=============Section Break (Continuous)====".

this is my first time using the sas discussion group. is there a way i can attach the output file?

many thanks for taking the time to read this.
christine
Super Contributor
Super Contributor
Posts: 3,174

Re: rtf output: how to remove blank lines between output

You must have some extraneous PUTs or like I mentioned, if you are generating output to FILE PRINT or if you have a print-type output file, you will likely get additional noise, including pagination between DATA steps. It's still unclear if you are actually execution a DATA _NULL_ step 99 times or if you have one DATA _NULL_ step which iterates 99 times??

I encourage you to start with a small subset of data / variables, and analyze your generated SAS code closely, looking for all possible PUT refrences. Maximize the SASLOG output with:

options source source2 macrogen symbolgen mlogic;


If unable to determine cause, then copy/paste your code into the post - no attachments.

Scott Barry
SBBWorks, Inc.
SAS Super FREQ
Posts: 8,744

Re: rtf output: how to remove blank lines between output

Hi:
Are you running SAS 9.1.3? Or are you, by any chance, running SAS 9.2 or SAS 8.2?? The amount of space that's placed between tables is fixed based on the version of SAS, as described in this Tech Support note:
http://support.sas.com/kb/13/884.html

There is also an experimental (pre-production) option called the SECTIONDATA option that may help you, if you know the correct RTF control string that you want to see at the section break. It is described here:
http://support.sas.com/rnd/base/ods/odsrtf/rtf901.html

For more help with your task, especially if you have lengthy or complicated code or you need to show someone your output, your best bet for help is to open a track with Tech Support. They can look at your data, your output and your code and help you find the best solution. It's not really possible to post output or screen shots on the forum and it's not feasible to post lengthy code here. So in this case, Tech Support is probably your best resource,

cynthia
Ask a Question
Discussion stats
  • 4 replies
  • 586 views
  • 0 likes
  • 3 in conversation