LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous (more recent) messageNext (less recent) messagePrevious (more recent) in topicNext (less recent) in topicPrevious (more recent) by same authorNext (less recent) by same authorPrevious page (October 2007, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 25 Oct 2007 19:17:56 -0400
Reply-To:     "Keintz, H. Mark" <mkeintz@WHARTON.UPENN.EDU>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         "Keintz, H. Mark" <mkeintz@WHARTON.UPENN.EDU>
Subject:      Re: Program source for permanent dataset
Comments: To: Michael Raithel <michaelraithel@WESTAT.COM>
In-Reply-To:  A<403593359CA56C4CAE1F8F4F00DCFE7D0A153FAD@MAILBE2.westat.com>
Content-Type: text/plain; charset="us-ascii"

Michael and Paul have provided useful advice which effectively describes the burden of documenting the source code used to create SAS data sets, especially when the documentation effort is retrospective.

It would be nice if only SAS had a feature (let's call it, oh say "HISTORY") that would attach the source code used to create a SAS data set to the dataset itself. You know, like data set labels, passwords, etc.

Wouldn't that be great?

<history> Well, back in the day, data STEP code would automatically be included in the "header" portion of SAS data sets. In the case of data sets created with a MERGE, SET, or UPDATE statement, it would also include the source statements used to create the parents, grandparents, etc. I think the programmer could optionally control how many levels of history to be retained in the data set.

The result was that a simple PROC CONTENTS using the now disappeared HISTORY option would show you those source statements. In the case of multiple "generations" (note I am NOT referring to the GEN dataset option) the history report could be tiresome to figure out, but at least it was there.

It had other weaknesses as well - I think that a PROC SORT would drop the history, and data sets created by other PROCs did not get any source code included. </history>

<soapbox> But rather than being improved, this feature was removed many SAS versions ago. I am unaware of the reason, but it's the only SAS change that comes to mind that I regard (and regarded then) as a step backwards. </soapbox>

I'd be interested to know whether subscribers to this list see restoring some sort of history capability as a high-value improvement. I, for one, would like to generate a permanent SAS data set in PROC SQL, and have the code retained in the data set.

Mark

> -----Original Message----- > From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of > Michael Raithel > Sent: Wednesday, October 24, 2007 8:55 AM > To: SAS-L@LISTSERV.UGA.EDU > Subject: Re: Program source for permanent dataset > > Dear SAS-L-ers, > > Surai Jones posted the following: > > > How do I find the name of the sas program that created the > > permanent SAS dataset sitting on a UNIX directory? > > > Surai, Patrick has already given you some very sound advice on how hard > this will be to accomplish. Some other things that may also complicate > your task are: > > 1. If you _DO_ find the program in question, it may have been modified > since the SAS data set was created. Check the dates on both if you are > going to want to re-create the data set in the exact same manner. > > 2. In many organizations, people use SAS/Connect software to connect > between Windows and UNIX. If a Windows-based SAS programmer sent > his/her program to the UNIX server to execute using RSUBMIT/ENDRSUBMIT, > then you will not find that program on the UNIX server. There are > other > similar scenarios, regarding SAS/CONNECT where a program will not leave > tracks on the UNIX server (e.g. using the SERVER= option on the libname > statement). So, if you are in a SAS/Connect-using IT shop, your task > may be harder. > > 3. Similarly, somebody may have SAS/Connected from another UNIX server > and created the SAS data set. So, your issues will be similar to #2. > > 4. Also complicating matters is the possibility that the program that > created it is in a UNIX directory that you do not have permission to > access. You cannot search directories that you cannot see or cannot > access. > > In this circumstance, I would suggest that you perform PROC > ASKEVERYBODY, using all of your SAS programming colleagues as input. > If > the value of GOODANSWER is greater than zero, you are in business! > > Surai, best of luck in sleuthing out what SAS program created your > mystery SAS data set! > > > I hope that this suggestion proves helpful now, and in the future! > > Of course, all of these opinions and insights are my own, and do not > reflect those of my organization or my associates. All SAS code and/or > methodologies specified in this posting are for illustrative purposes > only and no warranty is stated or implied as to their accuracy or > applicability. People deciding to use information in this posting do so > at their own risk. > > +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ > Michael A. Raithel > "The man who wrote the book on performance" > E-mail: MichaelRaithel@westat.com > > Author: Tuning SAS Applications in the MVS Environment > > Author: Tuning SAS Applications in the OS/390 and z/OS Environments, > Second Edition > http://www.sas.com/apps/pubscat/bookdetails.jsp?catid=1&pc=58172 > > Author: The Complete Guide to SAS Indexes > http://www.sas.com/apps/pubscat/bookdetails.jsp?catid=1&pc=60409 > > +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ > My Grandmother is over eighty and still doesn't need glasses. > Drinks right out of the bottle. - Henny Youngman > +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++


Back to: Top of message | Previous page | Main SAS-L page