Hello
I have a very large flat file that I am importing some of the data elements into SAS.
I run the first report based on specific institutions and the code looks like this:
data mylib.shelbyHosp;
infile 'c:\My Documents\data.txt' truncover LRECL = 3000;
input @1 Inst $5. @;
if Inst not in ('53987','54108','54197','54241','54249','54258','54320','54413') then delete;
input @6 Fyear $4.
@10 Period 2.
@12 Abstr $7.
@19 Prov $2.
@35 IssProv $2.
@59 Enc $3.
@62 Postal $6.
@68 Rescode $7.
@75 Sex $1.
@85 FP $1.
@89 RFP $2.;
run;
Then I run on specific residence codes but not any that have the institution numbers from the first extraction. This code doesn't work and gives me all cases with the rescode and ignores the institution notes. How can I combine the statements?
data mylib.shelbyHosp;
infile 'c:\My Documents\data.txt' truncover LRECL = 3000;
input @68 Rescode $7.
@1 Inst $5. @;
If Rescode not in ('3301','3302','3305','3306','3307','3317','3329','3331','3334','3337','3338','3341','3344','3345','3346','3347','3348','2001','2002','2003','2004','2005','2006','2007','2008','0731','0739','0832','2721','3319') and Inst in ('53987','54108','54197','54241','54249','54258','54320','54413') then delete;
input @6 Fyear $4.
@10 Period 2.
@12 Abstr $7.
@19 Prov $2.
@35 IssProv $2.
@59 Enc $3.
@62 Postal $6.
@68 Rescode $7.
@75 Sex $1.
@85 FP $1.
@89 RFP $2.;
run;
Is there any way to combine both data sets into one so that I don't have to combine in Access?
Thanks very much.
Shelby
I have a very large flat file that I am importing some of the data elements into SAS.
I run the first report based on specific institutions and the code looks like this:
data mylib.shelbyHosp;
infile 'c:\My Documents\data.txt' truncover LRECL = 3000;
input @1 Inst $5. @;
if Inst not in ('53987','54108','54197','54241','54249','54258','54320','54413') then delete;
input @6 Fyear $4.
@10 Period 2.
@12 Abstr $7.
@19 Prov $2.
@35 IssProv $2.
@59 Enc $3.
@62 Postal $6.
@68 Rescode $7.
@75 Sex $1.
@85 FP $1.
@89 RFP $2.;
run;
Then I run on specific residence codes but not any that have the institution numbers from the first extraction. This code doesn't work and gives me all cases with the rescode and ignores the institution notes. How can I combine the statements?
data mylib.shelbyHosp;
infile 'c:\My Documents\data.txt' truncover LRECL = 3000;
input @68 Rescode $7.
@1 Inst $5. @;
If Rescode not in ('3301','3302','3305','3306','3307','3317','3329','3331','3334','3337','3338','3341','3344','3345','3346','3347','3348','2001','2002','2003','2004','2005','2006','2007','2008','0731','0739','0832','2721','3319') and Inst in ('53987','54108','54197','54241','54249','54258','54320','54413') then delete;
input @6 Fyear $4.
@10 Period 2.
@12 Abstr $7.
@19 Prov $2.
@35 IssProv $2.
@59 Enc $3.
@62 Postal $6.
@68 Rescode $7.
@75 Sex $1.
@85 FP $1.
@89 RFP $2.;
run;
Is there any way to combine both data sets into one so that I don't have to combine in Access?
Thanks very much.
Shelby