BookmarkSubscribeRSS Feed
Santoshrk
Obsidian | Level 7

Hi,

Is there any way in SAS to identify and remove blank pages in RTF with the SAS program? 

I have a file with more than 100 pages, So it is hard to check each page manually every time when I rerun the output. Any input is much appreciated!

 

Thank You,

 

Regards,
Santhosh 

1 REPLY 1
japelin
Rhodochrosite | Level 12

The rtf file is text-based, so if you know the code for the blank page, you can process it.

Check this.

filename sample "c:\temp\class.rtf";
ods rtf file=sample;
proc print data=sashelp.class;
run;
ods rtf close;
data _null_;
  infile sample;
  input;
  put _infile_;
run;

However, rather than deleting the blank page, it would be better to modify the program so that the blank page is not generated.

If you can provide the rtf with the blank page or its executable program, you may get more advice.

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 4278 views
  • 0 likes
  • 2 in conversation