Data Server Syntax

NOTE: In PRO/5 15.01 and higher, and BBj 15.10 and higher, the OPEN verb by default is restricted from opening pipes (commands starting with "<", ">", or "|") in console mode.  This is to protect against accidentally overwriting a data file as a side effect of inadvertently specifying a pipe expression.  To open a pipe at console, set SETOPTS byte 9 bit $10$ or include MODE="PIPE" in the OPEN.

In BBj, data server syntax is used in a file name to access resources through a BBj or PRO/5 Data Server. The most basic form of data server syntax is “/<server>path”. This will attempt to access path through a data server running on the host server at the default BBj data server port, port 2000. If the customer needs more control over the connection, then data server syntax also provides for comma separated options to change aspects of the data server connection as follows:


Specify the data server port by number.


Specify a data server port by name as specified in the services file. On a Unix based system this file is normally found at “/etc/services.”


Tell the data server connection to use SSL.


Tell the data server connection to use the specified SSL keystore. This implies the use of SSL and therefore does not require a separate ssl option.


Specify a password for the SSL keystore. This does not imply the of SSL by itself.

If multiple conflicting options are specified (for example, both a “port=port” and “service=service” or multiple “port=port” options) then the last one takes precedence.

Here is an example of data server syntax accessing a file with the path “/foo/bar/baz” on a data server named “bang” running on port 5000 using SSL:


As an optimization, BBj attempts to avoid actually connecting to a data server when the file access is actually local even if the customer uses data server syntax. To that end, if data server syntax specifies the host and port of a data server running in the same JVM as the interpreter then the file will be opened locally instead of through the data server requested.


Always exercise extreme care when interacting with the operating system via SCALLs, pipes, or invocations such as the OPEN verb. Many of these commands have the potential to permanently delete or overwrite files and directories, and it is possible to make typographic errors that result in a dangerous command.

As an example, leaving out the leading slash (/) when entering “/<bang,port=5000,ssl>/foo​” as Data Server syntax can yield unpredictable results when the “<” and “>” characters are interpreted as requests to redirect I/O. Relying on the PREFIX for Data Server syntax is one possible way to avoid this issue.

REMEMBER ­ The underlying operating system will obediently obey the command without prompting for assent, so think before you type, as with great power comes great responsibility.

See Also

PRO/5 Memory Mapped Data Server Access


Copyright BASIS International Ltd. BBj®, Visual PRO/5®, PRO/5®, and BBx® are registered trademarks.