DATA Step, Macro, Functions and more

SAS CPORT Error

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 12
Accepted Solution

SAS CPORT Error

Hi all,

I am submitting the following code to Base SAS via MobaX on linux os.
%LET DATALOC = %str(sas_user/xxx/test_base);

OPTIONS MPRINT;

%MACRO IMPTFILE(DL,FN,DSNAME);

LIBNAME OUTPUT "&DL.";

FILENAME INF  "&FN.";

PROC CIMPORT LIBRARY = OUTPUT FILE = INF;
SELECT &DSNAME;
RUN;
%MEND;
RUN;


%IMPTFILE(&DATALOC.,&DATALOC./PERSON.XPT,PERSON);
RUN;

I am getting the following error, please help me
220  %IMPTFILE(&DATALOC.,&DATALOC./PERSON.XPT,PERSON);
MPRINT(IMPTFILE):   LIBNAME OUTPUT "sas_user/xxx/test_base";
NOTE: Library OUTPUT does not exist.
MPRINT(IMPTFILE):   FILENAME INF "sas_user/xxx/test_base/PERSON.XPT";

MPRINT(IMPTFILE):   PROC CIMPORT LIBRARY = OUTPUT FILE = INF;
MPRINT(IMPTFILE):   SELECT PERSON;
MPRINT(IMPTFILE):   RUN;

ERROR: Physical file does not exist, /sas_user/xxx/sas_user/xxx/test_base/PERSON.XPT.
NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE CIMPORT used (Total process time):
      real time           0.03 seconds
      cpu time            0.01 seconds

221  RUN;



Accepted Solutions
Solution
‎07-30-2015 03:49 PM
Super User
Posts: 3,112

Re: SAS CPORT Error

Your folder definition doesn't look right to me. I would expect it to begin with "/" like /sas_user/xxx/test_base. Check your folder path on Linux to ensure it is correct.

View solution in original post


All Replies
Solution
‎07-30-2015 03:49 PM
Super User
Posts: 3,112

Re: SAS CPORT Error

Your folder definition doesn't look right to me. I would expect it to begin with "/" like /sas_user/xxx/test_base. Check your folder path on Linux to ensure it is correct.

Occasional Contributor
Posts: 12

Re: SAS CPORT Error

Thanks Kiwi, Its worked..appriciate for your quick reply.

☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

Discussion stats
  • 2 replies
  • 181 views
  • 0 likes
  • 2 in conversation