| Date: | Wed, 5 Dec 2001 10:42:57 +0100 |
| Reply-To: | Andre Wielki <wielki@INED.FR> |
| Sender: | "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU> |
| From: | Andre Wielki <wielki@INED.FR> |
| Subject: | Re: Conditionnal sending of e-mail (or running of a program) |
|
| In-Reply-To: | <5C57B5DD382CD5118E8F000629F639BE059F6C23@smtp.que.inalco.c om> |
| Content-Type: | text/plain; charset="us-ascii"; format=flowed |
|---|
Patrice,
with macro it is solved
example:
%macro email(endofquarter);
%if &endofquarter=1 %then %do;
filename outbox email;
data _null_;
file outbox
to = ("wielki@ined.fr")
subject = "Some automatic SAS E-mail"
attach = "d:\sasv82\autoexec.sas";
put "Hello there,";
put ;
put "This is a test";
put ;
put "Patrice";
run;
%end;
%mend email;
%email(0);
At 13:57 04/12/2001 -0500, PBourdages@IAG.QC.CA wrote:
>Hello to you all... I'm stuck... Consider the following portion of a program:
>
>%let EndOfQuarter = 1;
>
>filename outbox email;
>data _null_;
> %put &EndOfQuarter.;
> ** If EndOfQuarter = 1, send the Quarter results, otherwise be quiet
> about it.;
> if &EndOfQuarter. = 1 then do;
> file outbox
> to = ("Patrice Bourdages")
> subject = "Some automatic SAS E-mail"
> attach = "c:\autoexec.bat";
> put "Hello there,";
> put ;
> put "This is a test";
> put ;
> put "Patrice";
> end;
>run;
>
>Why is it that when running with the value EndOfQuarter = 0, I've got an
>empty e-mail with the attachement. When run with EndofQuarter = 1,
>everything is all right...
>
>This is purely conditionnal job running. If at the beginning of the
>program it is specified that you want to run/or not the job for end of
>quarter. Is it possible to prevent the email to go when the value is set to 0.
>
>My head is busted... I can't think strait today... A little push please...
>
>TIA
>
> \\\|///
> \\ - - //
> ( O O )
>+-----oOOo-(_)-oOOo-------------+--------------------------------+
>| Patrice Bourdages | |
>| Information Systems Analyst | Tel : (418) 650-4600 x3216 |
>| Industrielle Alliance, | Fax : (418) 650-4825 |
>| car and home insurance | E-mail: pbourdages@iag.qc.ca |
>+--------------Oooo-------------+--------------------------------+
> oooO ( )
> ( ) ) /
> \ ( (_/
> \_)
___________
WIELKI Andre
INED - Service Informatique
133 Bd Davout,
75 980 Paris Cedex 20
FRANCE
Tel: 01 56 06 21 54
|