BookmarkSubscribeRSS Feed
novinosrin
Tourmaline | Level 20

256 seems to be a classic number that seems to have the distinction of inseparable component of SAS software. I am intrigued to find out why. Can anybody please lend their time in explaining with some references? or even point me to some documentation that solely and clearly explains this?

 

For instance, In a lot of SAS options such limits, length, default , labels-data-set/variable, 256 being the max number of tables/views in Proc sql join, Hash function SHA256 and perhaps many more 256 may surface. 

 

Thank you in advance!

 

PS @all the wise sages, your participation in thread would particularly be helpful. Thank you*1e6!

The closest reference I got:

In computing

One octet (in most cases one byte) is equal to eight bits and has 28 or 256 possible values, counting from 0 to 255. The number 256 often appears in computer applications (especially on 8-bit systems) such as:

8 REPLIES 8
Kurt_Bremser
Super User

Very simple. 256 = 2 ** 8, so 256 is the number of characteristics a byte can have (or, in different words, a byte can hold 256 numbers, from 0 to 255). The number of bits in a byte is also a power of 2, so 256 = 2 ** 2 ** 3.

Reeza
Super User
Yup, SAS has been around from 1970 when 8 bit was a bigger thing and for backwards compatibility a lot of these settings remain.
JackHamilton
Lapis Lazuli | Level 10

I wonder why the default string length in some cases is 200, not 256.

 

I remember that once SAS had an informal poll, which would we rather have, longer variable names or longer libref names.  The consensus was longer variable names, and that's what we got.

 

The length of libref names probably comes from MVS (now z/OS, something else before MVS), which has a maximum DDname length of 8.  The original member name length of 8 probably comes from the maximum length of MVS partitioned data set members (at one time, SAS data sets were stored as PDS members, not in a single big file).  I don't know where the length of 8 for variable names came from.  Maybe they went for uniformity, or though that no one would ever possibly need longer names than that.

 

TomKari
Onyx | Level 15

I'm sure you're correct about the DDNAME and PDS member name length limitations. I remember SAS being on the mainframe A LONG TIME before they ported it to other architectures.

 

The variable name limit is funny. Much of SAS is based on PL/I, and it had the COBOL feature of long variable names. FORTRAN at that point was limited to 6 characters. I'm mystified!

 

Tom

TomKari
Onyx | Level 15

640K? Are you kidding?!? When I started, I couldn't submit a job bigger than 256K on our mainframe, one of the biggest in Canada. And don't talk to me about those wimpy personal computers...they hadn't been released yet!

Kurt_Bremser
Super User

The first computer I programmed on was a CDC 6600, also equipped with 256K of "words", a word containing 60 bits, allowing real storage with a 48 bit mantissa, or 10 characters (characters were encoded with just 6 bits, so only capitals available).

Those 256K were delivered with a crane and needed a reinforced floor (magnet cores).

SASKiwi
PROC Star

You were lucky. For my first computing efforts I had to count on my fingers only, and that was with one hand tied behind my back.

 

Trouble is young people today never believe you...

 

Apologies to Monty Python.

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

How to connect to databases in SAS Viya

Need to connect to databases in SAS Viya? SAS’ David Ghan shows you two methods – via SAS/ACCESS LIBNAME and SAS Data Connector SASLIBS – in this video.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 8 replies
  • 1190 views
  • 1 like
  • 6 in conversation