LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (July 2003, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Mon, 7 Jul 2003 16:33:54 -0400
Reply-To:   Sigurd Hermansen <HERMANS1@WESTAT.COM>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Sigurd Hermansen <HERMANS1@WESTAT.COM>
Subject:   Re: COMPUTE problem revisited
Comments:   To: David Kellerman <kellermandavid@YAHOO.COM>
Content-Type:   text/plain; charset="iso-8859-1"

I would try a cheap trick at this stage. The DEFINE call looks much like a SYMPUT call. If you change DEFINE to SYMPUT and add a %PUT statement after the PROC REPORT statement, you may be able to see what the last iteration of the loop produces. A single assignment produces a url in correct syntax (althought that does not tell you much):

data temp; JOB='XXXX'; urlstring="http://149.83.123.28/MVSDSN/'CPS.TU.CNTL("||TRIM(JOB)||")'" ; put urlstring; call symput('url',urlstring) ; run; %put &url;

Result: http://149.83.123.28/MVSDSN/'CPS.TU.CNTL(XXXX)'

Programming languages tend to use the same methods for composing strings. Simpler constructs may show you how compositions resolve.

Sig

-----Original Message----- From: David Kellerman [mailto:kellermandavid@YAHOO.COM] Sent: Monday, July 07, 2003 3:49 PM To: SAS-L@LISTSERV.UGA.EDU Subject: COMPUTE problem revisited

In a previous post I worked out a problem with a hot-link through a compute. In attempting to tidy up the output, I've written the code below to be selective as to which cells are linkable. If I use no selection criteria, it works. When I make the url/call define part of a do/end nothing is selected. I've tried everything I can think of (adding fields;suing char vs numeric, etc.) and haven't found any solution. It should be straightforward, but obviously I'm missing something. In multiple cases x = 7, but job isn't hot-linked.

David

PROC REPORT DATA=FRED5 NOWINDOWS HEADLINE HEADSKIP SPLIT='*' ; COLUMN SYSTEM JOB CPUTM MIPS OWNER x Y ; DEFINE SYSTEM / GROUP WIDTH=6 ; DEFINE JOB / GROUP WIDTH=8 ; DEFINE CPUTM / ORDER WIDTH=10 FORMAT=TIME10. ; DEFINE MIPS / GROUP WIDTH=8 FORMAT=6.2 ; DEFINE OWNER / DISPLAY WIDTH=10 NOPRINT; DEFINE x / DISPLAY WIDTH=2 format=2. ; DEFINE Y / DISPLAY WIDTH=1 ; COMPUTE BEFORE JOB ; ptno + 1 ; ENDCOMP ;

COMPUTE JOB ; if x > 1 then do; urlstring="http://149.83.123.28/MVSDSN/'CPS.TU.CNTL(" ||TRIM(JOB)||")'" ; call define (_col_,'url',urlstring) ; end ; ENDCOMP ;

--------------------------------- Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month!


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