Help using Base SAS procedures

Error not found in LOG without OUTPUT

Reply
N/A
Posts: 0

Error not found in LOG without OUTPUT

When I submit the SAS program as below, the log only shows the line numbers read successfully but no output displays in the OUTPUT. I clear all the log and output and repeat the program several times, the same happens. However, when I quit and invoke SAS again, the program runs and output is shown. This problem happens frequently in running the program. What is the problem ?

e.g.
options PS=90 LS=120 nodate nocenter nonumber;

libname temp 'c:\work';

data tt;
infile 'c:\t.txt';
input year 1-4 district 5-14 residence 15-24 travel 25-27 weight 28-42;
run;

proc sql;
create table temp.work as
select year, district, travel, weight
from tt where year=2009;
quit;
run;

data test;
set temp.work;
if district in (1,2,3) then travel=99;
run;

proc format;
value mode 1='Train'
2='Car'
3='Plane'
4='Ship'
5='On foot'
99='Others';
run;

proc tabulate data=test F=comma12. noseps;
class year district travel;
var weight;
format travel mmode.;
table district=''*travel='' all='Overall', year=''*weight=''*sum='' /rts=25;
run;


Please advise.
Frequent Contributor
Posts: 106

Re: Error not found in LOG without OUTPUT

Are you saying you don't see your statements (be that proc or data step statements) displayed on the log after the first (or first n) executions? That might indicate an open comment statement, a non terminated bracketed or quoted element. If this is the case then you might try what is sometimes referred to as "magic string", ie. the sequence
[pre]
*'; *"; *); */; %mend; run;
[/pre]
Super Contributor
Super Contributor
Posts: 3,174

Re: Error not found in LOG without OUTPUT

Suggest you share with the forum "exact SAS generated log output" not a copy of your code-piece, in order to receive accurate and objective feedback (as well as can be handled through this forum). Otherwise, suggest you contact SAS technical support, where you will likely need to do the same.

And, add this command at the very beginning of your SAS program in order to generate the most complete output -- then desk-check the log yourself before re-posting, just in case you missed something.

OPTIONS SOURCE SOURCE2 MACROGEN SYMBOLGEN MPRINT /* MLOGIC */;

Scott Barry
SBBWorks, Inc.
Super User
Posts: 17,784

Re: Error not found in LOG without OUTPUT

Check your proc tabulate...you called the format with the wrong name, but I can't see that causing all that error....but thats why you check the log.
N/A
Posts: 0

Re: Error not found in LOG without OUTPUT

This is my SAS LOG with only the statements in line numbers without errors. No output is generated. I tried to submit CANCEL;END but same result happened. Could any expert please advise.

184
185 options ps=90 ls=200 nonumber nocenter;
186
187 data temp1;
188 infile 'c:\temp\f10.txt';
189 input period $1-7 trans $9 control $11-55 code $57-59 overall 61-70 status $72 mode $74 type $76;
190 run;
191
192 proc sort data=temp1 out=temp2;
193 by period trans;
194 run;
195
196 proc format;
197 value $mtrans 'A'=' Region'
198 'D'=' District';
199 value $mtype '1'=' Local'
200 '2'=' Overseas'
201 '3'=' Foreign'
202 '4'=' Resident'
203 '5'=' Others';
204 run;
205
206 data temp3;
207 set temp2;
208 run;
209
210 proc tabulate f=comma12.;
211 class period trans type;
212 var overall;
213 format trans $mtrans. type $mtype.;
214 table (trans=''*type='' all=''*type=''), period='calendar period'*overall=''*sum='' /rts=25;
215 run;
216
217 title;
218 run;
Valued Guide
Posts: 632

Re: Error not found in LOG without OUTPUT

Your TABLE statement has a mismatched quote after the SUM=

table district=''*travel='' all='Overall', year=''*weight=''*sum='' /rts=25;

Unclosed quotes tend to cause all sorts of havoc.
N/A
Posts: 0

Re: Error not found in LOG without OUTPUT

Thanks. But I could not find any unbalanced quote in my statement. Please explain.

table (trans=''*type='' all=''*type=''), period='calendar period'*overall=''*sum='' /rts=25;
Super Contributor
Super Contributor
Posts: 3,174

Re: Error not found in LOG without OUTPUT

So, where are SAS code lines 1 through 183? Your log starts at line 184, which is exactly what seems suspicious. Share the entire SAS Log with SAS generated messages included.

Scott Barry
SBBWorks, Inc.
Super Contributor
Posts: 356

Re: Error not found in LOG without OUTPUT

And your code supplied(orig post) is different to the code seen in the Log supplied
N/A
Posts: 0

Re: Error not found in LOG without OUTPUT

Thanks. I am referring to the my previous post on Oct-26-2010 8:26pm. Regarding the message lines in the LOG, they are automatically generated each time. So, the generation from from lines 184 in the LOG is the new result. No NOTE messages and TABULATION are displayed. Please help.
Super Contributor
Super Contributor
Posts: 3,174

Re: Error not found in LOG without OUTPUT

Honestly, from previous experience...I doubt the SAS code/log not shown reveals information. Share the entire SAS log so you can get the most productive feedback from individuals who troll this forum.

Scott Barry
SBBWorks, Inc.
N/A
Posts: 0

Re: Error not found in LOG without OUTPUT

Thanks to those experts in the reply.

May I make it clear that the previous post on Oct-26-2010 8:26pm already contained the entire LOG results. No NOTES/WARNINGS/ERRORS in the LOG as shown are revealed and no further tabulation as displayed in the OUTPUT window although PROC TABULATE in the SAS statement is added. Please help.
SAS Super FREQ
Posts: 8,742

Re: Error not found in LOG without OUTPUT

Hi:
If you close down your SAS session and restart SAS and resubmit this code and ONLY this code -- so that your log starts at line #1 instead of line #184, do you see the same issue?? Can you replicate this behavior -- reliably, every single time you submit this code and ONLY this code????

In my experience, when you get a log without any messages, it is usually because you are either so deep into "bad quote" land or "nested and unclosed macro definition" land -- that the SAS compiler ceases to pass code to be executed. I suspect that you had errors (mismatched quotes, or unclosed macro definitions) prior to log line #184. Usually, when you close and reopen SAS you force a "reset" of the unclosed macro definition or clear the bad quotes.

It is entirely possible that there is -nothing- wrong with the code you posted -- and that THIS code was merely suffering from previously uncorrected errors/issues.

(Although, as an aside, it is hard to see whether you have single quote-space-single quote (' ') or single quote-single quote ('') or an unmatched double quote (") in your Tabulate code.)

Without seeing the code you submitted BEFORE the log you posted on Oct 26, any suggestions offered are sheer speculation.

cynthia
Super User
Posts: 9,676

Re: Error not found in LOG without OUTPUT

Hi.
I meet the same problem before.
You can click 'break' button to cancel the code you submited,then SAS can work.
Ask a Question
Discussion stats
  • 13 replies
  • 135 views
  • 0 likes
  • 8 in conversation