BookmarkSubscribeRSS Feed
Daniel
Obsidian | Level 7

Dear All,

I need to make a mail-merge document which is a randomization form for a study (one page per randomization number). Each page has the company logo at the top, three centered title lines, a box with the randomization number and treatment assignment and some fields that need to be filled out by hand.

My first idea would be to use a few TITLE statements for the logo and the title lines and then a few PROC REPORT statements for the remainder, adjusting the table borders according to the needs (for instance, the signature field would be a two-row, one-column table with the first row having the bottom border and the second row having the word "Signature").

I was wondering if there is either an easier (or cooler!) way to do this using the capabilities of SAS 9.4. Two ideas that came to mind were the use of ODS LAYOUT and of the ODS Report Writing Interface. Do you have any thoughts or any experiences to share on the optimal way to go about doing this?

Thank you,

Daniel

PS The same question would apply in producing the accompanying randomization envelopes which will also be produced by mail-merging.

1 REPLY 1
Cynthia_sas
SAS Super FREQ

Hi:

  One thing you can do is #1) make your main merge document in Microsoft Word and define the merge fields over in Word. Then write your SAS program to create the values for the merge fields (usually in a CSV file). Finally, you go over to Word and start the merge using the CSV file to provide the information for each form. Another alternative #2) is to make the letter in a dataset in a SAS program and then merge your name data with the letter dataset and produce the entire letter file using ODS RTF. This previous forum posting has an example of #2 https://communities.sas.com/message/107987#107987.

  In addition, a more automated version of #1 that uses DDE is explained in #3) this paper http://www2.sas.com/proceedings/sugi29/034-29.pdf.

  And, yet another version of #1, using ODS HTML is shown in #4) this paper http://analytics.ncsu.edu/sesug/2005/CC05_05.PDF.

cynthia

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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
  • 1 reply
  • 1800 views
  • 0 likes
  • 2 in conversation