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.

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 6 replies
  • 826 views
  • 1 like
  • 3 in conversation