Date: Wed, 25 Sep 2002 04:37:39 -0400
Reply-To: Magnus Mengelbier <magnus.mengelbier@FERRING.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Magnus Mengelbier <magnus.mengelbier@FERRING.COM>
Subject: Re: How to detect SAS.EXE version via Windows File Property ?
Hello John
It has become quite clear now that you have stumbled into the realm of
legacy code and version, and not as i initially thought a simple query what
is installed, for documentation, etc.
I have several times on different projects have to solve a similar problem.
A couple of solutions .... but I would probably recommend one.
Four steps involved.
(1) Package all code as libraries and introduce minor sub-libraries to
contain SAS version specific code.
(2) All code ever calling on others always have config parameters ... like
long SAS name <-> short SAS name conversions, reference tables, etc. The
code will become more abstract, but it may solve a lot of problems. Can be
as simple as %cfg_<package>(param) which returns a value... or %mymacro
(..., v6compat=no);
(3) Use isolated work areas for different modules/packages and return
the "result" to a common work cache like the standard library work.
(4) All runs of a SAS batches use a SAS autoexec ... which points filrefs
and libnames to different locations depending on the SAS version. The key
is to apply a naming scheme on the sub-libraris mentioned in (1) and not
the SAS internals... which many do.
This is one way... and i suspect there will be many more...
HTH
Magnus
On Tue, 24 Sep 2002 19:31:53 -0500, John <John@NOSPAM_SENSORYSIMS.COM>
wrote:
>You are indeed a rambling guy!
>
>We gave some thought to the idea of running a guick &sysvlong to
>detect the SAS version. This would be a change to our basic way of
>Easy in... work... Easy Out. We use VBEnterprise, using Application
>Instances and Handles to detect when the Batch job finished,
>effectively waiting for the batch to complete, and then move along in
>our application. We would have to somehow break into the 'waiting'
>period to grab the just created info in !Temp/this_sas_ver_is
>
>The idea of getting administrators to install a !sasver isn't
>practical since we have over 100 corporate clients.... You must know
>what it like to talk to the IT person at client site... no way are we
>going to contact all of them for something like this, which would
>probabaly turn out to be an annual event.... Most of the IT people we
>talk to who purchase and install SAS in their organizations hve no
>idea what SAS is.... Success for them (and us) is to get the SAS
>System installed and able to start w/o error.
>
>We strive to keep things simple, for our sanity and the clients too.
>
>Earlier today we implemented in our application:
>Workaround #1. Use the silly version info returned by file property
>and compare against a table of known values.
>Workaround #2. Use the 1st digit of the version number from above, to
>give our application a reliable clue as to V6 vs V8.
>Workaround #3. Assume SAS v8.2
>
>Hey, thanks for the lengthy reply, it's a good read. I learned.
>
>John
>
>
>
>
>(please remove "NoSpam_" from return address to respond directly)