It looks like the top of my message got chopped:
I am reshaping my data so each date becomes a column.  I will not know how many
dates are in my dataset and thus will not know how many columns I have.  I'd like
to loop across the columns performing an operation once for each date.
Jason Rachlin wrote:
> program then loops over these dates performing a function.  I'd like to loop
> until I hit the last date in my dataset which will change each time I run the
> program depending on the size of the dataset.  Can someone please recommend an
> efficient way to identify my last column so I can define NumDays?
>
> local NumDays = ?
> local i = 1
> while `i' <= NumDays {
>     ...
> }
>
> cheers!
>
> *
> *   For searches and help try:
> *   http://www.stata.com/support/faqs/res/findit.html
> *   http://www.stata.com/support/statalist/faq
> *   http://www.ats.ucla.edu/stat/stata/
--
NOTICE: If received in error, please destroy and notify sender.  Sender does not
waive confidentiality or privilege, and use is prohibited.
*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/