DATA Step, Macro, Functions and more

Submitting the macro to base sas via Mobax(linux)

Reply
Occasional Contributor
Posts: 12

Submitting the macro to base sas via Mobax(linux)

I am submiting the following code to Base SAS via linus MobaX11

%LET INPUTDIR    = /sas_user/xxx/test_base/mod/input;

%LET PROGDIR     = /sas_user/xxx/test_base/mod/programs;

%LET PBPDIR      = /sas_user/xxx/test_base/pbp2016;

%LET FORMDIR     = /sas_user/xxx/test_base/FORMULARY.TXT;

%LET PLANFILEDIR = /sas_user/xxx/test_base/mod/TextFiles;

%LET OUTPUT      = /sas_user/xxx/test_base/output;

FILENAME IN0     "&INPUTDIR.";

%OOPCV1M(RUNYEAR           =2016,

         INP               =IN0.PERSON,

         INC               =IN0.UTILIZATION,

         CATEG             =IN0.CATEGORY,

         PBP               =&PBPDIR,

         FORMULARY         =&FORMDIR,

         PLANFILE          =&PLANFILEDIR\PLANFILE.txt,

         OOPC              =&OUTPUT.OOPC_RUN&file_date.); 

run;

I am getting the following error, all .sas files are available at Input folder.

WARNING: Physical file does not exist, /sas_user/xxx/test_base/mod/input/PBP_IMPORT.sas.

ERROR: Cannot %INCLUDE member PBP_IMPORT in the aggregate IN0.

419           OOPC              =&OUTPUT.OOPC_RUN&file_date.);

WARNING: Physical file does not exist, /sas_user/xxx/test_base/mod/input/PBP_IMPORT_PARTD.sas.

ERROR: Cannot %INCLUDE member PBP_IMPORT_PARTD in the aggregate IN0.

WARNING: Physical file does not exist, /sas_user/xxx/test_base/mod/input/PBP_VARIABLES.sas.

ERROR: Cannot %INCLUDE member PBP_VARIABLES in the aggregate IN0.

WARNING: Apparent symbolic reference MAPD not resolved.

ERROR: A character operand was found in the %EVAL function or %IF condition where a numeric operand is required. The condition was: &MAPD > 0

       OR &MAON > 0 OR &MSA > 0 OR &FFS > 0 OR &MGAP > 0

WARNING: Apparent symbolic reference MAON not resolved.

WARNING: Apparent symbolic reference MSA not resolved.

WARNING: Apparent symbolic reference FFS not resolved.

WARNING: Apparent symbolic reference MGAP not resolved.

ERROR: The macro OOPCV1M will stop executing.

420  run;

Super User
Posts: 11,343

Re: Submitting the macro to base sas via Mobax(linux)

Are you running in a server environment? If so the file /sas_user/xxx/test_base/mod/input/PBP_IMPORT.sas would have to be where the path is seen from the server.

Other: is the directory sas_user mentioned subordinate to the active directory as the program executes (relative path)

Respected Advisor
Posts: 4,173

Re: Submitting the macro to base sas via Mobax(linux)

Whenever I encounter such an error it's always caused exactly by what the error message states: The file does not exist on the server where you're running your code. As Linux/Unix is case sensitive: Are you sure that all your file names are in upper case?

What do you get if you run code like below?

filename dirlist pipe 'ls -la /sas_user/xxx/test_base';

data _null_;

     infile dirlist;

     input;

     put _infile_;

run;


Ask a Question
Discussion stats
  • 2 replies
  • 203 views
  • 0 likes
  • 3 in conversation