Hi, Thank you for the quick response. This is what I got from the log: 256 257 %macro imp_xml (fname=,mapname=); 258 259 filename datafile 'h:\Practice\PARI\&fname.'; 260 filename mapfile 'h:\Practice\PARI\XML\&mapname.'; 261 libname datafile xmlv2 xmlmap=mapfile automap=replace; 262 263 proc copy in=datafile out=work; 264 run; 265 266 filename datafile clear; 267 filename mapfile clear; 268 libname datafile clear; 269 270 %mend imp_xml; 271 272 /* Clean work so that we can append all datasets created */ 273 proc datasets libname=work memtype=data kill nolist; ------- 1 WARNING 1-322: Assuming the symbol LIB was misspelled as libname. NOTE: Deleting WORK.BASE_DATA (memtype=DATA). NOTE: Deleting WORK.DRUG_NAME (memtype=DATA). NOTE: Deleting WORK.DRUG_NAMES (memtype=DATA). NOTE: Deleting WORK.FILESINFOLDER (memtype=DATA). NOTE: Deleting WORK.INHALATIONDATA (memtype=DATA). NOTE: Deleting WORK.INHALATION_DATA (memtype=DATA). NOTE: Deleting WORK.MT_STUDYINHALATIONDATA01 (memtype=DATA). 274 run; 275 276 filename inlist pipe 'dir "h:/PracticePARI/*.xml" /b'; 277 NOTE: PROCEDURE DATASETS used (Total process time): real time 0.06 seconds cpu time 0.04 seconds 278 data _null_; 279 length buff mfile $200; 280 infile inlist; 281 input buff $; 282 mfile=tranwrd(lowcase(buff),".xml",".map"); 283 call execute(cats('%macro imp_xml (fname=',buff,', 284 mapname=',mfile,');')); 285 run; NOTE: The infile INLIST is: Unnamed Pipe Access Device, PROCESS=dir "h:/PracticePARI/*.xml" /b,RECFM=V, LRECL=32767 Stderr output: File Not Found NOTE: 0 records were read from the infile INLIST. NOTE: DATA statement used (Total process time): real time 0.07 seconds cpu time 0.01 seconds 286 287 filename inlist clear; NOTE: Fileref INLIST has been deassigned. 288 289 /* Combine all the datasets in work */ 290 data _null_; 291 set sashelp.vtable (where=(libname="WORK")); 292 if _n_=1 then call execute('data want; set ',strip(memname),';run;'); ------- 253 293 else call execute('proc append base=want append=',strip(memname),' force;run;'); ------- 253 ERROR 253-185: The EXECUTE subroutine call has too many arguments. 294 run; NOTE: The SAS System stopped processing this step because of errors. NOTE: DATA statement used (Total process time): real time 0.10 seconds cpu time 0.00 seconds 295 296 /* Remove all files except the final one */ 297 proc datasets lib=work memtype=data kill nolist; 298 save want; 299 run; ERROR: The file WORK.WANT (memtype=DATA) was not found, but appears on a SAVE statement. NOTE: Statements not processed because of errors noted above.
... View more