Hi, We are executing the below code to creating some temporary libraries dinamically(L1,L2....) we are able to see the libraries but we are didnt find any data under that libraries. can you please provide some code to extract the datasets/views it to that libraries. %let banames=""; proc sql noprint; SELECT cats("'", TARGET_BA_SCHEMA_NAME, "'")as BA_SCHEMA_NAME, BA_OBJ_ID format=15., BA_OBJ_VER, BA_COMPANY_ID, SAS_LIB_NAME,DATA_SENSITIVITY,cats("'",SNAPSHOT_LABEL,"'") as snapshot_label into :banames separated by '#', :baobjid separated by '#', :baobjver separated by '#', :bacompid separated by '#', :libnm separated by '#', :dsblind separated by '#',:snplbl separated by '#' FROM ba_dtl WHERE process_log_id in (SELECT MAX(process_log_id) FROM ba_dtl GROUP BY target_location, archival_folder) and sas_lib_name is not null; quit; %let rwcnt = %sysfunc(countw(&banames, "#")); %if &rwcnt >=1 %then %do; %let flg=0; %do i=1 %to &rwcnt.; %let compid = %scan(&bacompid, &i., "#"); %let objid = %scan(&baobjid, &i., "#"); %let objvr = %scan(&baobjver, &i., "#"); %let baname = %scan(&banames, &i., "#"); %let snaplbl = %scan(&snplbl, &i., "#"); %let lbnme = %scan(&libnm, &i., "#"); %put &baname &snaplbl &dsbln; LIBNAME &lbnme oracle USER=&usr PASS="&pwd" PATH=&dbname dbconinit="BEGIN Pkg_Business_Area.SP_Initialize_BA(&BAName,&snaplbl,&dsbln); END;"; /* %end;*/ %end; %end; %mend ba_init; %ba_init;
... View more