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

libname tgeg "C:|Users\USER00000001\Documents\My SAS Files\9.4";

proc import out=sasuser.pasadata
datafile="C\Users\USER00000001\Documents\My SAS Files\9.4\TMP1.pooled_PASA_merge";
data sasuser.pasadata;set TMP1.pooled_PASA_merge;
run;
/*if phispanic=1 and Spanish=1 then hispanSpan=1; else if phispanic=1 and Spanish=0 then hispanSpan=0;
if marital=. then single=.;
if marital=. then sepdivor=.;
*/
if marital=3 then single=1; if marital in(1,2,4) then single=0; if marital=. then single=.;
if marital in(2,4) then sepdivor=1; if marital in(1,3) then sepdivor=0;if marital=.
then sepdivor=.;
if employment=1 then fulltime=1; if employment in(2,3,4) then fulltime=0;
if employment=2 then parttime=1; if employment in(1,3,4) then parttime=0;

if languageathome=1 or languageathome=3 then Spanishl=0; if languageathome=1 then
Spanish1=1;
if pethnicity=1 then Hispanic=1; if pethnicity in(2,3,4,5,6,7) then Hispanic=0;
if pethnicity=3 then Black=1; if pethnicity in(1,2,4,5,6,7) then Black=0;

run;

1 ACCEPTED SOLUTION

Accepted Solutions
PaigeMiller
Diamond | Level 26

Please explain why you are "not sure this is fully working". What do you see that indicates it isn't working? What do expect to happen?

--
Paige Miller

View solution in original post

7 REPLIES 7
PaigeMiller
Diamond | Level 26

Please explain why you are "not sure this is fully working". What do you see that indicates it isn't working? What do expect to happen?

--
Paige Miller
BigMac
Calcite | Level 5

I get an error yet the proc factor later on work just fine.

BigMac
Calcite | Level 5

: The previous statement has been deleted.
NOTE: The previous statement has been deleted.
NOTE: The previous statement has been deleted.
284 /*if phispanic=1 and Spanish=1 then hispanSpan=1; else if phispanic=1 and Spanish=0 then
284! hispanSpan=0;
NOTE: The previous statement has been deleted.
NOTE: The previous statement has been deleted.
285 if marital=. then single=.;
NOTE: The previous statement has been deleted.
286 if marital=. then sepdivor=.;
NOTE: The previous statement has been deleted.
NOTE: The previous statement has been deleted.
287 */
NOTE: The previous statement has been deleted.
NOTE: The previous statement has been deleted.
288 if marital=3 then single=1; if marital in(1,2,4) then single=0; if marital=. then single=.;
-- -- --
180 180 180
289 if marital in(2,4) then sepdivor=1; if marital in(1,3) then sepdivor=0;if marital=.
-- -- --
180 180 180
NOTE: The previous statement has been deleted.
ERROR 180-322: Statement is not valid or it is used out of proper order.

290 then sepdivor=.;
NOTE: The previous statement has been deleted.
291 if employment=1 then fulltime=1; if employment in(2,3,4) then fulltime=0;
-- --
180 180
NOTE: The previous statement has been deleted.
NOTE: The previous statement has been deleted.
292 if employment=2 then parttime=1; if employment in(1,3,4) then parttime=0;
-- --
180 180
NOTE: The previous statement has been deleted.
NOTE: The previous statement has been deleted.
ERROR 180-322: Statement is not valid or it is used out of proper order.
293
294 if languageathome=1 or languageathome=3 then Spanishl=0; if languageathome=1 then
-- --
180 180
ERROR 180-322: Statement is not valid or it is used out of proper order.
295 Spanish1=1;
296 if pethnicity=1 then Hispanic=1; if pethnicity in(2,3,4,5,6,7) then Hispanic=0;
-- --
180 180
297 if pethnicity=3 then Black=1; if pethnicity in(1,2,4,5,6,7) then Black=0;
-- --
180 180
ERROR 180-322: Statement is not valid or it is used out of proper order.
298
299 run;

