BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
vraj1
Quartz | Level 8

I have a variable and the text of it looks fine if i look

Randomisation:Parallel or cross-over?

 

But if i copy that variable and paste it wraps to next line and not sure the reason and it only happens to 1 value of the variable

Randomisation:
Parallel or cross-over?

 

Tried reducing length but no use. any clue why it happens

1 ACCEPTED SOLUTION

Accepted Solutions
gamotte
Rhodochrosite | Level 12

Do you mean that "Alt-enter" was used in excel to introduce a line break in the cell value ?

If so, it is normal that the pasted text contains a line break.

 

Your question does not seem to concern SAS language or software.

View solution in original post

5 REPLIES 5
gamotte
Rhodochrosite | Level 12

Hello,

 

Where do you copy your text from and where do you paste it ?

vraj1
Quartz | Level 8

It is imported from excel and it was done "Alt tab" to make it to next line and this is causing problem

data WORK.TEST;
  infile datalines dsd truncover;
  input _NAME_:$8. _LABEL_:$40. COL1:$1024. COL2:$1024.;
datalines4;
F1,F1,Trial,ID
F2,F2,,Trial name
F3,F3,,Sources
F4,F4,,Primary publication
F5,F5,,Trial number
F6,F6,Trial design,Objective
F7,F7,,Randomisation:
Parallel or cross-over?
F8,F8,,Setting
gamotte
Rhodochrosite | Level 12

Do you mean that "Alt-enter" was used in excel to introduce a line break in the cell value ?

If so, it is normal that the pasted text contains a line break.

 

Your question does not seem to concern SAS language or software.

vraj1
Quartz | Level 8

My concern is i was trying it to make it strip but cannot do it, used compress and strip.

What needs to be done to strip it?

gamotte
Rhodochrosite | Level 12
Use compress with the hex code for linefeed.

coll=compress(coll,'0A'x);

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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
  • 5 replies
  • 914 views
  • 1 like
  • 2 in conversation