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

Thanks Tom and Art. It works like a charm now.

MikeZdeb
Rhodochrosite | Level 12

Hi ... here's another idea.  The attached JPEG is a screenshot of TEST.XLS.

I think it looks like what you say is your spreadsheet.

libname x 'z:\test.xls';

data x;

set x.'sheet1$'n;

nrec+1;

run;

libname x clear;

proc transpose data=x out=y (where=(_name_ ne "nrec"));

var _all_;

by nrec;

run;

data z;

do j=1 by 1 until(done);

  set y end=done;

  select;

     when (mod(j,2)) date = col1;

     otherwise do; var = col1 ; id = _label_; output; end;

  end;

end;

keep id date var;

format date mmddyy10. var 10.3;

run;

proc sort data=z;

by id date;

run;

proc print data=z noobs;

var id date var;

run;

   id             date           var

254063AC    07/01/1987         9.349

254063AC    07/02/1987         9.330

254063AC    07/06/1987         9.292

3134A4DQ    01/31/2001         5.191

3134A4DQ    02/08/2001         5.316

3134A4DQ    02/09/2001         5.239

345370BX    07/23/1998         6.525

345370BX    07/24/1998         6.539

345370BX    07/27/1998         6.566


test.jpg

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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