WARNING: RUN statement ignored due to previous errors. Submit QUIT; to terminate the procedure.
NOTE: PROCEDURE REG used (Total process time):
real time 1:15:33.84
cpu time 8.14 seconds

NOTE: Writing HTML Body file: sashtml4.htm
NOTE: The SAS System stopped processing this step because of errors.


300 proc contents data=sasuser.pasadata position;
301

PaigeMiller
Diamond | Level 26

@BigMac wrote:

I get an error yet the proc factor later on work just fine.


 

What PROC FACTOR? I don't see it in your code.

 

These extremely brief statements your are making is not the way to get a helpful answer. We need you to explain in enough detail so someone who doesn't know the problem can understand what you are doing and possibly provide help. Brief explanations aren't sufficient.

--
Paige Miller
BigMac
Calcite | Level 5
now the creation of the data file is made permanent I still have error
associations with the formation of the creation of new variables such as
single, fulltime, ect.
BigMac
Calcite | Level 5

libname tgeg "C:|Users\USER00000001\Documents\My SAS Files\9.4";

proc import out=sasuser.pasadata
datafile="C\Users\USER00000001\Documents\My SAS Files\9.4\TMP1.pooled_PASA_merge";
data sasuser.pasadata;set TMP1.pooled_PASA_merge;


if marital=3 then single=1; if marital in(1,2,4) then single=0;
else if marital=. then single=.;
if marital in(2,4) then sepdivor=1; if marital in(1,3) then sepdivor=0;
employment=.;
if employment=1 then fulltime=1; if employment in(2,3,4) then fulltime=0;
employment=.;
if employment=2 then parttime=1; if employment in(1,3,4) then parttime=0;
languageathome=.;
if languageathome=1 or languageathome=3 then Spanishl=0; if languageathome=1 then
Spanish1=1;
pethnicity=.;
if pethnicity=1 then Hispanic=1; if pethnicity in(2,3,4,5,6,7) then Hispanic=0;
pethncitiy=.;
if pethnicity=3 then Black=1; if pethnicity in(1,2,4,5,6,7) then Black=0;

run;
proc contents data=sasuser.pasadata1 position;

proc factor outstat=alex1 simple score data=sasuser.pasadata;
var worthtime cheapercook;
proc score score=alex1 data=sasuser.pasadata out=cook1;
data cook2;set cook1 (rename=(factor1=worthcook1));
run;

