Hello,
Even if my SAS code is well idented and spaced as below
%put starting check_env !
%check_env;
%put ===========> &=envp;
%put ===========> &=envN;
%put fileref and directories associated to sasautos: %sysfunc(getoption(sasautos)) ;
OPTIONS SASAUTOS=("//eis&envN./EISFEED/sasmacro","//saspgm&envP./prod/sasmacro","//saspgm/prod/sasmacro");
%put fileref and directories associated to sasautos: %sysfunc(getoption(sasautos)) ;
%macro check_intg_prd;
%if &envN.=p %then %let suffix=prd1;
%else %let suffix=intg&envP.;
%mend;
%check_intg_prd;
%put &=envN &=suffix;
/*Creation of the directory to save the daily sources in order to restore the original data in the event of a problem.*/
%checkDir_libname(lname=,dir=/dwh_actuariat/sasprocess/saspgm&envP./prod/dwh&suffix./daily_bkp);
%checkDir_libname(lname=,dir=/dwh_actuariat/sasprocess/saspgm&envP./prod/dwh&suffix./log);
%put ==================> The location of the original daily datasets is : "/dwh_actuariat/sasprocess/saspgm&envP./prod/dwh&suffix./daily_bkp";
%put ==================> The location of the logfile is : "/dwh_actuariat/sasprocess/saspgm&envP./prod/dwh&suffix./daily_bkp";
%DATEPROD(Q); run;
%CIE1LET(&cie); run;
/*******************Current date and deadline for keeping datasets **************************************/
%let nDateProd = %sysfunc(InputN ( &dateprod, yymmdd8 ));
%let datejourd=%sysfunc(Intnx( Day, &ndateprod, -120), yymmddn8.);
%put =================================================================================;
%put ================> The current Day = &dateprod.===============;
%put ================> The deadline for keeping the datasets = &datejourd.===============;
%put =================================================================================;
/***************** Getting the part of the Halcion source file name based on the line of business, i.e. auto or habi *****************/
%if %upcase(&LINE) = AUTO %then
%do;
%let FINDSN2 = paac.q92;
%let LG2=3000;
%let LINE3 = auto;
%end;
%else %do;
%let FINDSN2 = pbad.q96;
%let LG2 = 3000;
%let LINE3 = prop;
%end;
%put ============> &=findsn2 &=lg2 &=line3;
%put ==================> Writing the SAS program &cie..dailyconv.&line..&type..sas <================= ;
%put ==================> The location of "&cie..dailyconv.&line..&type..sas" is: %sysfunc(quote(%sysfunc(pathname(sas))));
The log file is not as easy to read as I which to.
Is there a way to few lines feed into the log files to make it more readeable
=================================================================================
================> The current Day = 20221116===============
================> The deadline for keeping the datasets = 20220719===============
=================================================================================
============> FINDSN2=pbad.q96 LG2=3000 LINE3=prop
==================> Writing the SAS program xx.yyyyyyy.habi.prm.sas <=================
The date infor is one bloc of information, the second bloc of information is pbad.96 and the last bloc of information is writing the SAS program. But as it is, the information is compacted into the log file. Is there a way to do it better, more agreable to read ?
Hello @alepage,
An "empty" %PUT statement creates a line feed:
%put;
Indentation can be achieved with non-breaking spaces ('A0'x, typed as Alt+0160, then copied and pasted).
options nosource; %put Line 1; %put; %put Line 2;
Log:
Line 1 Line 2
Hello @alepage,
An "empty" %PUT statement creates a line feed:
%put;
Indentation can be achieved with non-breaking spaces ('A0'x, typed as Alt+0160, then copied and pasted).
options nosource; %put Line 1; %put; %put Line 2;
Log:
Line 1 Line 2
Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!
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.
Ready to level-up your skills? Choose your own adventure.