I wrote this macro in sas to have some information about some files :
%macro info_1(cmd);
filename dirList pipe &cmd.;
data work.dirList;
infile dirList length=reclen;
input file $varying200. reclen;
permission=scan(file,1,"");
if input(scan(file,2,""), 8.)=1;
user=scan(file,3,"");
group=scan(file,4,"");
file_size_KB=round(input(scan(file,5,""), 8.)/1024,1);
file_size_MB=round(input(scan(file,5,""), 8.)/1024/1024,1);
modified_time=input(catx(" ",scan(file,6," "),scan(file,7,"")),anydtdtm.);
date_mod = datepart(modified_time);
time_zone=scan(file,8,"");
file_name=scan(file,-1,"");
format modified_time datetime19.;
format file_size_MB comma9.;
format date_mod date9.;
run;
%mend info_1;
then i declare this macro variable:
%let cmd = ls --full-time;
%let sep1= %quote( );
%let path = /data/projects/flat_file/meteo ;
%let file = *.json ;
%let sep2 = %quote(/) ;
%let fullpath = &cmd.&sep1.&path.&sep2.&file;
Then i try to execute the macro :
%info_1(&fullpath.);
And i see a strange thing. I post a image because it is impossible to describe it. I guess that there are special chars.
How to fix that thing?