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


 

 

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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
  • 2 replies
  • 9362 views
  • 0 likes
  • 2 in conversation