Hi, Samuel,

I suggest you look in the Bloomberg log file for errors.
C:\blp\api\bbcom.log.n

It could be that by connecting so frequently, you are confusing the
Bloomberg server. There is a blpDisconnect() function which might help.




On Fri, Apr 9, 2010 at 8:32 AM, <Samuel.Meichtry@bkw-fmb.ch> wrote:

> Dear Finance People
>
> I have a Rscript which grasps every 2 minutes for data on Bloomberg
> timeseries in a tryCatch-while-Loop.
>
> When there is an error it waits 2 minutes and reconnects to Bloomberg and
> tries again. Unfortunately it sometimes happen, that blpConnect() is not
> responding and it does not give an error-message. After that I can only
> close manually the Skript-Error-Message-Box in Windows.
>
> Is there a possibility to close the Rscript properly, or prevent the
> hanging of the RScript?
>
> Thank you!
>
> #My Code:
> tryCatch({
>   while(TRUE){
>        #...
>   }; #End while
>   #... error, finally, etc.
> }; #End while
> cat("Open Bloomberg connection ...","\n") conn <- blpConnect()
> cat("Bloomberg connection succeeded.","\n")
>
>
> My Logfile:
> 2010-04-09 02:34:17 Restart 1st while ...
> 2010-04-09 02:34:19 Open Bloomberg connection ...                       #<-
> Here it is hanging
> ------------------------------------------------------------------
> 2010-04-09 08:35:32 Rotc process started.                               #<-
> I have to restart it manually!!
>
>
> ____________________________________________
> BKW FMB Energie AG
> Energy Trading
> Samuel Meichtry
> Analyst Energy Trading
> Tel +41 31 330 53 99
> Fax +41 31 330 56 16
> e-mail samuel.meichtry@bkw-fmb.ch
>
> _______________________________________________
> R-SIG-Finance@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> -- Subscriber-posting only. If you want to post, subscribe first.
> -- Also note that this is not the r-help list where general R questions
> should go.
>

	[[alternative HTML version deleted]]

