BookmarkSubscribeRSS Feed
DougChar
Calcite | Level 5

Hi All,

I've very new to the use of FILE PRINT to structure data prior to outputting it as a PDF file.  I've inherited this code from someone else who is not longer with the company so asking that person is not an option.  I've tried researching this on the Internet for several days now and have not been able to find a good answer as to how to control the line spacing when I use this method to create our final report.  I'm hoping that the community knows and can help me with this.

The code that I run looks like this.

data _null_;

set rx5 end=eof;

file print;

if _n_=1 and eof=1 then do;

  put @1 name_etc / @1 pat_addr1 / @1 pat_addr2 /// @1 product @60 'Quantity:' @68 disp_quan comma8.1 @87 'Days Supply:'

      @98 days_sup 3. / @1 'Health Plan Cost:' @19 sv dollar10.2 @33 'Copay:' @40 copay dollar8.2 @52 'Health Plan Paid:'

      @70 hplan_paid dollar10.2 @95 'Fill Date:' @106 fdate mmddyy10. / @1 lname @75 laddr / @1 doctor //// @1 sig ///

      @1 'This is what your Health Plan paid:' @37 hplan_total dollar11.2 // @1 'Total Copayment:' @18 copay_total dollar10.2;

end;

The output currently comes out looking like this (sorry, masking the real output for confidentiality):

Name (HRN) - DOB: LASTNAME, FIRSTNAME MI (12334567) - MM/DD/YYYY

1234 ALOHA WAY

HONOLULU, HI  96817-1349

What I want to get rid of is the spacing between the lines above so that it looks like this:

Name (HRN) - DOB: LASTNAME, FIRSTNAME MI (12334567) - MM/DD/YYYY

1234 ALOHA WAY

HONOLULU, HI  96817-1349

If you can point me in the right direction, I would appreciate it.  Thanks.

1 REPLY 1
ballardw
Super User

You should provide a data step that would provide us with a few lines of dummy data to test with.

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

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.

SAS Training: Just a Click Away

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

Browse our catalog!

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