LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (May 1996, week 5)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 30 May 1996 14:07:54 -0500
Reply-To:     Jules Bosch <"Jules_Bosch_at_~prinbr02"@CCMAIL.BMS.COM>
Sender:       "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From:         Jules Bosch <"Jules_Bosch_at_~prinbr02"@CCMAIL.BMS.COM>
Subject:      Re: Trapping data step error (or any other info) in AF

The following code allows one to capture info from a submit block within SCL code. It's pretty simple and is a very good example of the diverisity and flexibility of the SAS language.

It took about 30 minutes to create and test.

Jules

/******************************************************************* THIS ENTRY TEST MACROS IN SUBMIT BLOCKS *******************************************************************/

INIT:

link test;

return;

TEST: submit continue;

%macro check; %global chk_cnt; data a(keep=phaseday); set tera.final; if (phaseday<10) then do; cnt+1; output; end; call symput('chk_cnt',cnt); run; proc contents; run; %mend check;

%check %put The count is &chk_cnt;

%macro go_nogo;

/* If there is not enough sample (500 or more obs) then get out */ %if %eval(&chk_cnt)<500 %then %goto quit;

/* Otherwise run freqs */ title1 'Frequency of Phasedays 10 and Under'; proc freq; tables phaseday; run;

%quit: %mend go_nogo;

%go_nogo

endsubmit; return;

TERM: return;


Back to: Top of message | Previous page | Main SAS-L page