The SAS Output Delivery System and reporting techniques

SAS Output

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 6
Accepted Solution

SAS Output

Hi all,

I use syntax below to run multiple variables - it was fine before but now I keep seeing these warnings:

[[

NOTE: The data set WORK.U has 1 observations and 0 variables.
NOTE: DATA statement used (Total process time):
real time 0.01 seconds
cpu time 0.00 seconds


ERROR: There are no valid observations.
NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE SURVEYLOGISTIC used (Total process time):
real time 0.00 seconds
cpu time 0.01 seconds

WARNING: Output 'SurveyLogistic.OddsRatios' was not created. Make sure that the output object
name, label, or path is spelled correctly. Also, verify that the appropriate procedure
options are used to produce the requested output object. For example, verify that the
NOPRINT option is not used.

ERROR: File WORK.OUT_TABLE.DATA does not exist.]]

 

Please advise what should be revised to have correct output.

Thank you!

Hao

 

%macro part(varlist,outc,adj);
data u;run;
%let i=1;
%let var=%scan(&varlist,&i);
%do %while(&var NE);
proc surveylogistic data=bigone;
class &var(ref=first) &adj(ref=first);
model &outc(desc)=&var &adj ;
weight popwgt;
ods output SurveyLogistic.OddsRatios=out_table;
run;
data u;
set u out_table;
run;
%let i=%eval(&i+1);
%let var=%scan(&varlist,&i);
%end;
%mend;

%macro all;
%let vv= q7_MEIM_2cat ;
%let oo= impfm_2y_2cat ;
%let aa= impfm_1y_2cat ;
%let j=1;
%let foo=%scan(&oo,&j);
%let faa=%scan(&aa,&j);
%do %while (&foo NE);
%part(&vv,&foo,&faa);
data r&j;
set u;
title="&foo";
run;
PROC EXPORT DATA= WORK.R&j
OUTFILE= "c:\data\hduong\aa\aa\Table3a"
DBMS=EXCEL REPLACE;
SHEET="r&j";
RUN;

%let j=%eval(&j+1);
%let foo=%scan(&oo,&j);
%let faa=%scan(&aa,&j);
%end;
%mend ;
%all;


Accepted Solutions
Solution
‎09-29-2017 07:40 AM
Super User
Posts: 20,688

Re: SAS Output

Posted in reply to haoduonge

Determine which run causes your SURVEYLOGISTIC proc to fail.

Run the macro with options MPRINT and SYMBOLGEN to see the full details.

 

if it's been running previously and isn't now, it's most likely a data issue. We don't have your data and therefore can't tell you what's causing the issue. 

That being said, I'm assuming this is true and not checking your code for syntax errors. 

View solution in original post


All Replies
Super User
Posts: 20,688

Re: SAS Output

Posted in reply to haoduonge

Figure out why your surveylogistic procedure is failing. 

Occasional Contributor
Posts: 6

Re: SAS Output

what you meant and how?

Solution
‎09-29-2017 07:40 AM
Super User
Posts: 20,688

Re: SAS Output

Posted in reply to haoduonge

Determine which run causes your SURVEYLOGISTIC proc to fail.

Run the macro with options MPRINT and SYMBOLGEN to see the full details.

 

if it's been running previously and isn't now, it's most likely a data issue. We don't have your data and therefore can't tell you what's causing the issue. 

That being said, I'm assuming this is true and not checking your code for syntax errors. 

Occasional Contributor
Posts: 6

Re: SAS Output

I think the error is [ERROR: File WORK.OUT_TABLE.DATA does not exist.]

I do some google search and see that many reported the same - file [out_table] is not recognized or linked.

Occasional Contributor
Posts: 6

Re: SAS Output

Posted in reply to haoduonge

I figured it out.

Thank you!

Hao

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 5 replies
  • 216 views
  • 1 like
  • 2 in conversation