BookmarkSubscribeRSS Feed
pbstubejunkie
Calcite | Level 5

 

data variables11 ;

set inlib.income ;

ESTINC= input(STATE MEN_INC WOM_INC, best.) ;

run ;

 

proc print data=inlib.income ;

var STATE MEN_INC WOM_INC ;

title 'ESTIMATED INCOME CHECK' ;

run ;

 

 

im getting the following error message

 

3585  data variables11 ;

3586      set inlib.income ;

3587      ESTINC= input(STATE MEN_INC WOM_INC, best.) ;

                              -------

                              388

                              202

ERROR 388-185: Expecting an arithmetic operator.

 

ERROR 202-322: The option or parameter is not recognized and will be ignored.

 

3588  run ;

 

NOTE: Character values have been converted to numeric values at the places given by:

      (Line):(Column).

      3587:19

NOTE: Numeric values have been converted to character values at the places given by:

      (Line):(Column).

      1:1

NOTE: The SAS System stopped processing this step because of errors.

WARNING: The data set WORK.VARIABLES11 may be incomplete.  When this step was stopped there were

         0 observations and 4 variables.

WARNING: Data set WORK.VARIABLES11 was not replaced because this step was stopped.

NOTE: DATA statement used (Total process time):

      real time           0.04 seconds

      cpu time            0.00 seconds

2 REPLIES 2
Reeza
Super User

You've listed too many variables in the INPUT().

 

You can only process one variable at a time. 

 


@pbstubejunkie wrote:

 

data variables11 ;

set inlib.income ;

ESTINC= input(STATE MEN_INC WOM_INC, best.) ;

run ;

 

proc print data=inlib.income ;

var STATE MEN_INC WOM_INC ;

title 'ESTIMATED INCOME CHECK' ;

run ;

 

 

im getting the following error message

 

3585  data variables11 ;

3586      set inlib.income ;

3587      ESTINC= input(STATE MEN_INC WOM_INC, best.) ;

                              -------

                              388

                              202

ERROR 388-185: Expecting an arithmetic operator.

 

ERROR 202-322: The option or parameter is not recognized and will be ignored.

 

3588  run ;

 

NOTE: Character values have been converted to numeric values at the places given by:

      (Line):(Column).

      3587:19

NOTE: Numeric values have been converted to character values at the places given by:

      (Line):(Column).

      1:1

NOTE: The SAS System stopped processing this step because of errors.

WARNING: The data set WORK.VARIABLES11 may be incomplete.  When this step was stopped there were

         0 observations and 4 variables.

WARNING: Data set WORK.VARIABLES11 was not replaced because this step was stopped.

NOTE: DATA statement used (Total process time):

      real time           0.04 seconds

      cpu time            0.00 seconds


 

 

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 9967 views
  • 0 likes
  • 2 in conversation