A problem with the run/open function

My Environment

  1. Windows 11 Pro, version 10.0.22621
  2. Julia 1.8.5
  3. Visual Studio Code, version 1.77.3

Background

I am trying to convert a program that is very important to our organization. The program runs on Window 11, and it uses C# and SQL Server to process high speed transactions from the major stock exchanges.

We subscribe to a streaming data feed from IQFeed.net. This company provides language support for C++, C# and Python. I may be the first to try Julia.

IQFeed.net provides an App that is launched with command-line arguments. A TCP client then runs for 6.5 of the market hours. We connect to this client and start the data stream that consist of ASCI text records (about 80 characters). We parse the text and update a SQL Server database at the rate of about an average of 400 record/second. This rate varies. High burst rates may reach twice that amount.

On Windows, the Task Manager starts the program just before the market opens. The following image shows the Launcher App. The progress bar shows my commend line arguments are being processed, and the status window (red line) shows that no errors have occurred:

Start

My Problem

So, I thought this would be easy to do in Julia. The following Julia code is one of many tries to start the IQFeed Launcher.

    using InteractiveUtils
    try
        iqconnect_path = raw"C:\Program Files\DTN\IQFeed\IQConnect.exe"
        arg1 = raw"-product CYPRESS_Point"
        arg2 = raw"-version 1.0"
        arg3 = raw"-login 123456"
        arg4 = raw"-password Foobar"
        arg5 = raw"-autoconnect"
        args = ["arg1", "arg2", "arg3", "arg4", "arg5"]
        open(`$iqconnect_path $args`)
    catch err
        @error "Error starting iqconnect: $err"
    end

When this Julia script runs in the REPL, the IQFeed Launcher appears, but it hangs. Without any error message. The picture below shows my problem.

start-julia

As you can see, the Launcher does not like the arguments.
I have also tried other scripts, but without success. Here is what I have also tried:

    run(`iqconnect arg1 arg2 arg3 arg4 arg5 true`)
    run(`iqconnect "-product CYPRESS_Point -login 123456 -password Foobar -autoconnect"`)
    run(`iqconnect -product CYPRESS_Point-login 123456 -password Foobar -autoconnect`)

My question is: “How can I debug the open (or run) command?”
Any suggestions will be greatly appreciated.

Charles Brauer
CBrauer@CypressPoint.com

This is probably not what you intended:

julia> `$iqconnect_path $args`
`'C:\Program Files\DTN\IQFeed\IQConnect.exe' arg1 arg2 arg3 arg4 arg5`

I assume you meant

args = [arg1, arg2, arg3, arg4, arg5]

However this also may not give what you wanted:

julia> `$iqconnect_path $args`
`'C:\Program Files\DTN\IQFeed\IQConnect.exe' '-product CYPRESS_Point' '-version 1.0' '-login 123456' '-password Foobar' -autoconnect`

Note that each argument is passed as a single string (e.g. '-product CYPRESS_Point'): the argument parser would typically expect this to be two separate strings '-product' and 'CYPRESS_Point'.

I think what you actually want is something like:

        iqconnect_path = raw"C:\Program Files\DTN\IQFeed\IQConnect.exe"
        product = "CYPRESS_Point"
        version ="1.0"
        login = "123456"
        password = "Foobar"
        open(`$iqconnect_path -product $product -version $version -login $login -password $password -autoconnect`)
1 Like

Thank you very much Simon. Your last suggestion works great! I really appreciate your comments. I don’t think I could have come up with that solution by reading the “open” Man-page.