BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
SASEdward
Fluorite | Level 6

After pressing the submit button from an editor window, is there a way to have SAS default to displaying the log "on top" instead of the results viewer or output window?

 

After submitting code to SAS, especially during development work, it is almost always necessary to check the log for errors etc before checking the results, so this would be a very useful usability option.

 

I'm using SAS 9.4, windows environment.

1 ACCEPTED SOLUTION

Accepted Solutions
SASEdward
Fluorite | Level 6

 

Well, in testing this some more, it does work, but only if I don't use some log clearing commands first.

I defined the F8 key as follows:

submit;log

Then, from the enhanced editor window, the following works:

1) Highlight an area of the code with a few proc sorts and prints. Works great!  The log ends up on top of the Results Viewer!

 

The following does not work, and was apparently my initial problem:

2) If I execute my entire code, which includes the following DM log commands to clear prior log noise, I then get a warning message saying that "Extra arguments on window command were ignored".

DM log "OUT;CLEAR;LOG;CLEAR;" log continue ;
DM log 'next results; clear; cancel;' whostedit continue ;

So, it appears that when I include the DM log statements in the code, the DM keys command doesn't work properly. They must be conflicting somehow...

 

If I make the F8 key as follows, and delete the DM statements from my code, then I seem to get all the functionality I was looking for. Cleared logs and output, and log screen on top after execution.

clear log;clear output;submit;log

 

Thanks for the help!

 

 

 

View solution in original post

8 REPLIES 8
jklaverstijn
Rhodochrosite | Level 12

short of suggesting to use Enterprise Guide instead of Display manager, have a go at redefining a function key as "submit; log;".

 

I have not tested this (I use EG primarily Smiley Wink ) but I'm confident the secret is in the keys here.

 

Regards,

- Jan.

SASEdward
Fluorite | Level 6
No luck with this idea... the results viewer and/or output listing still pop over the top of the log.
LinusH
Tourmaline | Level 20

Works wonderful for me 🙂

What do you mean with "no luck", do your get an error message, or...

Describe the exact steps (defining the key, submitting the code)...

Data never sleeps
SASEdward
Fluorite | Level 6

 

Well, in testing this some more, it does work, but only if I don't use some log clearing commands first.

I defined the F8 key as follows:

submit;log

Then, from the enhanced editor window, the following works:

1) Highlight an area of the code with a few proc sorts and prints. Works great!  The log ends up on top of the Results Viewer!

 

The following does not work, and was apparently my initial problem:

2) If I execute my entire code, which includes the following DM log commands to clear prior log noise, I then get a warning message saying that "Extra arguments on window command were ignored".

DM log "OUT;CLEAR;LOG;CLEAR;" log continue ;
DM log 'next results; clear; cancel;' whostedit continue ;

So, it appears that when I include the DM log statements in the code, the DM keys command doesn't work properly. They must be conflicting somehow...

 

If I make the F8 key as follows, and delete the DM statements from my code, then I seem to get all the functionality I was looking for. Cleared logs and output, and log screen on top after execution.

clear log;clear output;submit;log

 

Thanks for the help!

 

 

 

LinusH
Tourmaline | Level 20

But I agree with @jklaverstijn, you should move towards Enterprise Guide. If I'm not totally misinformed, it comes free (or at least to affordable price) with individual client SAS Foundation on Windows.

Data never sleeps
SASEdward
Fluorite | Level 6
I do have access to Enterprise Guide, however my coursework (prep for Base SAS certification exam) is specific to the windows environment. I look forward to the newer interfaces later on for sure.
jklaverstijn
Rhodochrosite | Level 12

@SASEdward wrote:
I do have access to Enterprise Guide, however my coursework (prep for Base SAS certification exam) is specific to the windows environment. I look forward to the newer interfaces later on for sure.

 

Aha that's good to hear. Good luck on the exam.

rogerjdeangelis
Barite | Level 11

I know this does not answer your question but:

 

  With the cost of monitors under $100 why not get a third monitor, win 7 and win 10 support three monitors.

 

 

  As a side note, I seem to have good luck with these key settings.

 

  You need to use the more powerfull old text editor, many of these features are not in EE, UE, Sas Studio or EG.

 

 

MMB pgm;file &pgm..sas;file c:\ver\&pgm.&_q..sas;%let _q=%eval(0&_q +1); * does versioning;
RMB log;clear;out;clear;pgm;submit;home;rec;home;log;home;z;z; * submit;

 

Magic string

 

;;;;/*'*/ *);*};*];*/;/*"*/;%mend;run;quit;%end;end;run;endcomp;%utlfix;

 

%utlfix

 

%macro utlfix(dum);
* fix frozen sas and restore to invocation ;
dm "odsresults;clear;";
ods results off;
options ls=171 ps=65;run;quit;
ods listing;
ods select all;
ods excel close;
ods graphics off;
proc printto;run;
goptions reset=all;
endsubmit;
endrsubmit;
run;quit;
%utlopts;

%mend utlfix;

 

%utlopts

 

%MACRO UTLOPTS
/ des = "Turn all debugging options off forgiving options";

OPTIONS

