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

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;

1 ACCEPTED SOLUTION

Accepted Solutions
Reeza
Super User

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

5 REPLIES 5
Reeza
Super User

Figure out why your surveylogistic procedure is failing. 

haoduonge
Quartz | Level 8

what you meant and how?

Reeza
Super User

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. 

haoduonge
Quartz | Level 8

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.

haoduonge
Quartz | Level 8

I figured it out.

Thank you!

Hao

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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
  • 5 replies
  • 1223 views
  • 1 like
  • 2 in conversation