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-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

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
  • 1832 views
  • 1 like
  • 5 in conversation