philihpAboutPGPLightning

Looping through SAS metadata objects

Philihp Busby,0 min read

The following is my attempt at SAS Golf, where in a Data Step, I try to list the associations of a metadata object to the log. This is basically just taking advantage of combining SAS for loops with SAS while loops. I thought it was cool. Usually I find myself doing this with metadata_getnasn , metadata_getnprp , and metadata_getnobj 

data; ... do n=1 by 1 while(n<r or r<=0); r=metadata_getnasl(u,n,a); put a; end; ... run;

UPDATE: The metadata_getnass  function has been renamed to metadata_getnasn 

GitHub · Bluesky · LinkedIn · Instagram · KeybaseRSS

Built from 8f0906ac CC BY 4.0 — with love from San Francisco.