Hi there,
can anybody explain to me in simple words why libref and fileref are limited to 8 characters?
What is the reason why we can't use .. I don't know .. 32 characters?
Thanks in advance.
SAS was developed on IBM mainframes, and so SAS object names resemble typical OS/360 / MVS / z/OS file names, and those have a restriction that every level can have a maximum of 8 characters (so the names look like PROD.SOURCE.CNTL, but PROD.JOBSOURCE.CNTL is impossible), this is a legacy restriction coming from the early development of SAS.
It depends on the internal quality of the code repository if changing the underlying type from 8 to 32 characters will break something or not.
OTOH, I've never felt the need for more characters in file/librefs. And as a longtime programmer (and UNIX at that), I hate unnecessary typing. So 8 character libnames and 32 character dataset names is enough for me.
Legacy restrictions.
8 chars is one byte so that may have something to do with it.
SAS was developed on IBM mainframes, and so SAS object names resemble typical OS/360 / MVS / z/OS file names, and those have a restriction that every level can have a maximum of 8 characters (so the names look like PROD.SOURCE.CNTL, but PROD.JOBSOURCE.CNTL is impossible), this is a legacy restriction coming from the early development of SAS.
It depends on the internal quality of the code repository if changing the underlying type from 8 to 32 characters will break something or not.
OTOH, I've never felt the need for more characters in file/librefs. And as a longtime programmer (and UNIX at that), I hate unnecessary typing. So 8 character libnames and 32 character dataset names is enough for me.
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.