proc factor outstat=alex2 simple score rotate=varimax data=cook2;
var precipedirect pusemeasure ppeelveg pstirfryveg psteamveg pbakeveg;
proc score score=alex2 data=cook2 out=cook3;
data cook4;set cook3 (rename=(factor1=cookconf1a factor2=cookconf2a));
proc factor outstat=alex3 simple score rotate=varimax data=cook4;
var pinvolvekid pinsistkid pconfencourageveg;
proc score score=alex3 data=cook4 out=cook5;
data cook6;set cook5 (rename=(factor1=encouragekid));
proc factor outstat=alex4 simple score rotate=varimax data=cook6;
var vegs_eaten drinkwater drinksoda;
proc score score=alex4 data=cook6 out=cook7;
data cook8;set cook7 (rename=(factor1=model1));
proc factor outstat=alex5 simple score rotate=varimax data=cook8;
var orangeveg greenveg beans fruit punch fruitjuice drinksoda drinkwater;
proc score score=alex5 data=cook8 out=cook9;
data cook10;set cook9 (rename=(factor1=kidconsumptt1 factor2=kidconusmpt2));
proc factor outstat=alex6 simple score rotate=varimax data=cook10;
var pprepfood pplanvegkidlike pshopvegkid pshowkidvegsnack phelpkidvegsnack ;
proc score score=alex6 data=cook10 out=cook11;
data cook12;set cook11 (rename=(factor1=invo1vekid1 /*factor2=involvekid2*/));
proc corr;var worthcook1 -- invo1vekid1;with marital pgender page outoffood education
employment pethnicity freelunch benefitssnap benefitswic;
proc freq;table hispanSpan;
proc freq;tables marital pgender page outoffood education
employment pethnicity freelunch benefitssnap benefitswic;
run;
proc reg;model worthcook1= pgender single sepdivor Hispanic Black page parttime
fulltime education Spanishl freelunch benefitssnap benefitswic outoffood;
run;
/*proc factor outstat=alex7 simple score rotate=varimax data=cook12;
var plangarden plantseekds weedgarden pickgardening;
proc score score=alex7 data=cook12 out=cook13;
data cook14;set cook13 (rename=(factor1=garden1));
proc factor outstat=alex7 simple score rotate=varimax data=cook12;
var vjuice freshveghome fjuicehome canveghome ssbhome cutveghome saladhome;
proc score score=alex8 data=cook12 out=cook13;
data cook14;set cook13 (rename=(factor1=foodhome1 factor2=foodhome2));

proc corr;var p_confidence_cooking;with p_involved_child_cooking p_confidence_enc_child;
run;*

 

226 libname tgeg "C:|Users\USER00000001\Documents\My SAS Files\9.4";
ERROR: Invalid physical name for library TGEG.
ERROR: Error in the LIBNAME statement.
227
228 proc import out=sasuser.pasadata
229 datafile="C\Users\USER00000001\Documents\My SAS Files\9.4\TMP1.pooled_PASA_merge";
ERROR: Unable to determine datasource type. Please use the DBMS= option.
NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE IMPORT used (Total process time):
real time 0.00 seconds
cpu time 0.01 seconds

 

230 data sasuser.pasadata;set TMP1.pooled_PASA_merge;
ERROR: Libref TMP1 is not assigned.
231
232
233 if marital=3 then single=1; if marital in(1,2,4) then single=0;
234 else if marital=. then single=.;;
235 if marital in(2,4) then sepdivor=1; if marital in(1,3) then sepdivor=0;
236 employment=.;
237 if employment=1 then fulltime=1; if employment in(2,3,4) then fulltime=0;
238 employment=.;
239 if employment=2 then parttime=1; if employment in(1,3,4) then parttime=0;
240 languageathome=.;
241 if languageathome=1 or languageathome=3 then Spanishl=0; if languageathome=1 then
242 Spanish1=1;
243 pethnicity=.;
244 if pethnicity=1 then Hispanic=1; if pethnicity in(2,3,4,5,6,7) then Hispanic=0;
245 pethncitiy=.;
246 if pethnicity=3 then Black=1; if pethnicity in(1,2,4,5,6,7) then Black=0;
247
248 run;

NOTE: The SAS System stopped processing this step because of errors.
WARNING: The data set SASUSER.PASADATA may be incomplete. When this step was stopped there were
0 observations and 13 variables.
WARNING: Data set SASUSER.PASADATA was not replaced because this step was stopped.
NOTE: DATA statement used (Total process time):
real time 0.03 seconds
cpu time 0.03 seconds


249 proc contents data=sasuser.pasadata position;
NOTE: Writing HTML Body file: sashtml3.htm
250

NOTE: PROCEDURE CONTENTS used (Total process time):
real time 1.40 seconds
cpu time 0.54 seconds


251 proc factor outstat=alex1 simple score data=sasuser.pasadata;
252 var worthtime cheapercook;
ERROR: Variable WORTHTIME not found.
ERROR: Variable CHEAPERCOOK not found.

NOTE: The SAS System stopped processing this step because of errors.
WARNING: The data set WORK.ALEX1 may be incomplete. When this step was stopped there were 0
observations and 0 variables.
WARNING: Data set WORK.ALEX1 was not replaced because this step was stopped.
NOTE: PROCEDURE FACTOR used (Total process time):
real time 0.01 seconds
cpu time 0.01 seconds

 

253 proc score score=alex1 data=sasuser.pasadata out=cook1;

ERROR: No _TYPE_ variable found in the SCORE= data set.
ERROR: No _NAME_ or _MODEL_ variable found in the SCORE= data set.
NOTE: No VAR statement is given. All numeric variables in the SCORE= data set will be used to
compute the scores.
ERROR: No variables in the SCORE= input data set.
NOTE: The SAS System stopped processing this step because of errors.
WARNING: The data set WORK.COOK1 may be incomplete. When this step was stopped there were 0
observations and 12 variables.
WARNING: Data set WORK.COOK1 was not replaced because this step was stopped.
NOTE: PROCEDURE SCORE used (Total process time):
real time 0.01 seconds
cpu time 0.01 seconds

 

254 data cook2;set cook1 (rename=(factor1=worthcook1));
ERROR: Variable factor1 is not on file WORK.COOK1.
ERROR: Invalid DROP, KEEP, or RENAME option on file WORK.COOK1.
255 run;

NOTE: The SAS System stopped processing this step because of errors.
WARNING: The data set WORK.COOK2 may be incomplete. When this step was stopped there were 0
observations and 0 variables.
WARNING: Data set WORK.COOK2 was not replaced because this step was stopped.
NOTE: DATA statement used (Total process time):
real time 0.02 seconds
cpu time 0.03 seconds


256
257 proc factor outstat=alex2 simple score rotate=varimax data=cook2;
258 var precipedirect pusemeasure ppeelveg pstirfryveg psteamveg pbakeveg;
ERROR: Variable PRECIPEDIRECT not found.
ERROR: Variable PUSEMEASURE not found.
ERROR: Variable PPEELVEG not found.
ERROR: Variable PSTIRFRYVEG not found.
ERROR: Variable PSTEAMVEG not found.
ERROR: Variable PBAKEVEG not found.

NOTE: The SAS System stopped processing this step because of errors.
WARNING: The data set WORK.ALEX2 may be incomplete. When this step was stopped there were 0
observations and 0 variables.
WARNING: Data set WORK.ALEX2 was not replaced because this step was stopped.
NOTE: PROCEDURE FACTOR used (Total process time):
real time 0.02 seconds
cpu time 0.03 seconds

 

259 proc score score=alex2 data=cook2 out=cook3;

ERROR: No _TYPE_ variable found in the SCORE= data set.
ERROR: No _NAME_ or _MODEL_ variable found in the SCORE= data set.
NOTE: No VAR statement is given. All numeric variables in the SCORE= data set will be used to
compute the scores.
ERROR: No variables in the SCORE= input data set.
NOTE: No variables in data set WORK.COOK2.
NOTE: The SAS System stopped processing this step because of errors.
WARNING: The data set WORK.COOK3 may be incomplete. When this step was stopped there were 0
observations and 0 variables.
WARNING: Data set WORK.COOK3 was not replaced because this step was stopped.
NOTE: PROCEDURE SCORE used (Total process time):
real time 0.01 seconds
cpu time 0.01 seconds

 

260 data cook4;set cook3 (rename=(factor1=cookconf1a factor2=cookconf2a));
ERROR: Variable factor1 is not on file WORK.COOK3.
ERROR: Variable factor2 is not on file WORK.COOK3.
ERROR: Invalid DROP, KEEP, or RENAME option on file WORK.COOK3.

NOTE: The SAS System stopped processing this step because of errors.
WARNING: The data set WORK.COOK4 may be incomplete. When this step was stopped there were 0
observations and 0 variables.
WARNING: Data set WORK.COOK4 was not replaced because this step was stopped.
NOTE: DATA statement used (Total process time):
real time 0.02 seconds
cpu time 0.03 seconds

 

261 proc factor outstat=alex3 simple score rotate=varimax data=cook4;
262 var pinvolvekid pinsistkid pconfencourageveg;
ERROR: Variable PINVOLVEKID not found.
ERROR: Variable PINSISTKID not found.
ERROR: Variable PCONFENCOURAGEVEG not found.

NOTE: The SAS System stopped processing this step because of errors.
WARNING: The data set WORK.ALEX3 may be incomplete. When this step was stopped there were 0
observations and 0 variables.
WARNING: Data set WORK.ALEX3 was not replaced because this step was stopped.
NOTE: PROCEDURE FACTOR used (Total process time):
real time 0.01 seconds
cpu time 0.01 seconds

 

263 proc score score=alex3 data=cook4 out=cook5;

ERROR: No _TYPE_ variable found in the SCORE= data set.
ERROR: No _NAME_ or _MODEL_ variable found in the SCORE= data set.
NOTE: No VAR statement is given. All numeric variables in the SCORE= data set will be used to
compute the scores.
ERROR: No variables in the SCORE= input data set.
NOTE: No variables in data set WORK.COOK4.
NOTE: The SAS System stopped processing this step because of errors.
WARNING: The data set WORK.COOK5 may be incomplete. When this step was stopped there were 0
observations and 0 variables.
WARNING: Data set WORK.COOK5 was not replaced because this step was stopped.
NOTE: PROCEDURE SCORE used (Total process time):
real time 0.01 seconds
cpu time 0.00 seconds

 

264 data cook6;set cook5 (rename=(factor1=encouragekid));
ERROR: Variable factor1 is not on file WORK.COOK5.
ERROR: Invalid DROP, KEEP, or RENAME option on file WORK.COOK5.

NOTE: The SAS System stopped processing this step because of errors.
WARNING: The data set WORK.COOK6 may be incomplete. When this step was stopped there were 0
observations and 0 variables.
WARNING: Data set WORK.COOK6 was not replaced because this step was stopped.
NOTE: DATA statement used (Total process time):
real time 0.02 seconds
cpu time 0.01 seconds

 

265 proc factor outstat=alex4 simple score rotate=varimax data=cook6;
266 var vegs_eaten drinkwater drinksoda;
ERROR: Variable VEGS_EATEN not found.
ERROR: Variable DRINKWATER not found.
ERROR: Variable DRINKSODA not found.

NOTE: The SAS System stopped processing this step because of errors.
WARNING: The data set WORK.ALEX4 may be incomplete. When this step was stopped there were 0
observations and 0 variables.
WARNING: Data set WORK.ALEX4 was not replaced because this step was stopped.
NOTE: PROCEDURE FACTOR used (Total process time):
real time 0.01 seconds
cpu time 0.00 seconds

 

267 proc score score=alex4 data=cook6 out=cook7;

ERROR: No _TYPE_ variable found in the SCORE= data set.
ERROR: No _NAME_ or _MODEL_ variable found in the SCORE= data set.
NOTE: No VAR statement is given. All numeric variables in the SCORE= data set will be used to
compute the scores.
ERROR: No variables in the SCORE= input data set.
NOTE: No variables in data set WORK.COOK6.
NOTE: The SAS System stopped processing this step because of errors.
WARNING: The data set WORK.COOK7 may be incomplete. When this step was stopped there were 0
observations and 0 variables.
WARNING: Data set WORK.COOK7 was not replaced because this step was stopped.
NOTE: PROCEDURE SCORE used (Total process time):
real time 0.01 seconds
cpu time 0.01 seconds

 

268 data cook8;set cook7 (rename=(factor1=model1));
ERROR: Variable factor1 is not on file WORK.COOK7.
ERROR: Invalid DROP, KEEP, or RENAME option on file WORK.COOK7.

NOTE: The SAS System stopped processing this step because of errors.
WARNING: The data set WORK.COOK8 may be incomplete. When this step was stopped there were 0
observations and 0 variables.
WARNING: Data set WORK.COOK8 was not replaced because this step was stopped.
NOTE: DATA statement used (Total process time):
real time 0.01 seconds
cpu time 0.03 seconds

 

269 proc factor outstat=alex5 simple score rotate=varimax data=cook8;
270 var orangeveg greenveg beans fruit punch fruitjuice drinksoda drinkwater;
ERROR: Variable ORANGEVEG not found.
ERROR: Variable GREENVEG not found.
ERROR: Variable BEANS not found.
ERROR: Variable FRUIT not found.
ERROR: Variable PUNCH not found.
ERROR: Variable FRUITJUICE not found.
ERROR: Variable DRINKSODA not found.
ERROR: Variable DRINKWATER not found.

NOTE: The SAS System stopped processing this step because of errors.
WARNING: The data set WORK.ALEX5 may be incomplete. When this step was stopped there were 0
observations and 0 variables.
WARNING: Data set WORK.ALEX5 was not replaced because this step was stopped.
NOTE: PROCEDURE FACTOR used (Total process time):
real time 0.01 seconds
cpu time 0.03 seconds

 

271 proc score score=alex5 data=cook8 out=cook9;

ERROR: No _TYPE_ variable found in the SCORE= data set.
ERROR: No _NAME_ or _MODEL_ variable found in the SCORE= data set.
NOTE: No VAR statement is given. All numeric variables in the SCORE= data set will be used to
compute the scores.
ERROR: No variables in the SCORE= input data set.
NOTE: No variables in data set WORK.COOK8.
NOTE: The SAS System stopped processing this step because of errors.
WARNING: The data set WORK.COOK9 may be incomplete. When this step was stopped there were 0
observations and 0 variables.
WARNING: Data set WORK.COOK9 was not replaced because this step was stopped.
NOTE: PROCEDURE SCORE used (Total process time):
real time 0.01 seconds
cpu time 0.01 seconds

 

272 data cook10;set cook9 (rename=(factor1=kidconsumptt1 factor2=kidconusmpt2));
ERROR: Variable factor1 is not on file WORK.COOK9.
ERROR: Variable factor2 is not on file WORK.COOK9.
ERROR: Invalid DROP, KEEP, or RENAME option on file WORK.COOK9.

NOTE: The SAS System stopped processing this step because of errors.
WARNING: The data set WORK.COOK10 may be incomplete. When this step was stopped there were 0
observations and 0 variables.
WARNING: Data set WORK.COOK10 was not replaced because this step was stopped.
NOTE: DATA statement used (Total process time):
real time 0.01 seconds
cpu time 0.01 seconds

 

273 proc factor outstat=alex6 simple score rotate=varimax data=cook10;
274 var pprepfood pplanvegkidlike pshopvegkid pshowkidvegsnack phelpkidvegsnack ;
ERROR: Variable PPREPFOOD not found.
ERROR: Variable PPLANVEGKIDLIKE not found.
ERROR: Variable PSHOPVEGKID not found.
ERROR: Variable PSHOWKIDVEGSNACK not found.
ERROR: Variable PHELPKIDVEGSNACK not found.

NOTE: The SAS System stopped processing this step because of errors.
WARNING: The data set WORK.ALEX6 may be incomplete. When this step was stopped there were 0
observations and 0 variables.
WARNING: Data set WORK.ALEX6 was not replaced because this step was stopped.
NOTE: PROCEDURE FACTOR used (Total process time):
real time 0.01 seconds
cpu time 0.00 seconds

 

275 proc score score=alex6 data=cook10 out=cook11;

ERROR: No _TYPE_ variable found in the SCORE= data set.
ERROR: No _NAME_ or _MODEL_ variable found in the SCORE= data set.
NOTE: No VAR statement is given. All numeric variables in the SCORE= data set will be used to
compute the scores.
ERROR: No variables in the SCORE= input data set.
NOTE: No variables in data set WORK.COOK10.
NOTE: The SAS System stopped processing this step because of errors.
WARNING: The data set WORK.COOK11 may be incomplete. When this step was stopped there were 0
observations and 0 variables.
WARNING: Data set WORK.COOK11 was not replaced because this step was stopped.
NOTE: PROCEDURE SCORE used (Total process time):
real time 0.01 seconds
cpu time 0.01 seconds

 

276 data cook12;set cook11 (rename=(factor1=invo1vekid1 /*factor2=involvekid2*/));
ERROR: Variable factor1 is not on file WORK.COOK11.
ERROR: Invalid DROP, KEEP, or RENAME option on file WORK.COOK11.

