Looping through a table in SAS to extract records from another table

I have a SAS dataset that has one column of distinct codes.
I would like to loop through this table and use the value to select all records from a larger table where the code is equal to the value I just read in.

Featured Post

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Introduction:
I have seen many questions on EE and elsewhere, asking about how to find either
gaps in lists of numbers (id field, usually)
ranges of values or dates
overlapping date ranges
combined date ranges
I thought it would be a good …

Entering a date in Microsoft Access can be tricky. A typo can cause month and day to be shuffled, entering the day only causes an error, as does entering, say, day 31 in June. This article shows how an inputmask supported by code can help the user a…

Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…

Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…