Help using Base SAS procedures

why I get _IORC_ error?

Accepted Solution Solved
Reply
Contributor
Posts: 22
Accepted Solution

why I get _IORC_ error?

data master;   

input dt $ dept $ sales;   

datalines;       

DEC-2013 PC 2000       

NOV-2013 PC 1500       

DEC-2012 MOBILE 3000   

;

run;

DATA lkup;

input dept $ percent; datalines;    

  PC 0.4   

  MOBILE 0.6 ;

run;

proc sql;   

create index dept on lkup(dept);   

quit;

data merged;   

set master;   

set lkup key=dept;   

x=_IORC_;

run;

I am getting error on second row, it should find match and no error is reported. Can anyone explain me what's wrong in the code?


Accepted Solutions
Solution
‎01-30-2014 04:52 PM
Super User
Super User
Posts: 7,050

Re: why I get _IORC_ error?

Try adding /UNIQUE option.

set lkup key=dept / unique;

View solution in original post


All Replies
Contributor
Posts: 22

Re: why I get _IORC_ error?

dt=NOV-2013 dept=PC sales=1500 percent=0.4 x=1230015 _ERROR_=1 _IORC_=1230015 _N_=2

Solution
‎01-30-2014 04:52 PM
Super User
Super User
Posts: 7,050

Re: why I get _IORC_ error?

Try adding /UNIQUE option.

set lkup key=dept / unique;

Contributor
Posts: 22

Re: why I get _IORC_ error?

Works. Thanks a bunch.

🔒 This topic is solved and locked.

Need further help from the community? Please ask a new question.

Discussion stats
  • 3 replies
  • 258 views
  • 0 likes
  • 2 in conversation