PxPlus User Forum

Twitter Twitter Twitter

Author Topic: Command line interface  (Read 426 times)

joe

  • Silver Member
  • ***
  • Posts: 22
    • View Profile
Command line interface
« on: February 07, 2020, 03:48:01 PM »
I have programed an interface to a linux utility. I utilizes a simple character based interface.

I now want to use this same logic on a windows server. When I execute the code the process seems to lock up.

What I think is going on is the process is running and waiting for input from me except there is a disconnect of some sort between my process and my screen. This is using the app server setup. When I check with task manager on the server it shows the utility is running.

I use syntax like this to execute it. 

10 A$="\vbasic\clickit -test \tmp\testfile"
20 a=sys(a$)

Perhaps there is a better way to interact with this utility.

Any thoughts anybody?

Mike King

  • Administrator
  • Diamond Member
  • *****
  • Posts: 3368
  • Mike King
    • View Profile
    • PVX Plus Technologies
Re: Command line interface
« Reply #1 on: February 07, 2020, 04:00:38 PM »
When using an App server setup the process (\vbasic\clickit) will by run on the server.  It need to not be expecting any form of user input. 

If it does need user input it will need to be run on the workstation by prefixing the command with [lcl] or [wdx] if a graphical application.  In this case it should be noted that the program must reside on the workstation as would any files referenced such as \tmp\testfile.

If its a text mode application, designed to run from Windows command mode, and you want it run on the server you can programatically provide user input by opening it up as a pipe as in:  OPEN (nn) "|\vbasic\clickit"



joe

  • Silver Member
  • ***
  • Posts: 22
    • View Profile
Re: Command line interface
« Reply #2 on: February 07, 2020, 04:27:33 PM »
I tried the open logic. It did not give me an error but it also does not allow for any interaction with the utility.

I also get error trying to close the channel.
Same errors if I type begin, end, or start.
Seems like the channel is stuck open.

joe

  • Silver Member
  • ***
  • Posts: 22
    • View Profile
Re: Command line interface
« Reply #3 on: February 07, 2020, 04:38:30 PM »
Tried it again.
Seems like I can

 read record (99)xx$

and get a response from the utility.

I was looking for more suspension of my PVX program and  a complete interaction with the utility until I exit
the utility.

I may investigate running it on the work station