Prev: Exporting the results
Next: data step rename
From: xlr82sas on 23 Dec 2009 12:46 Hi SAS-Lers, I need to create a tst dataset with 7 observations not 4. How do I create 7 obs with lyn having values 1-4 and 3 values of ' '. I hope this is message readable. The inline data is 7 records 1,' ',2,' ',3,' ' and 4. Infile seems to ignore blank lines and I need infile to honor blank lines. data tst; length lyn $80; input; put _infile_ $hex2.; lyn=_infile_; datalines; 1 2 3 4 ;;;; run; 31147 data tst; 31148 length lyn $80; 31149 input; 31150 put _infile_ $hex2.; 31151 lyn=_infile_; 31152 datalines; 31 32 33 34 NOTE: The data set WORK.TST has 4 observations and 1 variables. NOTE: DATA statement used (Total process time): real time 0:00.00 cpu time 0:00.01 The hidden dragon works, but I don't want to have the dragon in my dataset. data tst; length lyn $80; input; put _infile_ $hex2.; lyn=_infile_; datalines; 1 2 3 4 ;;;; run; 31159 data tst; 31160 length lyn $80; 31161 input; 31162 put _infile_ $hex2.; 31163 lyn=_infile_; 31164 datalines; 31 A0 32 A0 33 A0 34 NOTE: The data set WORK.TST has 7 observations and 1 variables. NOTE: DATA statement used (Total process time): real time 0:00.00 cpu time 0:00.01
|
Pages: 1 Prev: Exporting the results Next: data step rename |