SAS Enterprise Guide

Desktop productivity for business analysts and programmers
BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
alepage
Barite | Level 11

Hello,

 

It works fine in SAS EG but when I execute the  SAS program on Unix server, it failed.

 

%macro validatinginputds(monthlist, yearlist)/minoperator;

%let cielist=be gc gp ha je nx tr we wc wu;
%let subfolderlist=auto habi entr;
%let loblist=auto prop cna;
%let path=/dwh_actuariat/sasdata/sas&yearlist.;

/****************** beginning of the  looping ************/
proc sql; 
CREATE TABLE inputds (
    
    cie varchar(2),
    lob varchar(11),
    subfolder varchar(4),
    cpath varchar(100),
	filename varchar(50),
    NbTx int, 
    tot_wrtn_prem_amt int
    
);
quit;
%do h=1 %to %sysfunc(countw(&cielist.));
%if %tslit(%scan(&cielist.,&h)) eq 'je' %then %let value=2;
%else %if %tslit(%scan(&cielist.,&h)) eq 'gc' %then %let value=0;
%else %let value=1;
/*%put &=value;*/
	%do i=1 %to %sysfunc(countw(&loblist.))-&value.;
		%do k=1 %to %sysfunc(countw(&yearlist.));
			%do j=1 %to %sysfunc(countw(&monthlist.));
				%let fname=%scan(&cielist.,&h)_%scan(&loblist.,&i)_prm%scan(&monthlist.,&j)%scan(&yearlist.,&k);
				%let libnm=/dwh_actuariat/sasdata/sas%scan(&yearlist.,&k)/%scan(&cielist.,&h)/%scan(&subfolderlist.,&i);
				%let cie=%scan(&cielist.,&h);
				%let lob=%scan(&loblist.,&i);
				%let subfolder=%scan(&subfolderlist.,&i);
				
			
				/* Reading the total number of transactions and the sum of wrtn_prem_amt */

				libname src1 spde "&path./&cie./&subfolder.";


				proc sql noprint;
				insert into inputds
				select  "&cie." as cie,
						"&lob" as lob ,
						"&subfolder" as subfolder,
                        "&path./&cie./&subfolder." as cpath,
						"&Fname" as filename ,
						count(*) as NbTx , 
						coalesce(sum(WRTN_PREM_AMT),0) format=best12. as tot_wrtn_prem_amt
				from src1.&fname.;
				quit;
				
				
				/*************************************************************************/				

			%end;
		%end;
	%end;
%end;
run;
%mend validatinginputds;

WARNING: Apparent invocation of macro TSLIT not resolved.
ERROR: Required operator not found in expression: %tslit(%scan(&cielist.,&h)) eq 'je'
ERROR: The macro VALIDATINGINPUTDS will stop executing.

 

1 ACCEPTED SOLUTION

Accepted Solutions
Tom
Super User Tom
Super User

What is your setting for the SASAUTOS system option?

 

You can run this code to check.

%put %sysfunc(getoption(sasautos));

This is what I see when I run on Unix machines.

  1? %put %sysfunc(getoption(sasautos));

(          '!SASROOT/sasautos'         )

The tslit.sas file should be in that directory.  Try compiling it manually.

%include '!SASROOT/sasautos/tslit.sas' / source2;

 

It originally was developed as part of the SAS/Intrnet product, but I think it should be included as part of BASE SAS at this point.  For example on Windows where the autocall macros are stored in multiple different folders it is in the ...\core\sasmacro directory.

View solution in original post

1 REPLY 1
Tom
Super User Tom
Super User

What is your setting for the SASAUTOS system option?

 

You can run this code to check.

%put %sysfunc(getoption(sasautos));

This is what I see when I run on Unix machines.

  1? %put %sysfunc(getoption(sasautos));

(          '!SASROOT/sasautos'         )

The tslit.sas file should be in that directory.  Try compiling it manually.

%include '!SASROOT/sasautos/tslit.sas' / source2;

 

It originally was developed as part of the SAS/Intrnet product, but I think it should be included as part of BASE SAS at this point.  For example on Windows where the autocall macros are stored in multiple different folders it is in the ...\core\sasmacro directory.

sas-innovate-white.png

Our biggest data and AI event of the year.

Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.

Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.

 

Register now!

Creating Custom Steps in SAS Studio

Check out this tutorial series to learn how to build your own steps in SAS Studio.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 227 views
  • 1 like
  • 2 in conversation