- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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:
- The typical number of different values in each color channel of a digital color image (256 values for red, 256 values for green, and 256 values for blue used for 24-bit color) (see color space or Web colors).
- The number of colors available in a GIF or a 256-color (8-bit) bitmap.
- The number of characters in extended ASCII[2] and Latin-1.[3]
- The number of columns available in a Microsoft Excel worksheet until Excel 2007.[4]
- The split-screen level in Pac-Man, which results from the use of a single byte to store the internal level counter.
- A 256-bit integer can represent up to 1.1579209e+77 values.[5]
- Number of bits in the SHA-256 cryptographic hash.
- The branding number of nVidia's GeForce 256
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
8 bytes are enough for variable names. After all, nobody will need more than 640K RAM.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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!
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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).
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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.