Date: Tue, 2 Sep 1997 08:16:01 -0400
Reply-To: Clinton Rickards <CRickard@OXHP.COM>
Sender: "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From: Clinton Rickards <CRickard@OXHP.COM>
Subject: FW: Column lengths in SQL
Tech Report 222, page 288-9, details DICTIONARY.MEMBERS. It lists PATH
as char(80)...
Clint
Oxford Health Plans
Medical Analysis Group
Norwalk, CT
203-851-2553
>----------
>From: Anthony Ayiomamitis[SMTP:ayiomamitis@IBM.NET]
>Sent: Tuesday, August 19, 1997 8:17 PM
>To: SAS-L@UGA.CC.UGA.EDU
>Subject: Re: Column lengths in SQL
>
>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.
>
|