Our website is undergoing maintenance. You may experience some unexpected updates or outages. We appreciate your patience as we work to improve your online experience.
How do I use the OPEN statement? Do I need to pass a channel number? And how would I open the channel with read/write access? Well, I suppose I should check the documentation again. But wait, what is the URL for the documentation?
Sound familiar? If you ever ask yourself questions like these while writing Synergy code, the Go To Definition feature could be just what you need. Go To Definition is a Visual Studio editor feature that generally takes you to the definition of a variable, type, etc. You may be familiar with this functionality, but did you know that Synergy DBL Integration for Visual Studio (SDI) extends this feature in a special way for most Synergy DBL statements and system-supplied routines? If you use Go To Definition for a Synergy DBL statement or system-supplied routine that has a parameter, the online documentation for that statement or routine will automatically open in your default browser.
Consider this scenario: You are writing Synergy code to open a channel, so you start typing an OPEN statement. IntelliSense offers some hints about the parameters for the OPEN statement, as shown in the screen capture below. It shows that OPEN takes three required parameters, and there are several optional parameters:
But what if you need more information? In that case, you’ll want to access the Synergy/DE documentation on the web and search for the OPEN statement. But before you open a browser and start looking for the documentation, remember Go To Definition.
Instead of interrupting your workflow by opening a web browser, navigating to the documentation web site, and searching for the OPEN topic, you can instead press a single key: just place the cursor somewhere in the OPEN keyword in the Visual Studio editor and press F12. (Alternatively, you can right-click on the keyword and select Go To Definition from the context menu.) Your default web browser will open and automatically access the OPEN topic in the Synergy/DE documentation:
As mentioned above, this feature also works for system-supplied Synergy subroutines and functions that have parameters. For example, let’s say you want to invoke an external routine using XSUBR, but you aren’t sure how to pass the arguments for the external subroutine. To access the documentation for XSUBR, you can simply start typing the XSUBR statement in the Visual Studio editor and use Go To Definition while your cursor is somewhere in the XSUBR keyword:
We’ve focused on Go To Definition in the examples above, but this isn’t the only way to access Synergy/DE documentation from Visual Studio. For example, you can access the documentation for a Synergy build error directly from the Error List window in Visual Studio. Suppose you get a DBL-E-TOKUDF error and want to find out more about it. You can simply press the F1 key while the error is highlighted in the Error List window, or you can right-click the error and select “Show Error Help” from the context menu. The TOKUDF topic will open in your default browser.