SAS Programming

DATA Step, Macro, Functions and more
BookmarkSubscribeRSS Feed
Ajayvit
Obsidian | Level 7

Hi Team,

 

I want to understand about IORC process in Data Step by using Index.

My requirement is we have two data set (A and B),(A) is small and (B)is very large.

I do understand that for large data set we can create index. But how to merge tow data set using   __IORC__  technique. ?

 

*Index larger file;
proc datasets lib=work;
modify daset_name;
index create variable_name/unique;
quit;

6 REPLIES 6
Ajayvit
Obsidian | Level 7

Hi Josvander,

 

Thank you for your help. 

I have been there i was not able to understood the solution thats why i am here.

Thank You.

JosvanderVelden
SAS Super FREQ
Does example 4 from the documentation help in understanding?
https://documentation.sas.com/doc/en/lrcon/9.4/n1tgk0uanvisvon1r26lc036k0w7.htm#n1g54zcicf3fu4n16aop...
If not do you understand the fundamentals of datastep programming with regards to the PDV? There is a great youtube video on that: https://youtu.be/7EMOai04_eg.
Kurt_Bremser
Super User

The paper is very nicely done and describes every single step of the process in depth. I could not think of a better way to describe how the statements work.

What in particular do you not understand?

Keep in mind that this is advanced technique, so a certain level of SAS knowledge is required to understand it, combined with the skillset of a programmer.

 

My personal preference for lookups into a small table while processing a large one is the hash object.

Ajayvit
Obsidian | Level 7

What i did not understood is :

here we are performing lookup for common variable and value which is like (if a and b in merge) but how to manipulate this condition like if a or if a and not b like this.

 

Thank you.

Kurt_Bremser
Super User

After the execution of the second SET statement, the _IORC_ variable will tell you if the statement succeeded (0) or not (1).

The section "Selecting Observations in Both Files" shows an example for "if a and b". By checking for 0 (instead of NE 0), you get the code for "a and not b".

sas-innovate-white.png

Special offer for SAS Communities members

Save $250 on SAS Innovate and get a free advance copy of the new SAS For Dummies book! Use the code "SASforDummies" to register. Don't miss out, May 6-9, in Orlando, Florida.

 

View the full agenda.

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.

SAS Training: Just a Click Away

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

Browse our catalog!

Discussion stats
  • 6 replies
  • 1568 views
  • 1 like
  • 3 in conversation