BookmarkSubscribeRSS Feed
ASHISH2525
Quartz | Level 8

Hi All,

 

I want to use following div class in SAS in put statement for modifying div size  & word wrap option. How can i following code in SAS.

 

<!DOCTYPE html>
<html>
<head>
<style>
div {
width: 150px;
border: 1px solid #000000;
}

div.a {
word-wrap: normal;
}

div.b {
word-wrap: break-word;
}
</style>
</head>
<body>

<h1>The word-wrap Property</h1>

<h2>word-wrap: normal (default):</h2>
<div class="a"> This div contains a very long word: thisisaveryveryveryveryveryverylongword. The long word will break and wrap to the next line.</div>

<h2>word-wrap: break-word:</h2>
<div class="b"> This div contains a very long word: thisisaveryveryveryveryveryverylongword. The long word will break and wrap to the next line.</div>

</body>
</html>

6 REPLIES 6
ASHISH2525
Quartz | Level 8

@Kurt_Bremser 

 

I am using put statement, the root problem is one line is too long so i want to apply word wrap with following line:

 

Put 'Welcome to SAS® Suppor, This is sample line for understanding problem statement';

 

The following solution i got in html, how can i convert it into put statement ?

<style>
div {
width: 150px;
border: 1px solid #000000;
}

div.a {
word-wrap: normal;
}

div.b {
word-wrap: break-word;
}
</style>

 

 

Regards,

Ashish

 

 

 

Kurt_Bremser
Super User

So you have a HTML issue, not a SAS-related one.

 

But I tested your initial code (Chrome), and the long word in the second box was correctly wrapped.

ASHISH2525
Quartz | Level 8

@Kurt_Bremser  Yes the second html code is working as expected. 

I am looking for converting this code into put statement for using in SAS.

 

Can you suggest how can i convert below code in SAS, since only div option i am able to convert but struggling for below code conversion in SAS in put statement.

 

 

 

div {
width: 150px;
border: 1px solid #000000;
}

 

div.b {
word-wrap: break-word;
}

Kurt_Bremser
Super User

It's just a series of put statements, nothing fancy. If you have problems with that, show your code and log.

Use the "little running man" for code and {i} for logs.

Tom
Super User Tom
Super User

Not sure what your wrapping problem is , but HTML in general ignores whitespace, so line breaks inserted because of long lines is normally not a problem.  And if you need long lines of text just make sure to set the LRECL long enough when writing the file. Again HTML in general does not care if your code has any line breaks at all.  You can write your HTML on one line if you want.

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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
  • 1911 views
  • 1 like
  • 3 in conversation