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

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