Date: Tue, 11 Oct 2011 19:33:16 +0000
Reply-To: abu zafar muyeen <muyeen70@HOTMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: abu zafar muyeen <muyeen70@HOTMAIL.COM>
Subject: Macro to add multiple SAS datasets into one big dataset by
"append or set"
Content-Type: text/plain; charset="iso-8859-1"
Here is the description:
1. Multiple SAS datasets have been created using proc sql from different study: Like - AE_99_C_0158, AE_99_C_0159, BS_99_C_0158, BS_99_C_0159, PS_XX_C_XXXX etc.
2. These all datasets are in a library call AllSet.3. Now i want to add all of these data sets of same kind into one Big_AE (For all AE), BIG_BS (For all BS_XXXXX) by append or set.
I want to create a Macro because i will use this after addition of every new study. I did some work on this and here it is below:
proc sql; connect to oracle(path='OCPROD.WORLD' user='ops$muyeena' pw='ocabu#135'); select distinct (substr(memname,1, length(memname)-10)) into :dmemnm FROM DICTIONARY.TABLES WHERE LIBNAME='ALLSET' and memtype='DATA'; select memname, compress(libname||'.'||memname), substr(memname,1, length(memname)-10) as mnm into :dsname, :datasets, :menm FROM DICTIONARY.TABLES WHERE LIBNAME='ALLSET' and memtype='DATA'; QUIT;
Please help me with this. By the way i am new in this group and first time sending request.ThanksAbu