Proc Import Error

Reply
anonymous_user
Posts: 0

Proc Import Error

Hi, Can anyone point out what is going wrong with the proc import code please? Error mesaage below the code -

proc import datafile = "P:\Mortgage Finance\%nrstr(A&TP)\Mortgage NPV Model\CRDM\CRDM flow modelV.1.xlsx"

            out =Hedging_dataset

            dbms = excel

            replace;

                  sheet = " ";

run;

/*Macro to Import the CRDM Excel 4 tabs into SAS*/

%macro Import(path = ,outputdataset = , sheetname = );

proc import datafile = "&path" out = &outputdataset. dbms = excel replace;

sheet = "&sheetname";

run;

%mend;

%import(path= P:\Mortgage Finance\%nrstr(A&TP)\Mortgage NPV Model\CRDM\CRDM flow modelV.1.xlsx, outputdataset = Allocations ,sheetname =BO data – Allocations)

%import(path= P:\Mortgage Finance\%nrstr(A&TP)\Mortgage NPV Model\CRDM\CRDM flow modelV.1.xlsx, outputdataset = Completions ,sheetname =BO data – Completions)

%import(path= P:\Mortgage Finance\%nrstr(A&TP)\Mortgage NPV Model\CRDM\CRDM flow modelV.1.xlsx, outputdataset = Hedging_1 ,sheetname =Hedging Assumptions 1)

%import(path= P:\Mortgage Finance\%nrstr(A&TP)\Mortgage NPV Model\CRDM\CRDM flow modelV.1.xlsx, outputdataset = Hedging_2 ,sheetname =Hedging Assumptions 2)

 

58 proc import datafile = "P:\Mortgage Finance\%nrstr(A&TP)\Mortgage NPV Model\CRDM\CRDM flow

58 ! modelV.1.xlsx"

59 out =Hedging_dataset

60 dbms = excel

61 replace;

62 sheet = " ";

63 run;

WARNING: Apparent symbolic reference TP not resolved.

ERROR: Connect: External table is not in the expected format.

ERROR: Error in the LIBNAME statement.

Connection Failed. See log for details.

NOTE: The SAS System stopped processing this step because of errors.

NOTE: PROCEDURE IMPORT used (Total process time):

real time 0.57 seconds

cpu time 0.14 seconds

64

65 /*Macro to Import the CRDM Excel 4 tabs into SAS*/

66

67 %macro Import(path = ,outputdataset = , sheetname = );

68 proc import datafile = "&path" out = &outputdataset. dbms = excel replace;

69 sheet = "&sheetname";

70 run;

71 %mend;

72 %import(path= P:\Mortgage Finance\%nrstr(A&TP)\Mortgage NPV Model\CRDM\CRDM flow modelV.1.xlsx,

72 ! outputdataset = Allocations ,sheetname =BO data – Allocations)

 

 

WARNING: Apparent symbolic reference TP not resolved.

ERROR: Connect: External table is not in the expected format.

ERROR: Error in the LIBNAME statement.

Connection Failed. See log for details.

NOTE: The SAS System stopped processing this step because of errors.

NOTE: PROCEDURE IMPORT used (Total process time):

real time 0.57 seconds

cpu time 0.20 seconds

73 %import(path= P:\Mortgage Finance\%nrstr(A&TP)\Mortgage NPV Model\CRDM\CRDM flow modelV.1.xlsx,

73 ! outputdataset = Completions ,sheetname =BO data – Completions)

 

 

WARNING: Apparent symbolic reference TP not resolved.

ERROR: Connect: External table is not in the expected format.

ERROR: Error in the LIBNAME statement.

Connection Failed. See log for details.

NOTE: The SAS System stopped processing this step because of errors.

NOTE: PROCEDURE IMPORT used (Total process time):

real time 0.56 seconds

cpu time 0.15 seconds

74 %import(path= P:\Mortgage Finance\%nrstr(A&TP)\Mortgage NPV Model\CRDM\CRDM flow modelV.1.xlsx,

74 ! outputdataset = Hedging_1 ,sheetname =Hedging Assumptions 1)

 

 

WARNING: Apparent symbolic reference TP not resolved.

ERROR: Connect: External table is not in the expected format.

ERROR: Error in the LIBNAME statement.

Connection Failed. See log for details.

NOTE: The SAS System stopped processing this step because of errors.

NOTE: PROCEDURE IMPORT used (Total process time):

real time 0.60 seconds

cpu time 0.15 seconds

75 %import(path= P:\Mortgage Finance\%nrstr(A&TP)\Mortgage NPV Model\CRDM\CRDM flow modelV.1.xlsx,

75 ! outputdataset = Hedging_2 ,sheetname =Hedging Assumptions 2)

 

 

WARNING: Apparent symbolic reference TP not resolved.

ERROR: Connect: External table is not in the expected format.

ERROR: Error in the LIBNAME statement.

Connection Failed. See log for details.

NOTE: The SAS System stopped processing this step because of errors.

NOTE: PROCEDURE IMPORT used (Total process time):

real time 0.62 seconds

cpu time 0.20 seconds

Super User
Posts: 11,144

Re: Proc Import Error

Did you try:

%import(path= %nrstr(P:\Mortgage Finance\A&TP\Mortgage NPV Model\CRDM\CRDM flow modelV.1.xlsx),

Ask a Question
Discussion stats
  • 1 reply
  • 224 views
  • 0 likes
  • 2 in conversation