Why Is Sas Considered Self-documenting?
Please provide a reference for your assertion. Who said this and in what context? Was there an example included?
Its not. Some languages, like Java and Python, have the special comments and doc sections which can be pulled out as documentation. SAS does not have that. Though with proc scaproc, you could take that as run documentation.
SAS can be one confusing tool to use if you only know SQL.
It may be that someone has referenced to code that was wrote with the KISS method and someone has included remarks with notes to assist others who may use the program later in life.
@anjita wrote:
Why Is Sas Considered Self-documenting?
I have seen this used in the context of data set and variable labels. You can provide a description for each data set and each variable in a data set using Label. Since many SAS procedures will display at least part of the label by default it becomes somewhat more meaningful in output to see:
"Measure of Instrument X at calibration date" instead of a variable name like "MX_CDT" in reports.
The tools that are relatively easy such as Proc Contents to provide descriptions of data sets might also be considered part of that documentation.
Considering the last project I got involved with SQL Server data where I had literally more than 2000 tables dumped on me but no schema, and when we did get a partial schema description the names of the tables did not exactly match the tables received the ability, if used properly, to see what variables actually mean from labels can be considered quite a bit of documentation. If you add in data set labels such as "Raw data from instrument reading" or "Weekly summary of sales by region and store" it is possible to find desired information moderately quickly.
And with Dictionary tables or views about libraries, datasets, variables you can even search for key words in the labels to find which data set might have "Sales" in the label.
This is an interesting concept and idea.
I'd have to agree with an earlier reply that asks for some more clarification.
IMHO - sas (and maybe any language) can only be as "documented" as the developer, team and ecosystem have the discipline for.
To me - if you have constructive, flexible, useful practices and standards - your code can be easily understood.
Add to that - "time" to take as long as you want - wow - it can really be "documented".
Thats not always the case. I'm often pressed for time. In fact - likely because i've spent time writing this up (documenting lol) - i'll now piss off someone who reads my code and its because i wont have time to document! Jeeesh!
Ok - to me - its a collaborative effort.
over the last 7 years ive become a huge fan of GIT, vsts and leveraging the idea of documentation in the right place at the right time in the right way.
Documentation has its facets.
Its why i think even if we DOCUMENT the "tar" into code we write - its likely a Business SME might hate that because - welp - its too Techy.
Or if we write up a "non tech doc" for that audience. Our QA testers might beat that up because... "great you documented the code, you documented the - business application... but we want test documentation and specs".
So i aspire to document in a smart, efficient, useful way - at strategic places with the "team tools" available.
Thats how i can really cook up some cool stuff and not go nuts!
Best
Zeke Torres
I lead WCSUG
I'll be at SGF19 - lets see if we can gather and discuss this more!
Have a great weekend and Cook Great CODE!
SAS is considered self-documenting because during the compilation time it creates and stores all the information about the data set like the time and date of the data set creation later No. of the variables later labels all that kind of info inside the dataset and you can look at that info using proc contents procedure.
@rinugour Thats awesome. I do agree with that. it does come with awesome features that assist and give it that edge in documentation. You are correct.
I think to me the idea still stands that its a strong or hard question "is -it- considered self documenting"... because that statement is open to interpretation.
I am in no way in disagreement with anyone response here.
What i've experienced is the need for a comprehensive use of all the features, systems, logs, list, git, vsts, wikis, etc to document the right thing in the right place.
One of my topics that i'll present on at SGF19 is related to this.
I have a great disappointment in "proc printto" and sending LOG/LIST to the same old place every time.
So i've written macros and code that allow me to modify my own LOG/LST and that of my teams.
Look it up in SGF19. Its paper 3139
Here is a quick set of the Problem and Proposed Solution!
Have a great weekend everyone! And cook up some great SAS!
Best
Zeke Torres
LUG Leader: WCSUG
#sas #basesas #kissmysas #sasaholic #chicagoSASusergroup #sasmacrosrock
The Problem with LOG/LST
The Proposed Solution
The silly stuff I mess around with in my brain...
One thing you may want to look at is Life Science Analytics Framework by SAS. It is a tool built by SAS which provides a way of running one or more programs within what is known as a Job. The Job provides a more detailed overview of the run, having all the information from proc scaproc, the logs all in one manifest. This is great, and is "Self Describing" for the run. It is not however "Self Describing" as such for the code, although it does show inputs/outputs.
I think this is where the definition (and how its used in other languages) needs to be defined. There is the run and there is the code, two similar but different entities. Code itself needs to be documented, without being run, and hence you have various documents - Requirements Document, Testing Document, User Guide (yes I know, nobody using SAS bothers with that nonsense, just bash out some macro libraries 🐵 which are not generated automatically as a log. You can emulate such as a thing like Javadocs, by using text file parsing on the code you create of course.
So a run might be "Self Describing", but standalone code is not.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!
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.
Select SAS Training centers are offering in-person courses. View upcoming courses for: