My problem: The path is not displayed in the same line as NOTE: (MYMACRO) XXOUTPATH=
%let xxoutpath=C:/Users/xxdemo/Documents/Dropbox/xxdemo/xxdemo_prod_programming/sas/val/mymacro/reporting;
%put %str(NOT)E: (MYMACRO) XXOUTPATH= &xxoutpath.;
It means that when I search for (MYMACRO) the path is not selected.
data _null_;
infile "&xxproject./log/tc001.log";
file "&xxproject./log/review_tc001.log";
input;
if index(_infile_,'(MYMACRO)') ne 0 then put _infile_;
run
My current solution: create a shorter version of the path, keeping the last 60 characters or less.
data _null_;
tmp=substr("&xxoutpath.",length("&xxoutpath.")-60); *keep the last 60 characters;
call symputx('xxoutpath_short','...' || substr(tmp,findc(tmp,'/')),'L');
put _all_;
run;
%put &xxoutpath_short.;
I'm sure there is a smarter way to get a shorter version. So feel free to comment.
If you have a solution get everything kept in the selection, let me know too.
Cheers
Hi @xxformat_com,
@xxformat_com wrote:
My problem: The path is not displayed in the same line as NOTE: (MYMACRO) XXOUTPATH=
My SAS log displays it in the same line. I am using options ls=156, whereas your linesize is probably <117. If you don't want to increase it, you can write two lines after '(MYMACRO)' was found in _INFILE_:
do; put _infile_; input; put _infile_; end;
Hi @xxformat_com,
@xxformat_com wrote:
My problem: The path is not displayed in the same line as NOTE: (MYMACRO) XXOUTPATH=
My SAS log displays it in the same line. I am using options ls=156, whereas your linesize is probably <117. If you don't want to increase it, you can write two lines after '(MYMACRO)' was found in _INFILE_:
do; put _infile_; input; put _infile_; end;
Well spotted. Thanks. ls=98 by default in my SAS version.
I keep forgetting that ls and ps have no common default across SAS versions.
Available on demand!
Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.