NOTE: The SAS System stopped processing this step because of errors.
WARNING: The data set WORK.COOK12 may be incomplete. When this step was stopped there were 0
observations and 0 variables.
WARNING: Data set WORK.COOK12 was not replaced because this step was stopped.
NOTE: DATA statement used (Total process time):
real time 0.01 seconds
cpu time 0.03 seconds

 

277 proc corr;var worthcook1 -- invo1vekid1;with marital pgender page outoffood education
ERROR: Variable WORTHCOOK1 not found.
ERROR: Variable MARITAL not found.
ERROR: Variable PGENDER not found.
ERROR: Variable PAGE not found.
ERROR: Variable OUTOFFOOD not found.
278 employment pethnicity freelunch benefitssnap benefitswic;
ERROR: Variable EDUCATION not found.
ERROR: Variable EMPLOYMENT not found.
ERROR: Variable PETHNICITY not found.
ERROR: Variable FREELUNCH not found.
ERROR: Variable BENEFITSSNAP not found.
ERROR: Variable BENEFITSWIC not found.

NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE CORR used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds

 

279 proc freq;table hispanSpan;
ERROR: Variable HISPANSPAN not found.

NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE FREQ used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds

 

280 proc freq;tables marital pgender page outoffood education
ERROR: Variable MARITAL not found.
ERROR: Variable PGENDER not found.
ERROR: Variable PAGE not found.
ERROR: Variable OUTOFFOOD not found.
281 employment pethnicity freelunch benefitssnap benefitswic;
ERROR: Variable EDUCATION not found.
ERROR: Variable EMPLOYMENT not found.
ERROR: Variable PETHNICITY not found.
ERROR: Variable FREELUNCH not found.
ERROR: Variable BENEFITSSNAP not found.
ERROR: Variable BENEFITSWIC not found.
282 run;

NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE FREQ used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds

 

283 proc reg;model worthcook1= pgender single sepdivor Hispanic Black page parttime
ERROR: Variable WORTHCOOK1 not found.
ERROR: Variable PGENDER not found.
ERROR: Variable SINGLE not found.
ERROR: Variable SEPDIVOR not found.
ERROR: Variable HISPANIC not found.
ERROR: Variable BLACK not found.
ERROR: Variable PAGE not found.
284 fulltime education Spanishl freelunch benefitssnap benefitswic outoffood;
ERROR: Variable PARTTIME not found.
ERROR: Variable FULLTIME not found.
ERROR: Variable EDUCATION not found.
ERROR: Variable SPANISHL not found.
ERROR: Variable FREELUNCH not found.
ERROR: Variable BENEFITSSNAP not found.
ERROR: Variable BENEFITSWIC not found.
ERROR: Variable OUTOFFOOD not found.
NOTE: The previous statement has been deleted.
285 run;

WARNING: No variables specified for an SSCP matrix. Execution terminating.
NOTE: PROCEDURE REG used (Total process time):
real time 0.03 seconds
cpu time 0.01 seconds


286 /*proc factor outstat=alex7 simple score rotate=varimax data=cook12;
287 var plangarden plantseekds weedgarden pickgardening;
288 proc score score=alex7 data=cook12 out=cook13;
289 data cook14;set cook13 (rename=(factor1=garden1));
290 proc factor outstat=alex7 simple score rotate=varimax data=cook12;
291 var vjuice freshveghome fjuicehome canveghome ssbhome cutveghome saladhome;
292 proc score score=alex8 data=cook12 out=cook13;
293 data cook14;set cook13 (rename=(factor1=foodhome1 factor2=foodhome2));
294
295 proc corr;var p_confidence_cooking;with p_involved_child_cooking p_confidence_enc_child;
296 run;*

 

Tom
Super User Tom
Super User

Fix the errors in the order they occur.  Having one error usually means there will be more errors that are caused by the first.  Especially in your case since you failed to point your libref at the right location and so could not find the dataset.

226 libname tgeg "C:\Users\USER00000001\Documents\My SAS Files\9.4";
ERROR: Invalid physical name for library TGEG.
ERROR: Error in the LIBNAME statement.

Is SAS really running on a Windows machine so a path in that format is valid? Is it running on a machine with that directory? Is it being run by a user with permission read that directory?

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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
  • 7 replies
  • 1070 views
  • 0 likes
  • 3 in conversation