BookmarkSubscribeRSS Feed

I'd like to see a simpler way of creating and using hash tables...something consistent with the syntax and structure of either data statements or proc sql structure.

 

My suggestion...something lie this:

libname foobar memory;    (kind of like memlib, but cross-platform)

 

and then it could be generated like this:

create foobar as select id,desc from sometable key=id;

-or-

data foobar; set sometable; keep id,desc; key=id; run;

 

from that point on, foobar could be used just like any other dataset:

proc sql; select store,storetable.id,foobar.desc from storetable left join foobar on storetable.id=foobar.id;

 

That seems much easier to use and teach than hash and it's yet-another-syntax.

 

11 Comments
ballardw
Super User

@tomrvincent

And (assuming you meant PL/I and not PL1) I'd say COBOL is more procedural, but that's a discussion for a very different decade.

 

Hey, it's been more than 40 years since I did any PL/1 coding, so I forgot how to spell...Smiley Embarassed

Actually I was thinking the syntax for calling SAS procedures and options looked more like PL/1 than COBOL but was never much of a COBOL programmer, more in the FORTRAN mode.