Apologies for opening a track from old thread. But my issue looks similar. When i run the below code, i got the error as mentioned in subject. I applied workarnd suggested by AndrewF, but still couldn't succeed.
I'm running this code in SAS EG 5.1.
%global month tdcut infle inpth inpth2 cnt cnt2;
%let month = 201411 ;*** current monthly processing date;
%let tdcut = 31oct2014 ;*** the cut off date for daily csv trigger dates, matches the last
date in the current application fi;
%let clint = resfcu ;*** client;
%let fi = ResourcesFCU ;*** fi name;
*filename indat1 pipe 'ls -d /data_PPM/ResourcesFCU/Shopper/daily_files/*' ;
*filename indat2 pipe 'ls -d /data_PPM/ResourcesFCU/Shopper/daily_files2/*' ;
data null ;
NewDir1 = dcreate('indat1','ls -d /data_PPM/ResourcesFCU/Shopper/daily_files/*') ;
run ;
data null ;
NewDir2 = dcreate('indat2','ls -d /data_PPM/ResourcesFCU/Shopper/daily_files2/*') ;
run ;
data file_list1 ;
length fname $250 ;
infile indat1 truncover ; /* infile statement for file names */
input fname $250. ; /* read the file names from the directory */
call symput ('num_files1',_n_) ; /* store the record number in a macro variable */
If scan(fname,-1,'.') = 'txt' then delete ;
If scan(fname,-1,'/') = 'dupes' then delete ;
run ;
error messages from my log
47 data file_list1 ;
48 length fname $250 ;
49 infile indat1 truncover ; /* infile statement for file names */
50 input fname $250. ; /* read the file names from the directory */
51 call symput ('num_files1',_n_) ; /* store the record number in a macro variable */
52 If scan(fname,-1,'.') = 'txt' then delete ;
53 If scan(fname,-1,'/') = 'dupes' then delete ;
54 run ;
NOTE: Numeric values have been converted to character values at the places given by: (Line):(Column).
51:27
ERROR: No logical assign for filename INDAT1.
NOTE: The SAS System stopped processing this step because of errors.
WARNING: The data set WORK.FILE_LIST1 may be incomplete. When this step was stopped there were 0 observations and 1 variables.
NOTE: DATA statement used (Total process time):
real time 0.00 seconds
cpu time 0.01 seconds
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.
Find more tutorials on the SAS Users YouTube channel.