Date: Wed, 8 Dec 1999 15:09:17 -0500
Reply-To: Schechter Robert RS <robert.schechter@ASTRAZENECA.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Schechter Robert RS <robert.schechter@ASTRAZENECA.COM>
Subject: Re: A SAS Problem
Content-Type: text/plain
Zhaoping
You want help/answers from the list why don't you join us. That's what we're
all about, each helping each other. We are not a bunch of help desk support
people sitting here to solve someone's problems.
> ----------
> From: Wang, Zhaoping (PCM - NJ)[SMTP:ZWang@NA2.US.ML.COM]
> Sent: Wednesday, December 08, 1999 2:53 PM
> To: SAS-L@LISTSERV.UGA.EDU
> Subject: A SAS Problem
>
> Since I'm not on the list, please send your solution
> privately to my
> e-mail address.
>
>
>
> The following code is used to create a SAS dataset/table
> from
> our DB2
> database:
>
> proc sql;
> connect to db2 (database=dbgood user= using= );
> create table sys.one as
> select * from
>
> connection to db2
> (select var1
> from good.table1);
>
> disconnect from db2;
> quit;
>
> Note that the middle portion of the code is not SAS but
> standard
> SQL recognizable by
> DB2. You can insert "where" clause in that portion to pull a
> part of table1 on DB2
> and to create a smaller SAS data set.
>
> Suppose you have an id list that is too long to be typed so
> you
> cannot use "where"
> clause. You would necessarily think of the following
> solution:
>
> proc format cntlin=namelist;
> run;
>
> where id=start, label='OK', and
> fmtname='$namex'
>
> and then try
>
> if put (id, $namex.) = 'OK'
>
> But how to fill this subsetting into the standard portion of
> the above SQL code stream ?
> Also assume that table1 on DB2 is huge, so it's not possible
> to
> create a new table
> that contains the same number of obs as table1 (and then try
> subsetting on your own
> platform).
>
> Thanks for your help.
>
>
>
> Zhaoping
>
>
>
>
>
>
>
>
>
>
>
>
> Zhaoping
>
|