DATA Step, Macro, Functions and more

text of variable wrapping to next line - any reason

Accepted Solution Solved
Reply
Regular Contributor
Posts: 214
Accepted Solution

text of variable wrapping to next line - any reason

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

RandomisationSmiley Tonguearallel 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


Accepted Solutions
Solution
‎03-22-2018 10:39 AM
Super Contributor
Posts: 354

Re: text of variable wrapping to next line - any reason

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


All Replies
Super Contributor
Posts: 354

Re: text of variable wrapping to next line - any reason

Hello,

 

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

Regular Contributor
Posts: 214

Re: text of variable wrapping to next line - any reason

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
Solution
‎03-22-2018 10:39 AM
Super Contributor
Posts: 354

Re: text of variable wrapping to next line - any reason

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.

Regular Contributor
Posts: 214

Re: text of variable wrapping to next line - any reason

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?

Super Contributor
Posts: 354

Re: text of variable wrapping to next line - any reason

Use compress with the hex code for linefeed.

coll=compress(coll,'0A'x);
☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 5 replies
  • 127 views
  • 1 like
  • 2 in conversation