Date: Thu, 23 May 2002 15:50:45 -0400
Reply-To: "Goldman, Brad (AT-Atlanta)" <Brad.Goldman@AUTOTRADER.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "Goldman, Brad (AT-Atlanta)" <Brad.Goldman@AUTOTRADER.COM>
Subject: Puts, Part II
Content-Type: text/plain; charset="iso-8859-1"
My original goal was to have SAS automatically update an HTML file, adding a
line with this months info to a drop down menu. I previously had a problem
with puts and carriage-returns. Thank you for all the help, but in the end
I had to resort to the kludge of:
line=compress(line,'0D'x); to strip out the offending characters.
My next problem with this program is much easier, I feel sure that someone
will know the answer quickly. I have the code working fine for "normal"
reports. But then I came to MDDBs, which have very long URLs. For example,
here is one report link:
<option value="http://10.102.8.83/cgi-bin/broker?_SERVICE=defaul
t&_PROGRAM=sashelp.webeis.showrpt.scl&_DEBUG=2&MDDB=MDDB.DEALERS
EARC
H_02N04&METABASE=SASHELP&VIEW=VIEW&CSS=/mandash/sasweb/IntrNet8/
MRV/
css/example1.css&GRT=NONE&DC=1&ACB=1&ST=1&GL=1&GSC=1
&
;SSL=1&SH=3&SW=15&GH=450&GW=600&DP=2&NR=ALL&SV0=
7&am
p;SV=DMA&SV1=DMA&SV2=ENDYR&SV3=MAKER&SV4=MODEL&SV5=MXPRI
CE&a
mp;SV6=STARTYR&SV7=STATE&D0=1&D1=state_dma_endyr_stayr_price_mak
e&am
p;D=state_dma_endyr_stayr_price_make&AC0=0&A0=2&A1=NSEARCH&A
=NSE
ARCH&A1S=SUM&A2=PAGEV&A2S=SUM">April 2002</option>
(Imagine the above is one long line, no breaks.)
Trimming some bits, here is the relevant code.
data _null_;
infile "&in" length=ln;
file "~/temp";
input @;
input line $varying1024. ln;
line=compress(line,'0D'x);
put line $varying1024. ln;
run;
My code puts the long URL above out as:
<option value="http://10.102.8.83/cgi-bin/broker?_SERVICE=defaul
t&_PROGRAM=sashelp.webeis.showrpt.scl&_DEBUG=2&MDDB=MDDB.DEALERS
EARC
H_02N02&METABASE=SASHELP&VIEW=VIEW&CSS=/mandash/sasweb/IntrNet8/
MRV/
css/example1.css
(again, this is all one long line, just not as long as it should be!)
I also get this in the log:
NOTE: 420 records were read from the infile
"/links/mandash/dealer_services/hindex.htm".
The minimum record length was 0.
The maximum record length was 256.
One or more lines were truncated.
So it seems to me that SAS is putting out only 256 characters, not the whole
shebang, despite my $varying1024. specification. Can anyone help me to get
the entire string?
Thank you,
-Brad