BookmarkSubscribeRSS Feed
HGimenez
Obsidian | Level 7

Hi everybody,

I need to generate ~1,000 statements with SAS, one statement for each customer in PDF format and e-mail them. Something similar to the account balance you get from your bank, very close to a credit card statement.

1- I guess ODS is the way to go. Is there other alternative?

2- I am sure somebody has done something like this. If you are so kind to share your code, I will really appreciate it. I am new to ODS and I don't have a clue on where to start. Any suggestions or comments are welcome

3- Is it possible to design a template with a graphic desing tool and "fill the blanks" with SAS?

 

Thanks a lot!

2 REPLIES 2
RW9
Diamond | Level 26 RW9
Diamond | Level 26

Start by writing the code for 1 statement.  This could be as simple as:

data tmp;
  str="hello";
run;

ods pdf file="c:\tmp.pdf";
proc print data=tmp noobs;
run;
ods pdf close;

filename tmp email "..." attach="c:\tmp.pdf";

data _null_;
  file tmp;
  put 'Hi your file.';
run;

filename tmp clear;

Once you have it working for one, then you can start to replace key parts with macro to be able to run it for X number of times.

 

ASHISH2525
Quartz | Level 8

Hi,

 

Were you able to accomplish the task. Can you share the code with me. it will be very helpful 

Thanks 

 

 

Regards,

Ashish

CFC_SAS_Communities_400x225.jpg

Call for content now open!

It's your turn to help shape SAS Innovate 2027. Share your expertise and inspire the SAS community.

Submit your proposal →

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
  • 2 replies
  • 2451 views
  • 1 like
  • 3 in conversation