BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
alepage
Barite | Level 11

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 ?

1 ACCEPTED SOLUTION

Accepted Solutions
FreelanceReinh
Jade | Level 19

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

View solution in original post

1 REPLY 1
FreelanceReinh
Jade | Level 19

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

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

SAS Enterprise Guide vs. SAS Studio

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 1 reply
  • 377 views
  • 1 like
  • 2 in conversation