SAS Enterprise Guide

Desktop productivity for business analysts and programmers
BookmarkSubscribeRSS Feed
jen123
Fluorite | Level 6

Hello,

I ran this code/program and got an "variable is not an object" error.  What did I do wrong?  Thoughts?  Thanks!

a.sys_manual=b.sys_manual;

                    ____________

                    557

ERROR: DATA STEP Component Object failure.  Aborted during the COMPILATION phase.

ERROR 557-185: Variable a is not an object.

*******************************

   /* Update filter_by_decdecision_last */

data dcsn_sys_manual;

  

   update filter_by_decdecision (in=a)

           sys_manual_data (in=b);

   by id ;

   if a and b then

      do;

         a.sys_manual=b.sys_manual;

      end;

  

run;

1 REPLY 1
Reeza
Super User

It looks like you're mixing SQL notation and DATA step together.

You can't refer to a.sys_manual and b.sys_manual like that, you need to rename one of them in the update or handle it some other way. Are you sure you want an update, not a set or merge instead?

See here for more information:

http://support.sas.com/documentation/cdl/en/basess/58133/HTML/default/viewer.htm#a001304308.htm

sas-innovate-white.png

Our biggest data and AI event of the year.

Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.

Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.

 

Register now!

Creating Custom Steps in SAS Studio

Check out this tutorial series to learn how to build your own steps in SAS Studio.

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
  • 1 reply
  • 11442 views
  • 0 likes
  • 2 in conversation