Hi,
Please help me with this:
FILENAME prep FTP LIST CD="/env/prod"
HOST = "xxx.xx.xx"
USER = "abcdef" PASS="{sas001}234567ljX3J1bg==";
DATA in_list_file;
INFILE prep MISSOVER;
FORMAT permission $10.;
FORMAT code 3.;
FORMAT owner $10.;
FORMAT group $10.;
FORMAT size 15.;
FORMAT month $3.;
FORMAT day 2.;
FORMAT hour_year $5.;
FORMAT file $60.;
INFORMAT permission $10.;
INFORMAT code 3.;
INFORMAT owner $10.;
INFORMAT group $10.;
INFORMAT size 15.;
INFORMAT month $3.;
INFORMAT day 2.;
INFORMAT hour_year $5.;
INFORMAT file $60.;
INPUT permission $
code
owner $
group $
size
month $
day
hour_year $
file $
;
RUN;
But now we want to remove the ftp path and make to run with out FTP
so I changed as FILENAME prep LIST "/env/prod" ;
But I got message as ERROR: Invalid file, "/env/prod".
I have 3 .txt files (ABC, ABD, ABF) which has to taken into account.
Please let me know how can I get list of all files in the location(/env/prod) so that I can use the below
macro later to find out if input files are empty or not.
%MACRO CheckEmptyFile;
PROC SQL NOPRINT;
SELECT count(*) INTO :nn_obs FROM in_list_file WHERE file LIKE '%AB%' AND size = 0;
QUIT;
%PUT *** &nn_obs ***;
%IF &nn_obs > 0 %THEN %MailScript(Some SO input files are empty !!!);
%MEND CheckEmptyFile;
Please let me know how can I get list of all files in filename so that I can use the above
macro .
Thanks for the help.