Resolving a replacement chain of unknown depth in one pass of a DATA step: why an in-memory hash is the only structure that fits this shape of problem, what the step guarantees, and what it does when the extract is not clean. A self-contained Base SAS check ships with the note — one fixture, eleven assertions.
Hash
2Notes first, then external projects一次把整张表读进内存,再让主表的每一行各自去“钉”上去——这是临床 SAS 编程里最值钱的一条肌肉记忆。 本文给出 hash 对象的完整语法骨架(declare → definekey → definedata → definedone → find / output),四类真实项目形态的 可搬运代码(受试者筛选、横向合并、纵向检索、SDTM/ADaM 衍生),以及八条按官方文档与会议论文归集的易错点。