Date: Tue, 19 Aug 1997 20:17:09 -0400
Reply-To: Anthony Ayiomamitis <ayiomamitis@IBM.NET>
Sender: "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From: Anthony Ayiomamitis <ayiomamitis@IBM.NET>
Subject: Re: Column lengths in SQL
Content-Type: text/plain; charset=us-ascii
David Bohl wrote:
>
> Dear SQLers:
>
> I'm using the following snippet of SQL code to fetch the name
> of the SAS working directory and store it in the macro variable
> SASWORK:
>
> proc sql noprint;
> select PATH into :SASWORK
> from DICTIONARY.MEMBERS
> where LIBNAME="WORK";
> quit;
>
> It seems to work fine unless the name of the SAS working directory
> exceeds 80 characters.
>
> Admittedly, I'm no SQL expert, but I can't seem to find a way to
> work around this 80-character limit. Is this an SQL-imposed limit,
> or does the problem lie with DICTIONARY.MEMBERS? In any event, can
> anybody offer a work-around?
>
David,
I do not think that this is an SQL limitation as I tried a small
example with a PROC SQL step and was able to generate and store a string
that happened to be 150 bytes in length.
This leads me to suspect that this is a self-imposed limit by SAS
on the length of the PATH that can be stored (this is confirmed by the
example below where I purposely use the SASHELP libref which, under
Windows, spans three lines when printed).
As a work-around, I would suggest looking at the PATHNAME function
in SCL if your application is SAS/AF-based. Similarly, this SCL function
is now also available in SAS/BASE. For example:
data _null_;
path = %str (pathname('sashelp'));
put path=;
run;
Assuming that SAS wants to maintain the same data "architecture"
across platforms, the limit of 80 bytes does seem reasonable as MVS, for
example, has a screen width of 72 bytes within the file editor and
around 80 bytes in native TSO.
Please let me know of any other feedback you receive as I would be
interested in learning of other solutions or related problems.
Anthony.