BookmarkSubscribeRSS Feed
deleted_user
Not applicable
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
4 REPLIES 4
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
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.
deleted_user
Not applicable
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
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
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.
Cynthia_sas
SAS Super FREQ
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

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
  • 4 replies
  • 2598 views
  • 0 likes
  • 3 in conversation