DATA Step, Macro, Functions and more

Using Do Until loop to output date at which column sum=value --follow up to previous post

Reply
Occasional Contributor
Posts: 13

Using Do Until loop to output date at which column sum=value --follow up to previous post



Data river_flow;
  input dailyflow flowdate:date9. mymonth myday myyear quarterflow halfflow threequarterflow;
  format flowdate date9.; 
  datalines;
1360.66	01JAN1940	1	1	1940	420185.91	840371.83	1260557.74
1382.48	02JAN1940	2	1	1940	420185.91	840371.83	1260557.74
1392.40	03JAN1940	3	1	1940	420185.91	840371.83	1260557.74
1404.30	04JAN1940	4	1	1940	420185.91	840371.83	1260557.74
1392.40	05JAN1940	5	1	1940	420185.91	840371.83	1260557.74
1348.76	06JAN1940	6	1	1940	420185.91	840371.83	1260557.74
1313.06	07JAN1940	7	1	1940	420185.91	840371.83	1260557.74
1328.93	08JAN1940	8	1	1940	420185.91	840371.83	1260557.74
1348.76	09JAN1940	9	1	1940	420185.91	840371.83	1260557.74
1372.56	10JAN1940	10	1	1940	420185.91	840371.83	1260557.74
1221.82	11JAN1940	11	1	1940	420185.91	840371.83	1260557.74
1128.59	12JAN1940	12	1	1940	420185.91	840371.83	1260557.74
1221.82	13JAN1940	13	1	1940	420185.91	840371.83	1260557.74
Attachment
Super User
Posts: 2,078

Re: Using Do Until loop to output date at which column sum=value --follow up to previous post

What is your requirement?and what's the logic for the requirement and more info please

Occasional Contributor
Posts: 13

Re: Using Do Until loop to output date at which column sum=value --follow up to previous post

Posted in reply to novinosrin

I clearly stated what my goal is and provided a program with data that is almost there.  I don't think I can be any more specific.

Super User
Posts: 2,078

Re: Using Do Until loop to output date at which column sum=value --follow up to previous post

@Hydro1 Thank you and I do not disagree. My mind seems dumb to not grasp the logic nor the requirement well. I am sorry, however I am sure somebody will respond with a much needed solution and hopefully sooner. Hang in there

Occasional Contributor
Posts: 13

Re: Using Do Until loop to output date at which column sum=value --follow up to previous post

Yes. Sorry--I thought I had the text in the window.  My goal is to output the date at which 25% , 50%, and 75% of the total  annual volume of runoff is reach for each year in the dataset.  The dataset contains daily flow (volume in acre-feet) , date, and the previously computed values of Q25, Q50, and Q75.  The program contains the data and was slightly modified from that provided by HB.

 

Sincerely,

Hydro1

Ask a Question
Discussion stats
  • 4 replies
  • 145 views
  • 0 likes
  • 2 in conversation