DATA Step, Macro, Functions and more

Anyone need a diversion?

Reply
PROC Star
Posts: 7,474

Anyone need a diversion?

The SGF on-line agenda builder, this year, doesn't have a button to push that will allow one to transfer their personal schedule to their Outlook, Google, or phone calendar.  Surely it can't be too difficult a program to write.  Anyone up to the challenge? (p.s. you only have until tomorrow if anyone is going to be able to use it!)

Super User
Posts: 19,815

Re: Anyone need a diversion?

That's what the apps for isn't it? Smiley Happy

PROC Star
Posts: 7,474

Re: Anyone need a diversion?

Nope!  The app is only (I think) for iphones and only includes sas author presentations.  Not the bulk of presentations that are really offered!

SAS Super FREQ
Posts: 8,866

Re: Anyone need a diversion?

Hmmm -- did you allow the app to sync??? I just went into the app and clicked sessions and can see the sessions by non-SAS authors. So my version of the app seems to have more than just SAS authors.

cynthia

PROC Star
Posts: 7,474

Re: Anyone need a diversion?

Posted in reply to Cynthia_sas

Apparently an update was issued that corrected the situation.  However, I still would have liked code for downloading to Outlook and/or Google calendar.  That always used to be included as part of the agenda builder's capabilities.

PROC Star
Posts: 7,474

Re: Anyone need a diversion?

It's a bit late, and I don't have time to put it all together, but I found a 2009 paper by Clarke Thacher that does exactly what I had in mind: http://support.sas.com/resources/papers/proceedings09/086-2009.pdf

Trusted Advisor
Posts: 1,301

Re: Anyone need a diversion?

I just saw this.  Would have been fun to work on...  The iPhone app was indeed updated and now has all the papers and can send you calender items, it is very nice.

PROC Star
Posts: 7,474

Re: Anyone need a diversion?

If you have an IPhone.  I've still got another year remaining on my current cell phone plan.  See you in Orlando!

Trusted Advisor
Posts: 1,301

Re: Anyone need a diversion?

Valid point.  I am almost through with a solution.

PROC Star
Posts: 7,474

Re: Anyone need a diversion?

Hey, if you can get it ready on time, I'd be quite happy test test it, run it, and load the results on my quite non-iphone.  Too late for a paper this year, but 2013 isn't that far away Smiley Happy

Trusted Advisor
Posts: 1,301

Re: Anyone need a diversion?

barely tested, I do not expect it to be fully functional.

filename sgf url 'http://sgf2012.confnav.com/sgf2012/web/sessions/date/view.html';

data foo;

if _n_=1 then day='21APR2012'd;

id+1;

infile sgf lrecl=32767 truncover firstobs=62 obs=582;

input @;

_infile_=tranwrd(left(prxchange('s/<[^>]+>|\x26nbsp;/ /o',-1,_infile_)),'&reg;',' ');

format start_time end_time time.;

start_time=input(scan(_infile_,1,'2D09'x,'r'),time.);

end_time=input(scan(_infile_,2,'2D09'x,'r'),time.);

title=scan(_infile_,2,'09'x,'r');

array author[3:9] $ 256 author1-author7;

do _n_=3 to countw(_infile_,'09'x)-1;

  author[_n_]=scan(_infile_,_n_,'09'x,'r');

  if author[_n_]='Gaylord Palms Resort,' then call missing(author[_n_]);

end;

room=scan(_infile_,_n_,'09'x,'r');

if lag(end_time)-start_time>13000 then day+1;

run;

filename ics '/path/to/write.ics';

data bar;

set foo(where=(id=1));

start_dt=dhms(day,hour(start_time),minute(start_time),0);

end_dt=dhms(day,hour(end_time),minute(end_time),0);

* file ics;

put 'BEGIN:VCALENDAR' /

     'PRODID:-//http://sgf2012.confnav.com' /

  'BEGIN:VEVENT' /

  'DTSTART:' start_dt B8601DZ20. /

  'DTEND:' end_dt B8601DZ20. /

  'LOCATION:' room /

  'DESCRIPTION:' title /

  'Start Time:' start_dt mdyampm17. /

  'End Time:' end_dt mdyampm17. /

  'PRIORITY:3' /

  'END:VEVENT' /

  'END:VCALENDAR'

;

run;

Ask a Question
Discussion stats
  • 10 replies
  • 394 views
  • 0 likes
  • 4 in conversation