| Date: | Tue, 23 Jun 2009 15:50:24 -0500 |
| Reply-To: | Joe Matise <snoopy369@GMAIL.COM> |
| Sender: | "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU> |
| From: | Joe Matise <snoopy369@GMAIL.COM> |
| Subject: | Re: Somewhere between stopping just the data step and closing the
entire SAS session. An example. |
|
| In-Reply-To: | <349469.14705.qm@web50908.mail.re2.yahoo.com> |
| Content-Type: | text/plain; charset=ISO-8859-1 |
One option: put the rest of the code in a macro and conditionally execute
the macro.
-Joe
On Tue, Jun 23, 2009 at 3:29 PM, Brian Wallace <brian_c_wallace@yahoo.com>wrote:
> I just want to have a conditional statement that if true will halt
> execution of the rest of the program but not end the entire SAS session.
>
> An example:
>
> DATA TEST;
> INPUT CODE $5.;
> CARDS;
> 13255
> 35283
> 72547
> 07593
> 34634
>
> 23626
> ;
> RUN;
>
> DATA FULL EMPTY;
> SET TEST;
> IF CODE = '' THEN OUTPUT EMPTY;
> ELSE OUTPUT FULL;
> RUN;
>
> DATA CHECK;
> SET EMPTY;
> IF _N_ > 0 THEN ??????;
> RUN;
>
> PROC PRINT DATA = FULL;
> RUN;
>
> If there are any records in EMPTY, I don't want the rest of the program to
> run. I don't want the program to print out FULL.
>
> Thank you for any time spent and/or suggestions,
>
> Brian Wallace
>
|