SAS column input -


i found weird output when implementing following codes.

data ex;     input $ 1-80 b $;     datalines; 1 2 3 4 5 6 

the data set ex is:

a       b 1 2     3 

then

data ex2;     input $ 1-81 b $;     datalines; 1 2 3 4 5 6 

the data set ex2 is:

a        b 3 4      5 

finally, create txt file contains:

1 2 3 4 5 6 

and run

data ex3;     infile '/.../test.txt';     input $ 1-10 b $ ; 

the data set ex3 is:

a        b 3 4      5 

can explain how buffer , pdv work weird results? lot.

all results based on sas studio (university edition).

i

 obs         b    1     1 2    3 

with log

27         data ex; 28             input $ 1-10 b $; 29             datalines;  note: lost card. rule:      ----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0                      33         ;;;; a=5 6 b=  _error_=1 _n_=2 note: sas went new line when input statement reached past end of line. note: data set work.ex has 1 observations , 2 variables. 

are telling whole story?


Comments

Popular posts from this blog

Retrieving ETA (estimated time of arrival) with Google Distance Matrix API and public transit as transport mode -

android - ConstraintLayout: Realign baseline constraint in case if dependent view visibility was set to GONE -

c# - Populating Gridview inside Listview ItemTemplate On Web User Control from Code Behind -