Date: Tue, 15 Apr 2003 14:23:32 -0700
Reply-To: Prasad S Ravi <prasad.s.ravi@HOUSEHOLD.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Prasad S Ravi <prasad.s.ravi@HOUSEHOLD.COM>
Subject: Re: using SAS dataset column in DB2 queries
Content-type: text/plain; charset=us-ascii
Try loading your temporary SAS dataset created reading in the flat file
into a temporary table in DB2
then merge it with your other DB2 tables in the PROC SQL step mentioned
below with corresponding ID variable.
Prasad Ravi
Siddharth Sharangpani
<siddharth@MASTEK.COM To: SAS-L@LISTSERV.UGA.EDU
> cc:
Sent by: "SAS(r) Subject: using SAS dataset column in DB2 queries
Discussion"
<SAS-L@LISTSERV.UGA.E
DU>
04/15/2003 12:57 PM
Please respond to
Siddharth Sharangpani
i am a newbie to SAS, have a problem which might have a simple
solution
im working on SAS/os390 ,mvs connecting to DB2 on OS/390
I am trying to read a flat file into a temporary sas dataset. when
that is done
the id(ig_cd_nr) field in the SAS dataset has to be used in a proc sql
which connects to
DB2 tables. My question is how do i use this id in a db2 proc sql
which is given to me.
DATA IGDATA_TB(KEEP=IG_CD_NR party_dt is_cancelled)
PROC SQL;
CONNECT TO DB2(SSID=DSND);
CREATE TABLE TEMP AS SELECT * FROM CONNECTION TO DB2 (
SELECT C.PARTY_NR ,CONTR_NR
FROM INMV400S.PARTY_TB A,
INMV400S.PK_TB B,
INMV400S.PL_TB C,
INMV400S.PR_TB D,
INMV400S.FT_TB E
WHERE A.LOCL_REFR_NR = (should be the id frm SAS dataset for all the
id's with the is_cancelled flag='N')
this approach is for one individual record, now i have to iterate this
query for 83000 records,
Is there a simpler solution to my problem
Help wanted urgently
cheers
Siddharth