BookmarkSubscribeRSS Feed
Filipvdr
Pyrite | Level 9
Hello,

I'm using a stored process to create an HTML file, i want to place a row with a link like this:

if first.lot_id then put ''Lot_id' Priority: ' Lot_priority '
';
run;



the result in the HTML file generates:


AL100379/1 Priority: 2

AL100402 Priority: 2

AL100403 Priority: 2


as you can see there is always a space after the number in the url. I tried trim, strip or compress but i think the problem is situating in the quoting of my string. Any help?

Message was edited by: Filipvdr

Message was edited by: Filipvdr

Message was edited by: Filipvdr Message was edited by: Filipvdr
6 REPLIES 6
Filipvdr
Pyrite | Level 9
can somebody tell me how i can put the code here without it generating HTML?
Cynthia_sas
SAS Super FREQ
Hi:
In order to post code, protect > and < symbols, preserve code formatting and output indention and to otherwise learn how to post special symbols to the forum, refer to this previous forum posting. It talks about the LT and GT symbols and also discusses how to emphasize code and how to surround code snippets with [pre] and [/pre] (as you discovered
 do not preserve code formatting).
http://support.sas.com/forums/thread.jspa?messageID=27609毙

cynthia
Filipvdr
Pyrite | Level 9
i still get :

[pre]

<a href="AL100379 ">AL100379 </a> Priority: 2 <br/><a href="AL100379 ">AL100379 </a> Priority: 2 <br/><a href="AL100379 ">AL100379 </a> Priority: 2 <br/>
[/pre]

and as you can see, after the number is still a space and i used the following code:
[pre]

if first.lot_id then do;
Lot_id='AL100379';
Lot_priority=2;
put '<a href="' lot_id '">' Lot_id '</a> Priority: ' Lot_priority '<br/>';
/* put line;*/
end;

[/pre]

Message was edited by: Filipvdr Message was edited by: Filipvdr
Vince_SAS
Rhodochrosite | Level 12
The first PUT statement in my posting illustrates the problem, and the second one illustrates the solution. Try using the second format.

Vince DelGobbo
SAS R&D
Filipvdr
Pyrite | Level 9
Oh sorry, i didn"t understand. But yes yes, this works, thanks a lot!
Vince_SAS
Rhodochrosite | Level 12
Does this DATA Step code illustrate the problem and solution?

[pre]
data _null_;
Lot_id='AL100379';
Lot_priority=2;
put '<a href="' lot_id '">' Lot_id '</a> Priority: ' Lot_priority '<br/>';
put '<a href="' lot_id +(-1) '">' Lot_id +(-1) '</a> Priority: ' Lot_priority +(-1) '<br/>';
run;
[/pre]

Vince DelGobbo
SAS R&D

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 6 replies
  • 1425 views
  • 0 likes
  • 3 in conversation