Run External Program from V9 4GL

SUGGESTED

I've seen some examples using the System and CallUI commands to launch local executable files on the client workstations, but I've been unable to get them to work in V9. I can get CallUI to launch a web page, but that's about it. Despite being web-based I'd still like the option to launch a local program. Any advice? Thanks,

  • 0
    SUGGESTED
    Use "system" instruction.

    Check online help:
    online-help.sageerpx3.com/.../4gl_system.html

    "System allows you to execute system commands and to obtain the information sent by the command on the standard output.
    ...."

    Here is an example from there:

    # Copy FILE1 to FILE2 with stderr redirection on UNIX
    System "cp "+FILE1+" "+FILE2-"2>/dev/null"

    # List of a directory on a Windows server on which the first reference folder is located
    # Returns the list of files and the number of lines read
    # If no directory is given we default it with a temporary directory
    Subprog DIRECTORY_LIST(FILES,DIRECTORY,NUMBER)
    Variable Char FILES(100)(1..)
    Value Char DIRECTORY(100)
    If DIRECTORY="" : DIRECTORY = "C:\sage\tmp" : Endif
    System FILES = adxmac(1)+"@DIR/b/o:n"+DIRECTORY
    NUMBER=stat1
    End
  • 0
    I'm trying to use System to run a .bat file saved on x3 server but I fail. What can I do?
    I can't even run the same instruction of the online help.