Date: Thu, 1 Mar 2001 07:37:03 -0500
Reply-To: Philip Whittall <philip.whittall@UNILEVER.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Philip Whittall <philip.whittall@UNILEVER.COM>
Subject: Re: Search for a value
Dear Graeme,
One method -
PROC SQL;
RESET NOPRINT;
SELECT COUNT(*) INTO :HIT
FROM &DSNAME
WHERE LOTNO="&LOTNO"
;
the Macro &NHIT will be >0 if the data is there.
Probably faster is
%LET HIT=0;
DATA _NULL_;
SET &DSNAME(KEEP=LOTNO);
IF LOTNO="&LOTNO" THEN DO;
CALL SYMPUT('HIT','1');
STOP;
END;
RUN;
Philip.
On Thu, 1 Mar 2001 10:56:41 +0000, Graeme Kirton <gkirton@FILCS.COM> wrote:
>Hello,,
>
>Im wanting a hand with some base code/AF. Once we load our flat files,
the data
>is stored in a series of datasets. All I want to do is verify of the
existance
>of the data in each of the datasets, and return a string of "loaded
correctly/
>loading failed" to a status.label.
>
>The user inputs the name of the file to load, and its this name eg
>QSM001-01-0009 that would appear under Lotno in each of the 5 datasets.
>QSM001-01-0009 is what I want to do my check on.
>
>Anyone??
>
>Many Thanks
>Graeme
|