I tried to rename the dataset using proc datasets. SAS didn't recognize 3 datasets amount 8. It seems SAS cannot read long dataset's names. Is there way to way around this problem? Thank you so much for your help. 292 %macro readdata(memname,name); 293 filename datafile "e:\Users\mhollifi\Desktop\Jotikasthira\USA_FO_Active_2016-04\&memname" ; 294 filename mapfile 294! "e:\Users\mhollifi\Desktop\Jotikasthira\USA_FO_Active_2016-04\5-2016-04-30.map" ; 295 296 libname datafile xmlv2 xmlmap=mapfile automap=replace; 297 proc datasets lib = datafile; 298 change Country = country&name 299 Currency = currency&name 300 Holding = holding&name 301 Holdingaggregate = Holdingaggregate&name 302 Holdingdetail = Holdingdetail&name 303 Portfolio = Portfolio&name 304 Portfoliosummary = Portfoliosummary&name; 305 306 proc copy in=datafile out=work; 307 run; 308 %mend; 309 310 data _null_; 311 set contents(obs = 1); 312 period = findc(memname,'-'); put period =; 313 name = substr(memname,1,period-1); put name =; 314 315 call execute('%nrstr(%readdata(' || memname || ', ' || name || '))' ) ; 316 run; period=8 name=1000165 NOTE: There were 1 observations read from the data set WORK.CONTENTS. NOTE: DATA statement used (Total process time): real time 0.03 seconds cpu time 0.00 seconds NOTE: CALL EXECUTE generated line. 1 + %readdata(1000165-2016-04-30.xml , 1000165 2 + ) MPRINT(READDATA): filename datafile "e:\Users\mhollifi\Desktop\Jotikasthira\USA_FO_Active_2016-04\1000165-2016-04-30.xml" ; MPRINT(READDATA): filename mapfile "e:\Users\mhollifi\Desktop\Jotikasthira\USA_FO_Active_2016-04\5-2016-04-30.map" ; MPRINT(READDATA): libname datafile xmlv2 xmlmap=mapfile automap=replace; NOTE: Processing XMLMap version 2.1. NOTE: Libref DATAFILE was successfully assigned as follows: Engine: XMLV2 Physical Name: e:\Users\mhollifi\Desktop\Jotikasthira\USA_FO_Active_2016-04\1000165-2016-04-30.xml MPRINT(READDATA): proc datasets lib = datafile; MPRINT(READDATA): change Country = country1000165 Currency = currency1000165 Holding = holding1000165 Holdingaggregate = Holdingaggregate1000165 Holdingdetail = Holdingdetail1000165 Portfolio = Portfolio1000165 Portfoliosummary = Portfoliosummary1000165; ERROR: The file DATAFILE.Holdingaggregate (memtype=ALL) was not found, but appears on a CHANGE statement. ERROR: The file DATAFILE.Holdingdetail (memtype=ALL) was not found, but appears on a CHANGE statement. ERROR: The file DATAFILE.Portfoliosummary (memtype=ALL) was not found, but appears on a CHANGE statement. NOTE: Statements not processed because of errors noted above. NOTE: The SAS System stopped processing this step because of errors. NOTE: PROCEDURE DATASETS used (Total process time): real time 0.05 seconds cpu time 0.01 seconds MPRINT(READDATA): proc copy in=datafile out=work; MPRINT(READDATA): run; NOTE: Copying DATAFILE.Country to WORK.COUNTRY (memtype=DATA). NOTE: BUFSIZE is not cloned when copying across different engines. System Option for BUFSIZE was used. NOTE: There were 81 observations read from the data set DATAFILE.Country. NOTE: The data set WORK.COUNTRY has 81 observations and 4 variables. NOTE: Copying DATAFILE.Currency to WORK.CURRENCY (memtype=DATA). NOTE: BUFSIZE is not cloned when copying across different engines. System Option for BUFSIZE was used. NOTE: There were 81 observations read from the data set DATAFILE.Currency. NOTE: The data set WORK.CURRENCY has 81 observations and 4 variables. NOTE: Copying DATAFILE.Holding to WORK.HOLDING (memtype=DATA). NOTE: BUFSIZE is not cloned when copying across different engines. System Option for BUFSIZE was used. NOTE: There were 1 observations read from the data set DATAFILE.Holding. NOTE: The data set WORK.HOLDING has 1 observations and 2 variables. NOTE: Copying DATAFILE.HoldingAggregate to WORK.HOLDINGAGGREGATE (memtype=DATA). NOTE: BUFSIZE is not cloned when copying across different engines. System Option for BUFSIZE was used. NOTE: There were 1 observations read from the data set DATAFILE.HoldingAggregate. NOTE: The data set WORK.HOLDINGAGGREGATE has 1 observations and 7 variables. NOTE: Copying DATAFILE.HoldingDetail to WORK.HOLDINGDETAIL (memtype=DATA). NOTE: BUFSIZE is not cloned when copying across different engines. System Option for BUFSIZE was used. NOTE: There were 117 observations read from the data set DATAFILE.HoldingDetail. NOTE: The data set WORK.HOLDINGDETAIL has 117 observations and 27 variables. NOTE: Copying DATAFILE.Portfolio to WORK.PORTFOLIO (memtype=DATA). NOTE: BUFSIZE is not cloned when copying across different engines. System Option for BUFSIZE was used. NOTE: There were 1 observations read from the data set DATAFILE.Portfolio. NOTE: The data set WORK.PORTFOLIO has 1 observations and 3 variables. NOTE: Copying DATAFILE.PortfolioSummary to WORK.PORTFOLIOSUMMARY (memtype=DATA). NOTE: BUFSIZE is not cloned when copying across different engines. System Option for BUFSIZE was used. NOTE: There were 1 observations read from the data set DATAFILE.PortfolioSummary. NOTE: The data set WORK.PORTFOLIOSUMMARY has 1 observations and 4 variables. NOTE: PROCEDURE COPY used (Total process time): real time 0.06 seconds cpu time 0.04 seconds
... View more