BookmarkSubscribeRSS Feed
xxformat_com
Barite | Level 11

I cannot remove "The SAS System" title from the log in SAS Studio (background submit) like this person 8 years ago.

 

https://stackoverflow.com/questions/22610877/remove-the-sas-system-from-sas-the-log

 

Are you aware of any solution.

 

Capture.JPG

10 REPLIES 10
PaigeMiller
Diamond | Level 26

Hello @xxformat_com 

 

We don't know what you did. We don't know what the output looks like. Please show us the log for the portion of your code (and let's say 20 lines before this) where you try this. Please click on the </> icon to include your log. Please show us a screen capture of the output, by clicking on the "Insert Photos" icon to include your screen capture in your reply. (Please don't make us ask for this in the future, it should be provided every single time you have a problem with SAS code)

 

If I do this:

title;
proc print data=sashelp.class;
run;

 

 

I do not get a title.

 

PaigeMiller_0-1661767581795.png

 

--
Paige Miller
xxformat_com
Barite | Level 11
The output you show is not a log file.
PaigeMiller
Diamond | Level 26

My mistake. I have misread the problem. I apologize.

 

We still need to see what you tried (the log plus maybe 20 previous lines), and a screen capture of the part of the log where you are seeing "The SAS System". I don't see it here in my SAS (which is not SAS Studio).

--
Paige Miller
xxformat_com
Barite | Level 11
According to the discussions 8 years ago, the problem is not on SAS Enterprise Guide.
I also don't see the problem when running the job in interactive mode, only in batch mode with the "Background Submit" functionality.
I'm gonna add a snapshoot in the original question.
PaigeMiller
Diamond | Level 26

Yes, I see it when I run programs in batch mode only. I believe the only option is what @japelin said.

 

I don't see why this text in the LOG is a problem that needs to be fixed. What is your concern?

--
Paige Miller
xxformat_com
Barite | Level 11

It's not a major concern. As it is not consistent and not working as expected, I would have expect it to be updated in recent SAS release. It means extra attention when scanning the content of the log per program for review. Ideally, when developing a program, you would expect as few possible differences between environment or program submission methods in order to get the same result across environments. It belongs to Good Programming Practices. Right now it means add a special case in the program.

japelin
Rhodochrosite | Level 12
I see your point.
When I tried to Git manage my SAS program and SAS logs, I too was very uncomfortable with the fact that the slight discrepancies that occur in the logs each time they are executed are detected as differences.
I used various options to make the execution log itself tolerable for detecting differences, but I couldn't do anything about the page breaks, and I didn't want to add a PS option for that, so I decided to write my own program to exclude unwanted lines from the log.

I digress.
I usually use an older type of SAS (DMS environment) and don't use SAS Studio, so I don't know the details, but perhaps the batch execution uses the internal processing of the older SAS. (I can guess from the fact that the print is in lst format)
If enough people speak out to Technical Support, this may be fixed in the future, but as it stands now, it is difficult. I think a compromise needs to be made somewhere.
Tom
Super User Tom
Super User

@xxformat_com wrote:

It's not a major concern. As it is not consistent and not working as expected, I would have expect it to be updated in recent SAS release. It means extra attention when scanning the content of the log per program for review. Ideally, when developing a program, you would expect as few possible differences between environment or program submission methods in order to get the same result across environments. It belongs to Good Programming Practices. Right now it means add a special case in the program.


So the simplest solution to the TITLE issue is to make sure each program sets a TITLE as soon as possible.

 

If you really want to compare logs you might also want to look at the (as far as I can tell undocumented) GENERIC option.

That will remove a lot of the file system and owner details from the log and make the comparison easier.  (or course if you need the actual physical filenames in the log then don't use the GENERIC option).

2867  options generic;
2868  filename csv temp;
2869  proc export data=sashelp.class dbms=csv file=csv replace;
2870  run;

2871   /**********************************************************************
2872   *   PRODUCT:   SAS
2873   *   VERSION:   9.4
2874   *   CREATOR:   External File Interface
2875   *   DATE:      25AUG22
2876   *   DESC:      Generated SAS Datastep Code
2877   *   TEMPLATE SOURCE:  (None Specified.)
2878   ***********************************************************************/
2879      data _null_;
2880      %let _EFIERR_ = 0; /* set the ERROR detection macro variable */
2881      %let _EFIREC_ = 0;     /* clear export record count macro variable */
2882      file CSV delimiter=',' DSD DROPOVER ;
2883      if _n_ = 1 then        /* write column names or labels */
2884       do;
2885         put
2886            "Name"
2887         ','
2888            "Sex"
2889         ','
2890            "Age"
2891         ','
2892            "Height"
2893         ','
2894            "Weight"
2895         ;
2896       end;
2897     set  SASHELP.CLASS   end=EFIEOD;
2898         format Name $8. ;
2899         format Sex $1. ;
2900         format Age best12. ;
2901         format Height best12. ;
2902         format Weight best12. ;
2903       do;
2904         EFIOUT + 1;
2905         put Name $ @;
2906         put Sex $ @;
2907         put Age @;
2908         put Height @;
2909         put Weight ;
2910         ;
2911       end;
2912      if _ERROR_ then call symputx('_EFIERR_',1);  /* set ERROR detection macro variable */
2913      if EFIEOD then call symputx('_EFIREC_',EFIOUT);
2914      run;

NOTE: The file CSV is:
      (system-specific pathname),
      (system-specific file attributes)

NOTE: 20 records were written to the file (system-specific pathname).
      The minimum record length was 17.
      The maximum record length was 26.
NOTE: DATA statement used (Total process time):
      real time           0.00 seconds
      cpu time            0.00 seconds


19 records created in CSV from SASHELP.CLASS.


NOTE: "CSV" file was successfully created.
NOTE: PROCEDURE EXPORT used (Total process time):
      real time           0.08 seconds
      cpu time            0.10 seconds
japelin
Rhodochrosite | Level 12

SAS Studio does not have pagesize option.

Instead of setting preference you can try this code for changing PageSize.

options ps=32767;

This will reduce them significantly. Not sure if there's a way to remove it entirely.

 

 

SASKiwi
PROC Star

I'm pretty sure that title is baked into SAS. I'm seeing it in EG and batch and from what I can see you can possibly reduce its occurrence with PAGESIZE as in that link you posted but it can't be removed entirely. Personally I've never felt a need to remove it... 

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 10 replies
  • 2283 views
  • 2 likes
  • 5 in conversation