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

Hi Everyone,

My "want" data has only 1 CELL (1 column and 1 row).

The data in this row is long (about 5000 letter, with all kind of character.)

I use SAS-Studio.

Can you please help me with that?

 

Thank you,

 

HHC

 

The sample value is:

<"ozexoz ;"=;-9: []/'\":+!@#$%& -0*&^%  nzzozOZypA5ozzznmUnzzozOZypA5><W15ySpnsrCW1sA5ZZ0</W1:SurvA5ySpnsrCW1sA5ZZD><W1:RA5prozzznmUnzzozMA5ozW1dW1ozW1><W1:MA5oZozA5m></W1:MA5ozW1DW1ozW1Mrup><W1:MA5ozW1DW1ozW1Mrup MA5ozW1DW1ozW1MrupNW1mA5="A5CW1SA5_CS_MW1"><W1:DW1ozW1ZZ A5lA5mA5nozNW1mA5="WRKLW1D_OZYPA5_CDA5"></W1:DW1ozW1ZZoA5m><W1:DW1ozW1ZZozA5m A5lA5mA5nozNW1mA5="WRKLW1D_P_OZYPA5_CDA5"></1:DW1ozW1ZZozA5m></W1:MA5ozW1DW1ozW1Mrup></W1:RA5prozzznmUnzzozMA5ozW1dW1ozW1><WMW1zzlzznmW1ddrAW1ddr1>20OZ 11W1</W1:W1ddr1><W1:W1ddr3>NW1RRW1MW1NSA5OZOZ, RZZ -</W1:W1ddr3>

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Tom
Super User Tom
Super User

What do you mean by IMPORT?

 

If you have a text file just read it.

data want;
  infile 'myfile.txt' truncover;
  input myvar $5000.;
run;

Note that there is a 32K limit on the size of a variable.

View solution in original post

3 REPLIES 3
Tom
Super User Tom
Super User

What do you mean by IMPORT?

 

If you have a text file just read it.

data want;
  infile 'myfile.txt' truncover;
  input myvar $5000.;
run;

Note that there is a 32K limit on the size of a variable.

hhchenfx
Rhodochrosite | Level 12

Hi Tom,

 

I meant create a data using

 

data want;
input var $ ;

datalines;

 

 

 

 

Tom
Super User Tom
Super User

@hhchenfx wrote:

Hi Tom,

 

I meant create a data using

 

data want;
input var $ ;

datalines;

 


It is probably a lot easier if you just use an assignment statement.

data want;
  length var $5000 ;
  var =
  '<"ozexoz ;"=;-9: []/''\":+!@#$%& -0*&^%  nzzozOZypA5ozzznmUnzzozOZypA5>'
||'<W15ySpnsrCW1sA5ZZ0</W1:SurvA5ySpnsrCW1sA5ZZD>'
||'<W1:RA5prozzznmUnzzozMA5ozW1dW1ozW1>'
||'<W1:MA5oZozA5m>'
||'</W1:MA5ozW1DW1ozW1Mrup>'
||'<W1:MA5ozW1DW1ozW1Mrup MA5ozW1DW1ozW1MrupNW1mA5="A5CW1SA5_CS_MW1">'
||'<W1:DW1ozW1ZZ A5lA5mA5nozNW1mA5="WRKLW1D_OZYPA5_CDA5">'
||'</W1:DW1ozW1ZZoA5m>'
||'<W1:DW1ozW1ZZozA5m A5lA5mA5nozNW1mA5="WRKLW1D_P_OZYPA5_CDA5">'
||'</1:DW1ozW1ZZozA5m>'
||'</W1:MA5ozW1DW1ozW1Mrup>'
||'</W1:RA5prozzznmUnzzozMA5ozW1dW1ozW1>'
||'<WMW1zzlzznmW1ddrAW1ddr1>20OZ 11W1</W1:W1ddr1>'
||'<W1:W1ddr3>NW1RRW1MW1NSA5OZOZ, RZZ -</W1:W1ddr3>'
;
run;

Make sure to double any actual single quotes inside the strings that are quoted with quotes.

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

Register now

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 3 replies
  • 964 views
  • 0 likes
  • 2 in conversation