OBS=MAX
FIRSTOBS=1
lrecl=384
NOFMTERR /* DO NOT FAIL ON MISSING FORMATS */
SOURCE /* turn sas source statements on */
SOURCe2 /* turn sas source statements on */
MACROGEN /* turn MACROGENERATON ON */
SYMBOLGEN /* turn SYMBOLGENERATION ON */
NOTES /* turn NOTES ON */
NOOVP /* never overstike */
CMDMAC /* turn CMDMAC command macros on */
/* ERRORS=2 turn ERRORS=2 max of two errors */
MLOGIC /* turn MLOGIC macro logic */
MPRINT /* turn MPRINT macro statements */
MRECALL /* turn MRECALL always recall */
MERROR /* turn MERROR show macro errors */
NOCENTER /* turn NOCENTER I do not like centering */
DETAILS /* turn DETAILS show details in dir window */
SERROR /* turn SERROR show unresolved macro refs */
NONUMBER /* turn NONUMBER do not number pages */
FULLSTIMER /* turn FULLSTIMER give me all space/time stats */
NODATE /* turn NODATE suppress date */
/*DSOPTIONS=NOTE2ERR */
/*ERRORCHECK=STRICT /* syntax-check mode when an error occurs in a LIBNAME or FILENAME statement */
DKRICOND=WARN /* variable is missing from input data during a DROP=, KEEP=, or RENAME= */
DKROCOND=WARN /* variable is missing from output data during a DROP=, KEEP=, or RENAME= */
/* NO$SYNTAXCHECK be careful with this one */
;

run;quit;

%MEND UTLOPTS;

 

FUNCTION KEYS - not quite right but will give you some ideas

 

I also have a couple dozen actions on my 6 button mouse

 

 

F1
F2 pgm;file &pgm..sas;file "c:\ver\&pgm.&_q..sas";%let _q=%eval(0&_q +1);
F3 note;notesubmit '%lastall; /* contents last */
F4 note;notesubmit '%last'; /* last 40 obs */
F5 log;file "./&pgm..log";note zx;notesubmit '%utl_logcurchk(.'&pgm..log);';
F6 next out;
F7 right 3
F8 left 3
F9 rfind /* data;v1=;v2=3;v3=2;callsortn(of v1-v3);put v1 1v2 v3; */
F11 rchange
F12 wattention
SHF F1 ~;;;;/*'*/ @);*};*];*/;/* " */;%mend;run;quit;%end;end;run;endcomp;%utlopts;
SHF F2 vt _last_ colnames=names;
SHF F6 ~pmenu off;/*where n='Phil Mason';n=:'Ph';n like 'P_il M_s_n';n like '%son'; */
SHF F7 :a;copy box;/*n ? 'hil';n=*'PFil Mason';n gt:'Phil';n le:'Phim'; sql - eqt */
SHF F8 :a;copy hdr;/*libname x excel '.xls';proc sql;update x;set y=2;where n='Roger'*/
SHF F9 ~set file00: indsname=inputsd1; /* constant(pi,big,small,logbig) */
SHF F10 home; /* proc print blankline=5; * blanline every 5 lines */
SHF F11 ~%let dtetym=%substr(%sysfunc(outn(%sysfunc(datetime(),datetime22.)),1,15);
SHF F12 ~proc print split='*';attrib _all_ label='*'; * print without col names
CTL F1 ~%macro utl_div(n,d); ifn(&d,(&n)/ifn(&d,&d,1),.) %mend utldiv;
CTL F2 store;note;notesubmit '%uxpall';
CTL F3 store;note;notesubmit '%viewt'; /* all obs highlighted */
CTL F11 note;notesubmit '%lastall'; /* all obs last datasets */
CTL F12 ~data;x=count('boy girl Boy','boy'); put x=; result is 2 /freshstart*/
ALT F1 ~array x[1] x1;array n[1] $ nam ('x1');l1=vname(n[1]);l2=vnamex(n[1]);put l1 l2
ALT F2 ~PROC TABULATE DATA=CLASS;CLASS SEX AGE;TABLE AGE,SEX*(N PCTN<AGE>)/RTS=8
ALT F3 ~%let find=AT; %in &find in AT THE END %then %put founf &find;
ALT F11 ~CREATE TABLE D (S INT,T DATE LABEL="D");INSERT INTO D VALUES(1,"01JAN99"D)
ALT F12 ~%macro inop/minoperator;%let f=A;%if &f in XX A %then %put got &f;%mend;%inop;
CTL B ~dm "dexport sashelp.class 'c:\tmp\tmp.csv' replace; reverse for dimport
CTL D note b.b /* cnt sex * frq sex*age xos "ls -l * dos "dir c:/rtf */
CTL E home; /* prt sex age * xin pgm */
CTL G ~do until(last.s);set c;by s;a+ag;end;do until(last.s);set c;by s;output;end;a=0
CTL H :a;copy exceltips; /* source h:/oto/exceltips.sas */
CTL I note h.h /* rpt sex age * libs/libunx libnames pc/unx */
CTL J note i.i /* */
CTL K f "Summay of 2011";
CTL L :mcu /* xplo ROGER - exploded text * sccs ckc/cko/chk/prt ckn prg c*/
CTL M :mcl /* iota 20 * pth libref *path2 paste bufr */
CTL Q :lc /* dmp sasuser.class * ata unix - HI print dataset */
CTL R ~select quote(strip(name)) into :qls separated by ',' from sashelp.class;quit;
CTL T :a:copy utl_vex;
CTL U note;notesubmit '%dmp';
CTL W ~%let qw="%sysfunc(tranwrd(a aa aaa,%str( ),%str(" ")))";%put &qw;
CTL Y ~proc catalog cat=lib.formats; delete yr2pop/et=formatc;quit;
RMB ~WHERE NAME LIKE "B_B" "%B%" "B%B" NAME =/symexist(var)
SHF RMB log;clear;out; clear;pgm;submit;rec;home;log;/*data;z=anydigit('a1');anycntrl*/
CTL RMB store;note;notesubmit '%uxp'; /* 40 highlighted last */
MMB store;note;notesubmit '%uxpcon'; /* contents highlighted last */
SHF MMB ~mapped to f1
CTL MMB ~test

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

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.

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
  • 8 replies
  • 3438 views
  • 3 likes
  • 4 in conversation